Skip to content

feat: ask CodeBoarding for the pull request's review guide (experimental) - #160

Draft
Svilen-Stefanov wants to merge 1 commit into
mainfrom
feat/review-guide
Draft

Svilen-Stefanov wants to merge 1 commit into
mainfrom
feat/review-guide

Conversation

@Svilen-Stefanov

Copy link
Copy Markdown
Contributor

What

An experimental step that asks CodeBoarding for the pull request's review guide and stores it in the review artifact. It's off unless the workflow sets the new review_guide_url input.

After the review analysis, scripts/review_guide.py:

  1. Packs what the run already has into one gzipped bundle:
    • both analysis.json files;
    • both call graphs, read from the static_analysis.pkl beside each, so nothing is recomputed;
    • the diff between the two analysed commits, from the compare API, so it's exactly what was analysed;
    • the changed files at both commits: head from the checkout, base from the contents API.
  2. Posts it to the closed-functions service (licensing-aws #44).
  3. Writes the answer to the artifact folder as review_guide.json, before the upload. The webview reads it from there (webview #255). The webview never calls the service.

Credentials follow the analysis:

  • Proving the caller: a fresh OIDC token plus the license, minted by oidc_relay.py, the same bearer the hosted proxy gets. The run's GITHUB_TOKEN stands in when the workflow can't mint one.
  • The model: a run with its own Ollama, OpenRouter or OpenAI key sends that key along. Otherwise the service uses CodeBoarding's hosted model, metered like the analysis.

Never fails the run: a refusal, a timeout or a bundle over the service's limit leaves the artifact without a guide and logs one line.

The guide's code isn't in this repository; only the bundling is.

Not done yet

  • Not on v1: turning it on for everyone means a default URL once the service is in prod.
  • Readable for now: the guide is stored unencrypted. Encrypting it with a key shared by the service and the webview is the next step.

Changes nothing visible by itself. Tests: 7 new (tests/test_review_guide.py), all passing with the existing suite; Black clean.

🤖 Generated with Claude Code

…tal)

When `review_guide_url` is set, a review run packs what it already has (both analyses, both call
graphs from the static_analysis.pkl beside them, the diff between the two analysed commits, and the
changed files at both) into a gzipped bundle, posts it to the closed-functions service, and stores
the answer in the review artifact as review_guide.json, where the platform reads it.

It authenticates the way the hosted proxy does (a fresh OIDC token plus the license, minted by
oidc_relay), or with the run's GITHUB_TOKEN when the workflow cannot mint one; a run with its own
Ollama, OpenRouter or OpenAI key sends that key along. Off by default, and it never fails the run.

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

codeboarding-review Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

CodeBoarding review

Status: 1 changed component

See the full change in CodeBoarding.

graph LR
    n_action_support_scripts["action_support_scripts"]
    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_action_support_scripts modified;
Loading

download artifacts · run 40777515616

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