Repository navigation
fix: verify reviews containing escaped control examples - #2054
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR adds byte-preserving GitHub comment readback when sanitized CLI responses cannot verify a published review. Example: A published review contains the literal example \u001b.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR fixes a source-verifiable publication failure that remains on main, and no actionable introduced defect was identified. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe publication owner submits review comments through the existing mutation transport and verifies receipts; the new read path retrieves original JSON bytes through the shared credential, retry, deadline, and telemetry owners. flowchart TD
A[Review body] --> B[Existing mutation transport]
B --> C[Receipt verification]
C --> D[Byte preserving GET]
D --> E[GitHub comment API]
E --> F[Exact body and trusted author checks]
F --> G[Confirmed publication]
Technical reviewBest possible solution: Retain exact receipt verification and recover original comment bytes through the narrowly scoped GET transport. Do we have a high-confidence way to reproduce the issue? Current-main exact comparison consumes sanitized CLI output, and upstream sanitizer source establishes the failing escape inputs; the PR records controlled baseline failures and candidate success, but no target code was executed during this review. Is this the best way to solve the issue? The focused fallback addresses the response-byte owner without weakening receipt checks; upstream source confirms jq receives already-sanitized JSON, supporting the separate read transport. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 96e800e74056. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 17, 2026, 11:14 AM ET / 15:14 UTC (Revision 2). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
What Problem This Solves
Fixes completed review comments being reported as unpublished when their text contains literal Unicode escape examples or control characters.
User Impact
Review publication can confirm the original stored comment and finish successfully. Wrong comment IDs, authors, and bodies still fail verification. No operator configuration change is required.
Why This Change Was Made
The GitHub CLI sanitizes JSON string content for terminal display, including literal escape examples. The mutation can therefore succeed while its response and a normal CLI readback fail exact body comparison.
Keep writes on the existing transport. When a write response cannot establish the receipt, read original bytes through a GET-only path within the existing credential, retry, deadline, circuit, and telemetry owner. PATCH reads the known ID; POST paginates and selects the newest trusted exact match. Receipt reads bypass sanitized ETag bodies. Same-origin redirects preserve the selected credential boundary.
The transport follows the selected CLI host, API-host override, credentials, and Unix-socket settings.
Documentation Impact
Updated the active publication contract in
docs/scheduler.md. Owner: ClawSweeper maintainers. Source of truth: the publication and GitHub runtime modules. Verified scope: receipt verification on 290584f through the controlled transport proof below. Update when receipt, authentication, retry, or publication behavior changes. Added one changelog fragment.Evidence
pnpm run check: passed in CI run 39042054544: all four test shards, combined coverage, static checks, builds, lint, and formatting..Real Behavior Proof
node scripts/e2e/review-publication-bytes.mjs <baseline-dist> dist <empty-output-dir>.cbx_33ba58ec3508; imagecrabbox-daytona-2x4x10-20260803-3907a63. Baseline7bcab824b1493fbb2eda8aa71835d36759095410; candidate290584f4e3bce062a8db6c842e4570ba374565da; source fingerprinta3977adcd42388992480d9bd929d97f62a35a89482616d638391a334e9ccdadd.Redirect Credential Boundary Proof
The forbidden-origin proof request and matching rank-up move are addressed by five real-transport cases. Production code and the reviewed head remain unchanged.
node redirect-boundary-proof.mjs dist redirect-boundary-proof.json; the executable script is in the same artifact.cbx_dfc3c1cd7b08, imagecrabbox-daytona-2x4x10-20260803-3907a63; candidate290584f4e3bce062a8db6c842e4570ba374565da, source fingerprinta3977adcd42388992480d9bd929d97f62a35a89482616d638391a334e9ccdadd.