Skip to content

fix(review): prove hosted tool round in canary - #1419

Merged
vincentkoc merged 1 commit into
mainfrom
fix/review-tool-canary
Sep 4, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/review-tool-canary

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 4, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Resolves a gap where the hosted review canary could pass without proving that the production review path completed a genuine tool round and consumed its result before returning a schema-valid decision.

Why This Change Was Made

The canary now runs the production runCodexForTest path against a synthetic two-commit repository, requires one exact read-only diff command, validates the raw decision against the checked-in schema, and verifies the JSONL event order through turn.completed. Raw prompts, commands, output, transcripts, fixture values, and runtime identities remain ephemeral.

This does not change provider selection, authentication routing, queues, publication, or workflow configuration. The repository remains in proxy mode.

User Impact

Maintainers get a stronger dispatch-only signal that hosted Codex review can perform a real second model round after a tool result. The uploaded proof remains restricted to booleans and integer counts.

OpenClaw Bay Impact

OpenClaw Bay is unaffected. This changes only a dispatch-only CI canary and its private proof parser; no observer, status, queue, lifecycle, or dashboard contract changes.

Documentation Impact

Updated the active hosted-canary descriptions in README.md and docs/private-inference.md to state the production review path, privacy boundary, and explicit non-coverage. No changelog entry: this is operational validation infrastructure, not a released user-facing behavior change.

Evidence

  • Exact head: cc9eff63ce1345f5a848a7c97d6d992ea1fd7c4c
  • Base: 70a0a787eaf8fa3424d88a7a07302fd4a7e0d783
  • Hosted proxy proof: https://github.com/openclaw/clawsweeper/actions/runs/33865238465
  • Hosted native review scan smoke: success
  • Windows Codex launcher: success
  • Focused test: node --test test/hosted-review-canary-proof.test.ts (8 passed)
  • Typecheck: node_modules/.bin/tsc -p tsconfig.json --noEmit
  • Lint and formatting: changed scripts/tests/docs passed oxlint and oxfmt --check
  • Documentation and whitespace: node scripts/check-docs.mjs; git diff --check
  • Fresh committed Codex review: no actionable defects
  • Privacy scrub: no private paths, IPs, credentials, or non-placeholder email addresses in the diff

The operational-script delta is +233 net production lines; tests add +297 net lines and docs add +10 net lines. The production growth implements the new owner boundary: exact JSONL tool-attempt/order validation, checked-in schema validation, failure-diagnostic withholding, unchanged-checkout proof, and primitive-only artifact enforcement.

Real Behavior Proof

Claim: The hosted proxy route exercises the production review runner, performs exactly one successful fixture diff command, consumes that command output in a valid final decision, reaches turn.completed, and leaves the checkout unchanged without publishing private content.

Exercised surface: GitHub-hosted Ubuntu 24.04; repository proxy auth mode; pinned Codex CLI 0.151.0; production runCodexForTest; checked-in ClawSweeper decision schema.

Scenario: The canary creates a synthetic repository with base and head commits. A random marker exists only in the committed diff. The model must run the exact bounded git diff --no-ext-diff --unified=0 <base> <head> -- review-fixture.js command, then include the observed marker in its structured final review.

Command and environment: Workflow dispatch ci.yml at exact head cc9eff63ce1345f5a848a7c97d6d992ea1fd7c4c, input codex_auth_mode=configured, with repository variable CLAWSWEEPER_CODEX_AUTH_MODE=proxy.

Observable result: The hosted job succeeded. The artifact records two production Codex launches, one tool attempt, one completed fixture command, one final review after the command, one terminal turn, a schema-valid decision, and an unchanged checkout.

Artifact or trace: The run uploads hosted-review-scan-proof. Its exact key/type/value allowlist was checked locally; every value is a boolean or integer. Private Codex JSONL, command text, output, prompt, transcript, fixture marker, and runtime/model identity are not uploaded.

Limits: This is one synthetic committed-diff scenario. The artifact explicitly reports externalRepositoryCovered=false, reviewPublicationCovered=false, and queueLifecycleCovered=false. It does not attest external repository review, GitHub mutation/publication, queue behavior, or universal provider egress.

@clawsweeper

clawsweeper Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@vincentkoc
vincentkoc force-pushed the fix/review-tool-canary branch from 9a14d07 to cc9eff6 Compare September 4, 2026 10:51
@vincentkoc vincentkoc self-assigned this Sep 4, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 4, 2026
@clawsweeper

clawsweeper Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 4, 2026, 6:59 AM ET / 10:59 UTC.

ClawSweeper review

What this changes

The PR strengthens the dispatch-only hosted review canary to prove that the production review path reads a synthetic committed diff, uses the result in a structured decision, and uploads only scrubbed boolean/count evidence.

Merge readiness

✅ Ready for maintainer review

Keep this current, draft member-authored PR open. The introduced canary uses the production review runner, validates its ordered tool trace and schema output, and has supplied successful hosted-run evidence; no actionable defect was found in the patch.

Priority: P3
Reviewed head: cc9eff63ce1345f5a848a7c97d6d992ea1fd7c4c

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) The PR has a focused production-path proof contract, targeted adversarial trace coverage, and no supported correctness or security blocker.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The supplied hosted-run evidence maps the changed production review owner to a synthetic committed-diff scenario and records the observed tool command, marker-bearing final decision, terminal turn, unchanged checkout, and scrubbed artifact. The action artifact is linked in the PR body; its stated limits exclude external repositories, publication, and queues.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The supplied hosted-run evidence maps the changed production review owner to a synthetic committed-diff scenario and records the observed tool command, marker-bearing final decision, terminal turn, unchanged checkout, and scrubbed artifact. The action artifact is linked in the PR body; its stated limits exclude external repositories, publication, and queues.
Evidence reviewed 5 items Production runner integration: The existing review runtime performs its read-only checkout inspection, then invokes the normal Codex review process with the checked-in decision schema, JSON event output, and an output-last-message path.
Introduced canary path: The introduced smoke script calls that production review entry point, confirms the returned decision contains the diff-only marker, validates the raw output against the checked-in schema, and checks the captured JSONL ordering before writing its artifact.
Focused regression coverage: The new focused tests cover successful command-before-decision ordering plus rejection of reversed ordering, substituted commands, and extra tool attempts.
Findings None None.
Security None None.

How this fits together

The hosted review canary is a manually dispatched CI check that runs ClawSweeper’s production review path against a synthetic Git repository. It turns the private runner trace into a small public-safe artifact that tells maintainers whether the hosted review transport completed its intended tool-to-decision flow.

flowchart LR
  A[Synthetic committed diff] --> B[Hosted CI canary]
  B --> C[Production review runner]
  C --> D[Read-only diff command]
  D --> E[Structured review decision]
  E --> F[Private trace checks]
  F --> G[Scrubbed proof artifact]
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Validation delta production +233 net, tests +297, docs +10 The expanded production trace checks are matched by focused negative-path coverage and operator-facing documentation.

Technical review

Best possible solution:

Keep the narrowly scoped production-path canary and its privacy-safe primitive artifact, with the focused trace tests guarding its one-command contract.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR strengthens internal hosted validation rather than reporting a user-facing failure. Its stated production-path scenario is directly evidenced by the supplied successful hosted run.

Is this the best way to solve the issue?

Yes. Reusing the production review runner with a committed synthetic diff is the narrowest way to prove the missing tool-to-decision behavior without expanding into external review, publication, or queue coverage.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 70a0a787eaf8.

Labels

Label changes:

  • add P3: This improves internal dispatch-only validation and does not change a user-facing runtime path.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The supplied hosted-run evidence maps the changed production review owner to a synthetic committed-diff scenario and records the observed tool command, marker-bearing final decision, terminal turn, unchanged checkout, and scrubbed artifact. The action artifact is linked in the PR body; its stated limits exclude external repositories, publication, and queues.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The supplied hosted-run evidence maps the changed production review owner to a synthetic committed-diff scenario and records the observed tool command, marker-bearing final decision, terminal turn, unchanged checkout, and scrubbed artifact. The action artifact is linked in the PR body; its stated limits exclude external repositories, publication, and queues.

Label justifications:

  • P3: This improves internal dispatch-only validation and does not change a user-facing runtime path.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The supplied hosted-run evidence maps the changed production review owner to a synthetic committed-diff scenario and records the observed tool command, marker-bearing final decision, terminal turn, unchanged checkout, and scrubbed artifact. The action artifact is linked in the PR body; its stated limits exclude external repositories, publication, and queues.
  • proof: sufficient: Contributor real behavior proof is sufficient. The supplied hosted-run evidence maps the changed production review owner to a synthetic committed-diff scenario and records the observed tool command, marker-bearing final decision, terminal turn, unchanged checkout, and scrubbed artifact. The action artifact is linked in the PR body; its stated limits exclude external repositories, publication, and queues.

Evidence

What I checked:

  • Production runner integration: The existing review runtime performs its read-only checkout inspection, then invokes the normal Codex review process with the checked-in decision schema, JSON event output, and an output-last-message path. (src/clawsweeper-review-runtime.ts:941, 70a0a787eaf8)
  • Introduced canary path: The introduced smoke script calls that production review entry point, confirms the returned decision contains the diff-only marker, validates the raw output against the checked-in schema, and checks the captured JSONL ordering before writing its artifact. (scripts/hosted-review-scan-smoke.mjs:153, cc9eff63ce13)
  • Focused regression coverage: The new focused tests cover successful command-before-decision ordering plus rejection of reversed ordering, substituted commands, and extra tool attempts. (test/hosted-review-canary-proof.test.ts:8, cc9eff63ce13)
  • Hosted behavior proof: The supplied PR body identifies a successful hosted run at the exact PR head and reports one completed fixture command, a final decision after that command, terminal completion, schema validity, and an unchanged checkout; its stated limits explicitly exclude external repositories, publication, and queue lifecycle. (cc9eff63ce13)
  • Relevant feature history: Local path history identifies earlier hosted-scan safety work in commits 2a38078 and e1eefe2; the new commit is a direct child of the reviewed main SHA. (scripts/hosted-review-scan-smoke.mjs:27, 2a380786bf1c)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@vincentkoc
vincentkoc marked this pull request as ready for review September 4, 2026 11:01
@vincentkoc
vincentkoc merged commit 056816f into main Sep 4, 2026
27 of 29 checks passed
@vincentkoc
vincentkoc deleted the fix/review-tool-canary branch September 4, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant