Skip to content

fix(ci-gate): drop 4-byte characters from status descriptions - #149

Closed
hyperpolymath wants to merge 1 commit into
mainfrom
claude/sweet-edison-yp088x
Closed

hyperpolymath wants to merge 1 commit into
mainfrom
claude/sweet-edison-yp088x

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Root cause

GitHub's statuses API rejects any description that contains a 4-byte UTF-8 character. It returns gh: Validation failed: Description doesn't accept 4-byte Unicode. Some required job names contain an emoji, for example 🔴 GATE: …. For those jobs the publisher's POST failed, so no CI/gate verdict was posted on hyperpolymath/resource-algebra#55 or hyperpolymath/rsr-template-repo#451.

Change

  • scripts/ci-gate-publish.sh: clip() now drops every code point above U+FFFF before it clips the description to 140 characters. Every POST goes through clip().
  • tests/ci-gate.sh: the fake gh now rejects 4-byte descriptions, as GitHub does. New tests rename the profile job to 🔴 Test and check four things:
    • a failure verdict is published, not refused;
    • the description names Test (failure);
    • no 4-byte character is posted;
    • a pending verdict is published.

Proven, by local runs

Suite jq version Result
ci-gate, new tests against the old clip() 544 passed, 2 failed (the control: the new tests catch the bug)
ci-gate 1.6, 1.7.1, 1.8.0, 1.8.1, and the system jq 546 passed, 0 failed
ci-gate-tamper-guard 125 passed, 0 failed

Not proven

  • The fix has not yet run against the live GitHub API. That happens after merge, when the callers are re-pinned to the new squash commit.
  • I did not run actionlint or the lock-scope checks. This PR changes no workflow or actions.lock.

After merge

Re-pin the callers from 4e9e680 to the new squash commit:

  • resource-algebra, in a new PR;
  • rsr-template-repo#451;
  • mathesis#106.

Generated by Claude Code

GitHub's statuses API refuses a description holding any 4-byte UTF-8
character ("Description doesn't accept 4-byte Unicode"). Required job
names can carry one (e.g. "🔴 GATE: ..."), so the publisher's POST
failed and no CI/gate verdict was posted on resource-algebra#55 and
rsr-template-repo#451.

clip() now drops every code point above U+FFFF before the 140-character
clip. The test fake gh rejects 4-byte descriptions as GitHub does, and
new cases cover failure and pending verdicts for an emoji job name.

Tests: ci-gate 546/0 on jq 1.6, 1.7.1, 1.8.0, 1.8.1 and system jq
(old clip: 544/2); ci-gate-tamper-guard 125/0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDg8YzLVHtwwDfcY3J9
@coderabbitai

coderabbitai Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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 7 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 21696eb0-c890-4da2-b816-5c399a5cb174
Commits

Reviewing files that changed from the base of the PR and between 4e9e680 and 7c33c14.

Files selected for processing: 2

  • scripts/ci-gate-publish.sh
  • tests/ci-gate.sh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@sonarqubecloud

Copy link
Copy Markdown

Copy link
Copy Markdown
Owner Author

I'm closing this PR as a duplicate of #144, which fixes the same root cause: GitHub rejects 4-byte Unicode in status descriptions.

#144 is the better fix to land:

  • it is already merged up to main (4e9e680);
  • it also updates ci-gate.yml and docs/CI-GATE.adoc;
  • its commit 09878f2 is already pinned on rsr-template-repo main (#450) and in the re-pins RA#54 and mathesis#116.

This branch adds nothing that #144 lacks, apart from trimming one cosmetic leading space after a stripped emoji.


Generated by Claude Code

hyperpolymath pushed a commit that referenced this pull request Nov 18, 2026
…o this branch can be pushed without force

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDg8YzLVHtwwDfcY3J9
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.

2 participants