Skip to content

feat: keep the review guide's request in the review artifact - #177

Draft
Svilen-Stefanov wants to merge 1 commit into
mainfrom
claude/keep-guide-bundle-a6b690
Draft

Svilen-Stefanov wants to merge 1 commit into
mainfrom
claude/keep-guide-bundle-a6b690

Conversation

@Svilen-Stefanov

Copy link
Copy Markdown
Contributor

What

In review mode, scripts/remote_features.py now saves the body it POSTs to /v1/review-guide into the review artifact as closed/bundle.json.xz. It is the same bytes the service receives (xz-compressed JSON, so the name says .xz, not .gz), not a re-encoding.

Why

Review artifacts carry analysis.json, metadata.json, health_report.json, review_guide.json and closed/architecture.json, but not the call graphs the guide is generated from, so no guide can be generated again on the same inputs. Keeping the request lets every guide change (starting with the prompt and packet change in licensing-aws) be compared old against new on real pull requests. A separate job will copy bundles into CodeBoarding-evals before they expire.

This adds no closed logic: it stores the inputs the action already sends, nothing more.

When it is written

  • Only when the guide's request goes out: written just before the POST, so a request the service answers with an error is still kept.
  • Never in sync mode. The only step that runs this script is gated on mode == 'review'; sync's one remote call (problem_history.py, /v1/briefing) writes no artifact. A test checks both.
  • Not written when no request is sent: inputs missing (no call graph), a provider the service cannot call, or a body over the service's limit (_encode already refuses these before anything is sent, and the existing notice says why). keep_bundle also refuses an empty body or one over MAX_COMPRESSED_BYTES itself, with one ::notice:: line.
  • It is the guide's body, which never carries source.json. Architecture's body (which may carry the repository's source) is not kept.
  • Writing it can never fail the run or change the guide: any error becomes one notice line, and the guide and architecture results are written as before.

Size

Measured by running this branch's collection and encoding path, with the pinned engine (codeboarding==0.15.6), on real baselines and with the POST stubbed:

Pull request Bundle Review artifact today (zipped)
CodeBoarding-action #175 (25 KB analysis) 24 KB about 12 KB
CodeBoarding-webview #323 (1.7 MB analysis, 8 MB call graph) 214 KB about 510 KB
crate (large, figure from the module docstring) about 1.4 MB

The service caps the body at 4.3 MB, so that is the most it can add. xz output does not shrink further in the artifact zip. The review artifact keeps its 14-day retention-days; nothing about retention changes. problem_history.py downloads review artifacts only up to 50 MB, far above this.

The webview ignores it

CodeBoarding-webview inflates only the names in PR_ARTIFACT_FILES (src/lib/pr-artifact.ts:562 on main at 569db1c: analysis.json, metadata.json, base_analysis.json, health_report.json, review_guide.json, closed/review-guide.json, closed/architecture.json), via the readZipEntries filter. No other reader there walks closed/. The new file is never read or inflated.

Tests

KeptBundleTests in tests/test_remote_features.py:

  • written as the exact bytes the guide sent, and without architecture's source
  • kept when the guide's request went out but the service answered 500
  • not written when inputs are missing, the provider cannot be called, or the body is over the limit
  • an empty or oversized body is skipped with exactly one log line
  • a failed write leaves the guide and architecture results unchanged
  • never in sync mode (action.yml wiring and problem_history.py)

Full suite: 359 tests pass.

Draft: not to be merged or released from here; the v1 tag is untouched.

🤖 Generated with Claude Code

A review now saves the body it POSTs to /v1/review-guide, the same
xz-compressed bytes, as closed/bundle.json.xz in the review artifact.
The artifact held the analyses and the guide but not the call graphs
the guide is generated from, so no guide could be generated again on
the same inputs. With the request kept, any change to the guide can be
compared old against new on real pull requests.

It is written only when the guide's request goes out, so never in sync
mode, never for a provider the service cannot call, and never when the
inputs are missing or over the service's limit. Writing it never fails
the run or changes the guide.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codeboarding-review

codeboarding-review Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

CodeBoarding review

Status: 1 changed component

See the full change in CodeBoarding.

graph LR
    n_Action_Workflow_and_Analysis_Execution["Action Workflow and Analysis Execution"]
    n_Remote_Review_and_Problem_Ledger["Remote Review and Problem Ledger"]
    classDef added fill:#1f883d,stroke:#0b5d23,color:#ffffff;
    classDef modified fill:#bf8700,stroke:#7d4e00,color:#ffffff;
    classDef deleted fill:#cf222e,stroke:#82071e,color:#ffffff,stroke-dasharray:5 3;
    class n_Remote_Review_and_Problem_Ledger modified;
Loading

download artifacts · run 43886015839

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant