Skip to content

fix(ci-gate): strip 4-byte Unicode from status descriptions - #144

Closed
hyperpolymath wants to merge 19 commits into
mainfrom
claude/intelligent-johnson-i64bfk
Closed

hyperpolymath wants to merge 19 commits into
mainfrom
claude/intelligent-johnson-i64bfk

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Targets main. #139 squash-merged as 4e9e680; main was merged into this branch (85fd282), so the diff against main is only this fix (4 files). The merged tree is identical to 09878f2's, the commit consumers are currently pinned to. The repo has no PR template, so the headings below are my own.

Bug

ci-gate.yml posts the commit status CI/gate. On workflow_run / in_progress its first step posts a pending status whose description includes the run name. Consumer workflow names contain emoji (🔴 GATE: Invisible Character Detection, 🟡 CHECK: Groove Protocol Compliance). GitHub's statuses API rejects any description with a 4-byte UTF-8 character ("Description doesn't accept 4-byte Unicode"), the step exits 1, and the failure handler posts CI/gate = failure. That is a false red that can stand until the 15-minute sweep. Seen on hyperpolymath/resource-algebra#48. main still has this bug until this PR merges.

Fix

Every codepoint above U+FFFF is stripped from the description BEFORE the 140-codepoint cap, with the regex-free expression

explode | map(select(. <= 65535)) | implode

I chose it over gsub("[\\x{10000}-\\x{10FFFF}]"; ""). Both pass on every jq tested, but the explode/implode form needs no regex engine, so jq 1.6's regex quirks cannot affect it.

Chokepoint. post() in scripts/ci-gate-publish.sh is the only place the publisher writes a status. That covers the verdict descriptions (proofs.yml:Proofs verdict-style check names), die(), the "runs still changing" and "gave up" texts, and the sweep, which calls the publisher. clip() (used by post()) now strips, then truncates, and defines the expression once as BMP_ONLY. The "already standing" dedupe compares the cleaned text.

The one second copy. The workflow's early pending is the first step, before any suite file is fetched, so it cannot call clip() and carries the same expression inline. tests/ci-gate.sh asserts the workflow line contains the publisher's BMP_ONLY text exactly. The static failure post (ci-gate could not produce a verdict ...) is fixed ASCII. No other file writes statuses.

docs/CI-GATE.adoc notes the rule. The repo has no CHANGELOG.

jq versions verified

1.6, 1.7, 1.7.1, 1.8.0, 1.8.1 (static binaries from jqlang releases), under LC_ALL C, POSIX and C.UTF-8. tests/ci-gate.sh runs every jq-* in CI_GATE_JQ_DIR when set. Otherwise it prints a note that only the system jq is exercised.

Test evidence

  • tests/ci-gate.sh: 595 passed, 0 failed with all five extra jq binaries plus system jq 1.7, re-run after the merge from main. 555 passed, 0 failed with the system jq only.
  • Before the fix (parent tree plus the new tests, in an isolated copy): 558 passed, 37 failed. Every failure is a new assertion.
  • Negative control: the OLD expression keeps the emoji, asserted to contain a 4-byte character on every jq tested. This shows the test can see the bug.
  • Cases: 🔴 and 🟡 run names; a 125-char name followed by emoji and a long tail (at most 140, no byte 0xF0-0xF7); BMP text (é, 中, ✓, …) preserved; an emoji-named failing required check through the publisher and the fake gh (posted description clean, still names the check).
  • tests/ci-gate-tamper-guard.sh: 125 passed, 0 failed (after the merge).
  • Lock gates (mikefarah yq 4.44.3): proven-lock-gate.sh, workflow-lock-scope.sh, lock-pin-contract.sh, gate-action-owners.sh pass; composite-shell-contract.sh 28/0.
  • shellcheck 0.10.0: no new finding in ci-gate-publish.sh. actionlint 1.7.7 on ci-gate.yml: only pre-existing reports.

Gate files / tamper guard

This touches gate files (.github/workflows/ci-gate.yml, scripts/ci-gate-publish.sh, tests/ci-gate.sh). Now that the guard is on main, it requires the gate-change-approved label from an admin. Agents do not apply that label.

Consumer re-pins

Already open, pinned to 09878f2 (this fix on #139's old head):

After this PR squash-merges, each consumer needs one more re-pin, to that squash commit on main. Check that BMP_ONLY is in scripts/ci-gate-publish.sh and in the early-pending line of ci-gate.yml at the target. Pinning 4e9e680 (#139's squash) alone would bring the false red back.

Related

What is NOT proven

  • Not exercised live against GitHub's statuses API; the 4-byte rejection is taken from the reported error, and the fake gh only checks what would be posted.
  • Only the jq versions listed were tested, on linux amd64.
  • The verdict script still does its own 140-char cut before the publisher strips, so an emoji-heavy description can end up slightly shorter than 140; it never exceeds it.
  • Commit signatures carry an SSH signature block, but they could not be verified locally (no allowed-signers file in this environment).

Generated by Claude Code

claude and others added 18 commits November 17, 2026 02:17
…ontrols

Adds a swappable interim `CI/gate`: a reusable workflow (workflow_call, job id
gate, no actions, no secrets) that publishes one commit status for the head
commit of a completed workflow_run; a pure bash+jq verdict script; a profile
validator; per-repository required-check profiles for resource-algebra,
mathesis and rsr-template-repo; a caller template; tests/ci-gate.sh wired into
the code-hygiene self-test; and docs/CI-GATE.adoc with the workflow acceptance
contract.

Fail closed: a required check that never reported is a failure, skipped and
neutral are not passes, only github-actions check runs count, and a missing or
invalid profile is a failure.

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

validate.jq: parenthesise the forbidden-name binding in check_name. An unparenthesised
`... and . as $c | ...` binds the whole `and` chain on jq 1.8, so every negative passed.
Audited every other `as` in validate.jq, the validator script and the verdict.

Verdict source: jobs (filter=latest) of the kept workflow runs, not check runs. Runs of the
gate itself are dropped, the newest run per (workflow_id, event) is kept, and EVERY job of a
required name must succeed. Rule order: a non-success required job fails at once; else any
active run is pending (timeout fails); else a name with no job fails; else success. The
kept runs go to jq by file, not argv (real runs overflow the argument list).

Caller template triggers on completed and in_progress so a rerun replaces a stale success
with pending. Profiles: add the renamed in-workflow aggregators `Proofs verdict`
(resource-algebra#41) and `Proven suite verdict` (mathesis#101); they exist once the
consumer rename PRs merge. Tests: 204 checks, fixtures moved to the jobs shape.

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

Profiles are schema_version 2: each required check is {job, workflow}, the job display name
and the workflow file that produces it. A display name made by two workflows (the
Empty-linter gate) is two entries, so a second producer that never ran is a failure
("never reported: <file>:<job>"). The validator rejects schema 1, bad or traversing
workflow paths, missing or extra members, duplicate pairs and unsorted entries. The three
shipped profiles are migrated from the real run paths read at the two commits each.

Rule (b): any workflow run of the commit but the gate's own, kept or superseded, that is
active makes the verdict pending, so a rerun of an older run is watched. The timeout clock
uses the oldest kept or active run. Job verdicts still come only from kept runs' latest
attempt jobs. Run paths are read from the runs, jobs carry the run tag.

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

scripts/ci-gate-publish.sh now owns reading, evaluating and publishing (gh on PATH only, so
a stub drives it). On an in_progress event it first writes pending ("re-run started: ...").
It fingerprints the runs of the SHA (id, status, conclusion, run_attempt, updated_at, gate's
own excluded), evaluates, re-reads the runs just before the POST and re-evaluates if they
moved (5 rounds, then pending "runs still changing", never success). This covers every
state, so a late evaluator cannot leave a stale pending or failure either. API errors post a
failure status.

The caller template loses its concurrency block (serialising per SHA delayed the in_progress
caller behind a running evaluation that then wrote a stale success). Docs state the residual
window between the last check and the POST and why the status still converges.

Tests: a stub gh with canned runs per call, canned jobs and a POST log; 283 checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDg8YzLVHtwwDfcY3J9
The code-hygiene gate treats the whole word STUB as an untracked debt
marker. The publish controls used $STUB for the fake `gh` directory,
which failed the gate on 25dfaa9. Rename the variable; no behaviour
changes. tests/ci-gate.sh: 283 passed under jq 1.7.1 and 1.8.1, and
actions/code-hygiene-check/check.sh passes locally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDg8YzLVHtwwDfcY3J9
The workflow's first step after input validation writes `pending` ("re-run started: ...")
for an in_progress event, before any suite file is fetched. The publisher no longer writes
that itself. After each status POST it re-fetches the runs and recomputes the fingerprint;
if the runs moved it re-evaluates and writes again, within the same bound of 5 rounds, and
the last write of an unsettled gate is pending "runs still changing".

Docs state the residual limit plainly: commit statuses are last-writer-wins with no
compare-and-swap, so a delayed evaluator can briefly publish a stale state, success
included. The bound is the next evaluator, normally seconds; full elimination needs a
compare-and-swap the statuses API lacks and is deferred to the A3 estate-gate.

Tests: a deterministic pause control (a newer pending lands just before the evaluator's
POST, then verification corrects it), the verification bound, and a static step-order
check. 290 checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDg8YzLVHtwwDfcY3J9
Commit statuses are last-writer-wins. A delayed evaluator can leave a
stale success (fail-open, until some later evaluator writes) or a stale
pending (fail-closed, until a workflow on the commit is re-run). The
previous text claimed eventual correctness "normally within seconds",
which the design does not guarantee. Documentation only; the reusable,
the scripts and the tests are unchanged.

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

Three statements contradicted the residual limit: docs/CI-GATE.adoc said
`completed` settles the verdict and that a late evaluator cannot leave a
stale pending or failure; the publisher header and the caller template
repeated it. Statuses are last-writer-wins, so the guard and the
verification narrow the window for a stale write of any state but do not
close it. Comments and docs only; the behaviour is unchanged.
tests/ci-gate.sh: 290 passed under jq 1.6 and 1.8.1; the hygiene check
and actionlint pass.

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

- ci-gate.yml: also runs on schedule and workflow_dispatch. Those events sweep the
  open pull request heads and the default branch head (scripts/ci-gate-sweep.sh),
  running the same guarded publisher once per distinct SHA, capped at 100 with a
  loud warning above it; a failure on one SHA does not stop the others and the job
  is red at the end if any SHA failed or errored. Needs pull-requests: read.
- templates/ci-gate-caller.yml: workflow_run + schedule (7,22,37,52) +
  workflow_dispatch, pull-requests: read.
- The suite gates itself: .github/workflows/ci-gate-caller.yml (local reusable,
  context "CI / gate") and profiles/ci-gate/hyperpolymath/proven-cicd-and-workflows.json.
  The lock-scope guard now accepts a local reusable workflow reference only when it
  is a plain file under .github/workflows that exists and is in the scope inventory,
  and inspects its own references; three new mutants cover the refusals.
- docs/CI-GATE.adoc: Sweep, Residual limit (no guarantee, no bound), Bootstrap.
- tests/ci-gate.sh: 353 checks, including the sweep controls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDg8YzLVHtwwDfcY3J9
… ref-qualified run paths

- Context guard admits single interior spaces (CI / gate), capped at 128
  characters; the validation step and the failure fallback carry the
  identical guard.
- post() (die() included) skips a POST that repeats the standing status for
  the context (same state and description); a failed or malformed read
  writes anyway. Bounds repetition toward GitHub's 1000-status cap; does not
  remove it.
- Pass each workflow run record to jq through a file (--slurpfile) so a run
  above 128 KiB cannot overflow one argv string.
- Strip an @<ref> suffix after .yml/.yaml from run paths before comparing
  with a profile entry; the profile side still rejects it.

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

The gate can now be called from a pull_request workflow as well as workflow_run:
the head SHA is resolved from either; a pull_request run polls (bounded) while the
verdict only means not finished (pending, never reported, never completed) and
then gives the unchanged verdict; on timeout it fails naming what is missing.
Adds the gate tamper guard (pull_request_target, reads the API only) that fails a
pull request touching gate files unless the owner applied gate-change-approved
after the newest commit. Tests: ci-gate.sh 446 -> 472, ci-gate-tamper-guard.sh 70.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDj7XpKyxE4WbsgTsTh
…el env (startup failure)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDj7XpKyxE4WbsgTsTh
… and count renamed files once in tamper guard

<!-- coderabbit-ai-generated:v1 -->
The label counts only if the actor of its latest labeled event holds admin
(GET repos/{repo}/collaborators/{login}/permission, .permission == "admin").
A write or maintain actor, a missing actor, a malformed login, an API error
or an unexpected answer all fail closed. Tests cover admin, write, maintain,
read, 404, API error, no actor, bad login, and latest-event-decides; the
guard workflows get a no-interpolation-in-run check and a single-default
check for the APPROVAL_LABEL name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDg8YzLVHtwwDfcY3J9
…p PR waits, and handle tamper guard edits and dot-prefixed repos

<!-- coderabbit-ai-generated:v1 -->
… test the dot-prefixed coordinate, cache and quota paths

f6e8548 widened the tamper guard's REPO regex to [A-Za-z0-9_.-]+, which let
a/. and a/.. through, and left the same coordinate check unchanged in
ci-gate.yml (REPO, WF_REPO), ci-gate-tamper-guard.yml (WF_REPO) and the
profile validator, so example/.github was still refused there.

- one coordinate rule: owner [A-Za-z0-9][A-Za-z0-9-]*, name [A-Za-z0-9_.-]+,
  name not "." or "..", in the guard, both workflows, validate.jq, and now
  the publisher and the sweep (they used the value in a profile path
  unchecked)
- tests: coordinate matrix (a/b/c, /x, a/, a/., a/.., empty, ../x, spaces)
  against the guard, the workflow validation step (extracted from the YAML),
  the publisher, the sweep and the validator; example/.github end to end
  through the profile fetch and the publisher; dotglob so a shipped
  .github.json profile is checked
- tests: quota that resets inside the wait sleeps to the reset and goes on;
  an unreadable rate limit fails closed; 20 kept runs over 48 polls read
  each completed run's jobs once

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDg8YzLVHtwwDfcY3J9
…re the 140-character cap

GitHub's statuses API rejects a description holding any codepoint above U+FFFF
("Description doesn't accept 4-byte Unicode"). The early pending on a
workflow_run in_progress event put the run name, emoji included, into the
description; the step exited 1 and the failure handler then posted CI/gate =
failure, a false red that could stand until the 15-minute sweep.

post() in ci-gate-publish.sh is the one place the publisher, the sweep, die()
and every verdict description pass through; clip() now strips before it
truncates. The workflow's early pending runs before any suite file exists, so
it carries the same regex-free expression (explode | map(select(. <= 65535)) |
implode, checked on jq 1.6, 1.7, 1.7.1, 1.8.0 and 1.8.1). tests/ci-gate.sh reads
both out of the shipped files, asserts they match, and covers a 4-byte-free,
at-most-140 result, the long-name boundary, a negative control on the old
expression, and an emoji-named failing check through the fake gh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDiRggj6apeRQKPpAVR
@hyperpolymath
hyperpolymath marked this pull request as ready for review November 18, 2026 01:13
hyperpolymath pushed a commit that referenced this pull request Nov 18, 2026
Replace the gsub("[\\x{10000}-\\x{10FFFF}]"; "") strip with the canonical
expression shipped in #144, explode | map(select(. <= 65535)) | implode. It is
applied before the 140-character cap, exactly as before.

There is no behaviour change: both forms drop every codepoint above U+FFFF, and
they were tested equal on jq 1.6, 1.7, 1.7.1, 1.8.0 and 1.8.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDiRggj6apeRQKPpAVR
hyperpolymath pushed a commit that referenced this pull request Nov 18, 2026
Replace the gsub("[\\x{10000}-\\x{10FFFF}]"; "") strip with the canonical
expression shipped in #144, explode | map(select(. <= 65535)) | implode. It is
applied before the 140-character cap, exactly as before.

There is no behaviour change: both forms drop every codepoint above U+FFFF, and
they were tested equal on jq 1.6, 1.7, 1.7.1, 1.8.0 and 1.8.1.

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

Copy link
Copy Markdown
Owner Author

CI / gate failed on 09878f2 with "never reported: main-estate-audit.yml:governance, …:hygiene, …:languages, …". This comes from where the PR is stacked, not from the change.

Every check that did run passed: Composite shell contract, Gate controls, Proven lock gate, SQ map, the controls, secret scans, SonarCloud, Semgrep and GitGuardian. Locally, tests/ci-gate.sh passes 595 of 595 on jq 1.6, 1.7, 1.7.1, 1.8.0 and 1.8.1.

The gate becomes meaningful for this change once it is evaluated against main: after #144 merges into #139's branch and #139 targets main, or if this PR is retargeted to main after #139 lands. Nothing to push here.


Generated by Claude Code

Base automatically changed from claude/sweet-edison-yp088x to main November 18, 2026 02:18
#139 squash-merged as 4e9e680, whose tree is identical to this branch's old
base 58c680e. The add/add conflicts come from the merge base (9eb0bbf)
predating those files; every conflicted file takes this branch's version,
so the merged tree equals 09878f2's exactly and the diff against main is
only the fix (4 files).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDiRggj6apeRQKPpAVR
@hyperpolymath hyperpolymath changed the title fix(ci-gate): strip 4-byte Unicode from status descriptions (stacked on #139) fix(ci-gate): strip 4-byte Unicode from status descriptions Nov 18, 2026
@sonarqubecloud

Copy link
Copy Markdown

Repository owner deleted a comment from coderabbitai Bot Nov 18, 2026
hyperpolymath added a commit to hyperpolymath/rsr-template-repo that referenced this pull request Nov 18, 2026
… descriptions) (#450)

## Summary

Re-pins the CI gate reusable workflow from
`d2140a5a789e4ebec52f1bab0074181012660c3b` to
`09878f2a2c0a8907cc69fe48973ea604753ecab1`
(hyperpolymath/proven-cicd-and-workflows#144). The old pin posts
`CI/gate = failure` falsely when a workflow name contains an emoji,
because GitHub rejects 4-byte UTF-8 in a status description. That false
red was seen on hyperpolymath/resource-algebra#48.

`09878f2` is a commit on an UNMERGED suite branch (#144 is stacked on
#139), as `d2140a5` was. A second re-pin therefore follows #139's squash
merge.

This PR touches gate files, so the tamper guard may fail `guard / check`
until an admin applies the `gate-change-approved` label. Agents do not
apply it.

## Changes

- `.github/workflows/ci-gate.yml` (2 `uses:` lines) and
`.github/workflows/ci-gate-tamper-guard-caller.yml`: new SHA; `#
cicd-suite ...` comments kept.
- `.github/workflows/actions.lock`: workflow entries, dependency key and
`commit: sha1-...` record.
- `tests/workflows/squabble_gate_test.sh`: `SUITE_PIN`.
- `CHANGELOG.adoc`: new entry under Unreleased / Fixed. The older entry
mentioning `d2140a5` is history and untouched.
- The branch has two signed commits: the re-pin and a follow-up that
fixes blank-line placement in the CHANGELOG entry (no force-push was
allowed). Squash on merge.

## RSR Quality Checklist

### Required

- [x] Tests pass (the workflow tests listed below)
- [ ] Code is formatted / linter: not run, no source changed
- [x] No banned language patterns
- [x] No `unsafe` blocks, no banned functions
- [x] SPDX license headers untouched
- [x] No secrets, credentials, or `.env` files included

### As Applicable

- [x] `CHANGELOG` or release notes updated

## Testing

Run locally, all exit 0:

- `scripts/check-lock-sync.sh`: in sync and closed.
- `tests/workflows/squabble_gate_test.sh`: 166 passed, 0 failed.
- `tests/workflows/check_lock_sync_test.sh`: 137 PASS lines.
- `tests/workflows/lock_sync_fix_test.sh`: all cases passed.
- `tests/workflows/validate_workflows_test.sh`: 87 PASS lines.
- `tests/workflows/workflow_edges_test.sh`: 90 checks passed.

## What is NOT proven

- The emoji fix in a live run: only visible once `CI/gate` runs on this
PR.
- That `09878f2` survives the squash merge of #139.
- `actionlint` and `just test && just quality` were not run.
- This is a template repo: whether minted repos pick up the new pin was
not checked.

## Screenshots

N/A

---
_Generated by [Claude
Code](https://claude.ai/code/session_01J4QvDiRggj6apeRQKPpAVR)_

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Chores**
* Updated the CI gate and tamper-guard workflows to use a newer pinned
version.
* Updated the related workflow checks and changelog to reflect the new
version.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude <noreply@anthropic.com>

Copy link
Copy Markdown
Owner Author

Closing as superseded by #148, on the owner's decision.

#148's gate_sanitize in scripts/ci-gate-lib.sh covers everything this PR does:

  • every status write goes through one function;
  • it uses the same regex-free explode | map(select(. <= 65535 …)) | implode, and also drops lone surrogates;
  • it caps the description at 140 codepoints without splitting a character.

#148 also removes the early-pending step, so the inline second copy this PR had to carry is no longer needed. Both PRs edit the same four files, so landing both would mean reconciling two implementations of one rule.

Until #148 merges, main (#139's squash 4e9e680) still posts a false CI/gate failure for runs whose names contain emoji. Consumers currently pinned to 09878f2 (this branch's fix commit) keep the fix. The branch stays on the remote so that pin remains reachable until the consumer re-pin round to #148.

The tests here (595/0 on jq 1.6 to 1.8.1, including the negative control on the old expression) may be worth porting into #148's tests/ci-gate.sh if its sanitiser cases don't already cover the early-pending path and the emoji-named failing check.


Generated by Claude Code

hyperpolymath added a commit to hyperpolymath/mathesis that referenced this pull request Nov 18, 2026
… descriptions) (#116)

## Summary

Stacked on #112 (`claude/ci-gate-pr-start`). Re-pins the CI gate
reusable workflow to `09878f2a2c0a8907cc69fe48973ea604753ecab1`
(hyperpolymath/proven-cicd-and-workflows#144), which stops a false
`CI/gate = failure` when a workflow name contains an emoji (GitHub
rejects 4-byte UTF-8 in a status description; seen on
hyperpolymath/resource-algebra#48).

Unlike the other consumers, this branch did not pin `d2140a5`. The two
callers pinned `d49708186e72...` (an ancestor of `09878f2`), while
`actions.lock` and the test fixture still held `0862fe8b4001...`, so
`scripts/check-lock-sync.sh` already failed on the base (exit 1: tamper
guard unlocked, `ci-gate.yml` ref missing, stale entry). Both callers
use the same suite reusables, so all of it moves to `09878f2`.

`09878f2` is a commit on an UNMERGED suite branch, so a second re-pin
follows #139's squash merge.

This PR touches gate files, so the tamper guard may fail `guard / check`
until an admin applies the `gate-change-approved` label. Agents do not
apply it.

## Changes

- `ci-gate.yml` (2 lines) and `ci-gate-tamper-guard.yml` (1 line): new
SHA, `# cicd-suite ...` comments kept.
- `actions.lock`: `ci-gate.yml` entry and dependency record moved to the
new SHA (stale `0862fe8` dropped); new key for
`ci-gate-tamper-guard.yml`, which was missing.
- `tests/workflows/squabble_gate_test.sh`: `SUITE_PIN` fixture value.
- `CHANGELOG.adoc`: new entry.

## RSR Quality Checklist

### Required

- [x] Tests pass (the workflow tests listed below)
- [ ] Code is formatted / linter: not run, no source changed
- [x] No banned language patterns, no `unsafe`, no banned functions
- [x] SPDX license headers untouched
- [x] No secrets, credentials, or `.env` files included

### As Applicable

- [x] `CHANGELOG` or release notes updated

## Testing

Run locally:

- `scripts/check-lock-sync.sh`: exit 0 (exit 1 on the base branch).
- `tests/workflows/squabble_gate_test.sh`: 102 passed, 0 failed.
- `tests/workflows/check_lock_sync_test.sh`: 26 PASS lines, exit 0.
- `tests/workflows/validate_workflows_test.sh`: 83 PASS lines, exit 0.
- `tests/workflows/archetype_lock_merge_test.sh`: SKIPPED by the script
itself (no `archetypes/` in a minted repo).

## What is NOT proven

- The emoji fix in a live run.
- That `09878f2` survives the squash merge of #139.
- That the hand-added lock key for the tamper guard matches what GitHub
resolves at startup; only the local sync checker was run.
- `actionlint` was not run.

## Screenshots

N/A

---
_Generated by [Claude
Code](https://claude.ai/code/session_01J4QvDiRggj6apeRQKPpAVR)_

Co-authored-by: Claude <noreply@anthropic.com>
hyperpolymath added a commit to hyperpolymath/rsr-template-repo that referenced this pull request Nov 19, 2026
…g context input (#451)

## Scope change

This PR used to re-pin the suite gate from `d2140a5` to `4e9e680`.
`main` has since been re-pinned to `09878f2` by #450, which adds the
emoji-safe status descriptions from
hyperpolymath/proven-cicd-and-workflows#144. Merging the old re-pin
would have dropped that fix.

So I merged `main` into this branch and took `main`'s side of every
conflict. The tree was identical to `main` after that merge. The PR now
carries one commit, which fixes the checker.

## Change

The checker now requires the local reusable to declare
`on.workflow_call.inputs.context` with `type: string`
(`scripts/check-required-contexts.sh`, `localTargetError`).

The caller passes `with.context`, and GitHub refuses an input that the
called workflow does not declare. Before this fix the checker accepted a
local target that declared only `on.workflow_call`, or the list or
string forms, which cannot declare inputs at all. Such a target could
never publish the required status. CodeRabbit raised this on
hyperpolymath/mathesis#106, and the same fix is pushed there.

Changes to the tests:
- The positive local fixtures now declare the input.
- New negative tests cover:
  - no `inputs` at all;
  - the list form;
  - the string form;
  - `inputs` without `context`;
  - a `context` input that is not a string;
  - a `context` input with no type.
- The path-traversal and self-call fixtures use the valid `on` block, so
each fails for its own reason only.

## Proven (local runs)

- `tests/workflows/squabble_gate_test.sh`: 172 passed, 0 failed.
- Control, the new tests run against the old checker: 165 passed, 7
failed. The 7 failures are exactly the new negative tests.
- `scripts/check-required-contexts.sh .` on this repository: OK.

## Not proven

- CI on this head is still pending.
- Re-pinning to #144's squash commit after it merges is left to the
session that owns #144.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01J4QvDg8YzLVHtwwDfcY3J9

---------

Co-authored-by: Claude <noreply@anthropic.com>
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.

3 participants