Handle UTF-8 GitHub merge evidence - #682
Conversation
|
Warning Review limit reachedNext included review available in 16 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Independent exact-head review — BLOCKINGHead: Focused evidence: The three permitted suites pass at this head: 107 runs, 1,075 assertions, 0 failures/errors/skips. A base/head probe reproduces the reported ASCII-locale failure on accepted Blocking finding: The post-parse graph is not recursively checked. A byte-valid JSON response containing an escaped lone surrogate ( Current main: Hosted results: Validate's 299-character prompt-headroom failure is byte-for-byte the accepted-main failure and is covered by open, green PR #662; it is not PR-specific. Claude initialized but returned Unresolved review threads: 0. Verdict: BLOCKING. Next writer action: add recursive decoded-string UTF-8 validation in both readers, add the escaped-surrogate regressions, publish a new head, and rerun focused/hosted checks plus independent exact-head review. |
The UTF-8 gate added earlier on this branch checked only the raw response bytes. A byte-valid JSON response can still decode to an invalid Ruby string: `"\udcff"` is well-formed JSON, passes `valid_encoding?` on the wire, and `JSON.parse` turns it into a UTF-8 string holding an unpaired surrogate. That string then flowed past both readers. `AutonomousMergeEvidence.gh_api` returned it, and `CurrentIntegrationEvidence.github_snapshot` accepted it in a field it does not inspect, so an invalid candidate OID reached `candidate_from_snapshot`, where `String#match?` raised an uncaught `ArgumentError: invalid byte sequence in UTF-8`. The eligibility CLI rescues only `CurrentIntegrationEvidence::Error` and `KeyError`, so the structured `UNKNOWN` that issue #351 requires was not guaranteed. Validate the decoded graph recursively over every key and value immediately after `JSON.parse`, and map failure to each library's own evidence error so the CLI's existing rescue paths produce `UNKNOWN`. Checking after parse rather than at each use keeps the guard at the trust boundary, so no later reader has to re-prove encoding. Regressions cover both libraries directly and both CLI paths end to end. Without the guard the CLI test reproduces the raw `ArgumentError` escaping from `candidate_from_snapshot`. Scope stays narrow. `autonomous_merge_calibration.rb` parses GitHub JSON through a separate offline calibration path that never had the raw-bytes gate either; it is outside this branch's decision path and is left for a follow-up. Refs #351 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E9JmkTGMTLBJUXUzLr2MM3
Remediation of the blocking exact-head finding — head
|
| suite | runs | assertions | F/E/S |
|---|---|---|---|
autonomous-merge-eligibility-test.rb |
62 | 826 | 0/0/0 |
current-integration-evidence-test.rb |
27 | 121 | 0/0/0 |
autonomous-merge-evidence-test.rb |
22 | 144 | 0/0/0 |
| total | 111 | 1091 | 0/0/0 |
That is +4 runs and +16 assertions over the 107/1075 baseline recorded at
0d6fada3. RuboCop is clean on all five changed files.
Full bin/validate was deliberately not run: #662 is still open, so a full run
would report the known prompt-headroom failure rather than anything about this
change.
Base. origin/main is db989c34d6910095a066beef07b67fb6be657c94, still the
direct parent — 0 behind, 1 ahead before this commit. git diff --check clean.
Hosted checks at the exact head. Lint: success, claude-review: success, validate: failure.
claude-review was a service failure at 0d6fada3 (initialized, then
is_error:true with no review turn); it ran clean at this head. The single
validate failure is byte-for-byte the accepted-main failure:
FAIL: expected installed prompt guard to pass, got 1: FAIL: pr-batch Codex goal prompt template has 299 chars of headroom, must keep at least 300
It is the pre-existing prompt-headroom failure covered by open PR #662, not
PR-specific, and every other step in that run passed.
Review threads. 0 unresolved, and 0 review threads exist on this PR — the
blocking finding was posted as an issue comment, so there is no thread to
resolve. Nothing has been resolved or dismissed.
Out of scope, filed separately. autonomous_merge_calibration.rb parses
GitHub JSON through its own client that has neither the raw-bytes gate nor the
decoded-graph gate, and calls String#match? on parsed author and SHA values.
Same defect class, different code path, never covered by this branch. Filed as
#698 rather than widened into this remediation; it is offline calibration, not a
merge gate.
Next action. Independent exact-head review at ac4841b2.
|
Independent exact-head review of Scope: reviewed the five-file diff, verified the live PR head matches the immutable head, and ran the three focused evidence suites plus bounded raw-byte / escaped-surrogate probes on head and base. Evidence: all three exact-head suites passed ( Unresolved review threads: 0. Verdict: CLEAN. |
* origin/main: Deduplicate batch-title contracts and restore prompt headroom (#662)
|
Current-head reconciliation complete on
Branch pushed to |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 089bc76c80
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Review summaryFocused, well-targeted fix for issue #351. I reviewed the two library changes ( Correctness
Security
Tests
Minor nit (posted inline)
Scope
No blocking issues found. |
…ordination-observability-recovery * origin/main: Load workflow skill instructions by stage and document Astra host capabilities (#783) Authenticate closed-unmerged verification PR artifacts (#771) Archive public technical implementation plans (#689) Centralize Astra routing and add behavioral evaluation support (#759) Document attended and overnight operator workflow (#572) Fix issue-targeted completed-batch publication (#439) Handle UTF-8 GitHub merge evidence (#682) Enforce process-gap mechanism targets (#681) Clarify flaky CI routing in replicate-ci (#622) Fix recorded CI base binding for validated integration reuse (#779) Bump anthropics/claude-code-action from 1.0.210 to 1.0.215 (#780) Raise the workflow byte caps until the #392 extraction lands (#776) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> # Conflicts: # skills/address-review/SKILL.md # skills/plan-pr-batch/SKILL.md # skills/pr-batch/SKILL.md
…-marker-sync * origin/main: Load workflow skill instructions by stage and document Astra host capabilities (#783) Authenticate closed-unmerged verification PR artifacts (#771) Archive public technical implementation plans (#689) Centralize Astra routing and add behavioral evaluation support (#759) Document attended and overnight operator workflow (#572) Fix issue-targeted completed-batch publication (#439) Handle UTF-8 GitHub merge evidence (#682) Enforce process-gap mechanism targets (#681) Clarify flaky CI routing in replicate-ci (#622) Fix recorded CI base binding for validated integration reuse (#779) Bump anthropics/claude-code-action from 1.0.210 to 1.0.215 (#780) Raise the workflow byte caps until the #392 extraction lands (#776) Classify GitHub intake lookup failures safely (#673) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…batch-controls-followup * origin/main: Clarify revert runbook closure scope and release examples (#704) Strengthen TDD guidance with falsifiable behavioral tests (#676) Load workflow skill instructions by stage and document Astra host capabilities (#783) Authenticate closed-unmerged verification PR artifacts (#771) Archive public technical implementation plans (#689) Centralize Astra routing and add behavioral evaluation support (#759) Document attended and overnight operator workflow (#572) Fix issue-targeted completed-batch publication (#439) Handle UTF-8 GitHub merge evidence (#682) Enforce process-gap mechanism targets (#681) Clarify flaky CI routing in replicate-ci (#622) Fix recorded CI base binding for validated integration reuse (#779) Bump anthropics/claude-code-action from 1.0.210 to 1.0.215 (#780) Raise the workflow byte caps until the #392 extraction lands (#776) Classify GitHub intake lookup failures safely (#673) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> # Conflicts: # skills/plan-pr-batch/SKILL.md # skills/pr-batch/SKILL.md # skills/pr-batch/bin/autonomous-merge-eligibility-test.rb
…ollowups * origin/main: (21 commits) Make cross-runner blocker owner routes navigable (#680) Separate draft-head CI from merge-ready validation (#701) Refresh workflows through native host CLIs (#321) Fix writing-style resolver fallback for split pack roots (#736) Collapse the closing stack into one terminal structure for small single-repo batches (#707) Normalize known terminal coordination state casing in batch receipts (#786) Harden durable evidence replay edge cases (#269) Preserve omitted check-run actions in optional CI hold evidence (#768) Clarify revert runbook closure scope and release examples (#704) Strengthen TDD guidance with falsifiable behavioral tests (#676) Load workflow skill instructions by stage and document Astra host capabilities (#783) Authenticate closed-unmerged verification PR artifacts (#771) Archive public technical implementation plans (#689) Centralize Astra routing and add behavioral evaluation support (#759) Document attended and overnight operator workflow (#572) Fix issue-targeted completed-batch publication (#439) Handle UTF-8 GitHub merge evidence (#682) Enforce process-gap mechanism targets (#681) Clarify flaky CI routing in replicate-ci (#622) Fix recorded CI base binding for validated integration reuse (#779) ... Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Why
The autonomous merge gate reads JSON from GitHub subprocesses. Under an ASCII locale, valid UTF-8 payloads can be tagged as US-ASCII and crash parsing. Invalid bytes can also escape the evidence boundary instead of producing the gate's structured
UNKNOWNverdict.Fixes #351.
What changed
autonomous-merge-eligibilityemits a structuredUNKNOWNverdict.How to review and verify
AutonomousMergeEvidence.gh_apiandCurrentIntegrationEvidence.github_snapshot.Test plan
089bc76c80687b7af326a9f1956f9134428b3e2e: Handle UTF-8 GitHub merge evidence #682 (comment).is_error=falseand no inline findings: https://github.com/shakacode/agent-workflows/actions/runs/33688489275.pr-ci-readinessv2 verdict:READYat the exact head.deferred_to_update_changelog;CHANGELOG.mdis unchanged.Agent details
Commands and results
089bc76c80687b7af326a9f1956f9134428b3e2eusing the runs linked in Test plan.ac4841b2234e88947b8fc8a7cb796c4fb51e26fa: Handle UTF-8 GitHub merge evidence #682 (comment). The final head then integrated currentmain, reran the focused suites, and received a clean exact-head hosted Claude review.bin/validatewas not run by lane instruction; exact-head hosted Validate is authoritative and passed.Exact-head and replay evidence
f15211f985e30a85fd846c8ebc37c94bc22b90b7.089bc76c80687b7af326a9f1956f9134428b3e2e.mergeStateStatus: CLEAN; canonical exact-head CI readiness isREADY.QA Evidence
codex-m1-issue351-checker; independent review completed clean at the remediated implementation head, followed by exact-head focused checks and hosted Claude review at the final head; no active coordination claim remains.UNKNOWNbehavior.089bc76c80687b7af326a9f1956f9134428b3e2e.Coordination and reviewer telemetry
aw-medium-wave3-20260901/issue351-utf8-gate.aw-351-m5-utf8-gate.codex-m5-issue351-utf8-gate; checker:codex-m1-issue351-checker.94911eac-f520-4f85-9cd3-611d96853480; holder and branch matched before commit and push.Decision log
Merge confidence
Ready for review at exact head
089bc76c80687b7af326a9f1956f9134428b3e2e: focused checks and all hosted checks are green, the exact-head Claude review produced no findings, and there are zero unresolved review threads. Merge authority remainsask; the strict security preflight requires acknowledgment of682:high-risk-filesbefore merge. This metadata closeout does not merge the PR.Audit receipts
No completed-batch audit applies before merge.