Repository navigation
fix(ci-gate): shape every commit-status description inside post_status - #209
Conversation
GitHub's statuses API refuses a description holding a character outside the BMP (HTTP 422 "Description doesn't accept 4-byte Unicode"), e.g. a workflow named "🟡 CHECK: Groove Protocol Compliance", and the gate then posts CI/gate = failure with no verdict. Main already clipped descriptions in the publisher and tamper status, and the early pending uses fixed text; the older pinned gate built the early pending from the run name. post_status itself did not shape its input, so any writer that skipped the publisher's clip stayed exposed. Add status_description to the REST layer (non-BMP -> '?', one for one, then 140 characters with an ellipsis, by characters in any locale) and have post_status shape the text once, before the duplicate-skip compare and the POST, so the 1000-status skip compares what is written. The publisher's clip now delegates to it. The workflow's embedded copy is regenerated byte for byte from scripts/ci-gate-api.sh. Tests: tests/ci-gate-api.sh gains cases (emoji name, ASCII identity, BMP non-ASCII, C locale, 140 cut valid UTF-8, emoji-only, skip compare) and a mutant for the shaping; the existing mutant is re-aimed at the new line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4QvDijevnYHrThF6iwy7r
|
Review these changes at https://app.gitnotebooks.com/hyperpolymath/proven-cicd-and-workflows/pull/209 |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
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. |
|
Generated by Claude Code |
|



Summary
GitHub's statuses API rejects a description with a character outside the BMP (HTTP 422 "Description doesn't accept 4-byte Unicode"). Seen at hyperpolymath/resource-algebra PR 51, commit fec1930, run 44214588445, triggered by a workflow named
🟡 CHECK: Groove Protocol Compliance: the gate postedCI/gate = failure.That consumer pins
4e9e680b, whose "Mark a started or re-run workflow pending" step builtre-run started: <run name>and whose publisher'sclip()did not shape characters. Current main has already moved on: the early pending uses fixed text, and the publisher and tamper status replace non-BMP characters with?. What was still missing is the guarantee at the single writer, sopost_statusitself did not shape its input.Changes
scripts/ci-gate-api.sh: newstatus_description(non-BMP character ->?, one for one; then at most 140 characters with an ellipsis; by characters in any locale, via jq).post_statusshapes the text once, before the duplicate-skip compare and the POST, so the 1000-status skip compares what is actually written. If shaping fails, nothing is written and it returns 1 with an::error::..github/workflows/ci-gate.yml: the embedded REST layer, regenerated byte for byte from the script (the existing test fails if they differ).scripts/ci-gate-publish.sh:clip()delegates tostatus_description(one sanitiser).tests/ci-gate-api.sh(already wired incode-hygiene-self-test.yml): cases for the emoji-led name, ASCII identity, BMP non-ASCII (é,✓),LC_ALL=C, a 200-character cut (140, valid UTF-8), an emoji-only name (??), and the skip compare; plus a mutant for the shaping. The existing "standing status is not rewritten" mutant is re-aimed at the new line.Departure from the brief, reported: non-BMP characters become
?(the estate's existing, tested convention in the publisher and tamper status) rather than being removed, so🟡 CHECK: ...reads? CHECK: ....Verification
bash tests/ci-gate-api.sh: 140 passed, 0 failed (including mutants)bash tests/ci-gate.sh: 830 passed, 0 failedbash tests/ci-gate-tamper-guard.sh: 159 passed;bash tests/composite-shell-contract.sh: 28 passedConsumers pin ci-gate.yml by SHA; they need an actions.lock bump after merge (not done here).
Generated by Claude Code