Repository navigation
fix(ci): wake the PR gate when attribution-approved is applied - #7698
Conversation
The enforce gate's resolve-pr job woke on labeled/unlabeled events only for an allowlist that omitted attribution-approved, although pr-hygiene.cjs lists it in HYGIENE_GATE_LABELS and the carry-attribution check honors it. Applying the label re-ran hygiene but left READY/DRAFT stale until an unrelated event. Add the label to the resolver condition and derive the test's expected wake labels from HYGIENE_GATE_LABELS so the two lists cannot drift again. Closes #7651
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. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Resolver label alignment .github/workflows/enforce-pr-target.yml, tests/ci-workflows/ci-workflows.test.ts, structure/ops/docs-and-release.md |
The resolver allowlist includes attribution-approved. The test checks for duplicate resolver labels and requires an exact match with HYGIENE_GATE_LABELS plus gui-screenshot-waived. The workflow documentation records the event labels and the alignment test. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested labels: bug
Suggested reviewers: luvs01
Merge Risk: 
Minimal · up to 73e81
-
The label wake-up change and its alignment test are ready to merge, subject to normal CI validation.
Pre-merge checks: 
5
-
Full details: Linked Issues check
-
Explanation
Issue
#7651requires theresolve-prjob to wake whenattribution-approvedis applied and requires coverage that keeps the wake list aligned withHYGIENE_GATE_LABELS..github/workflows/enforce-pr-target.ymladdsgithub.event.label.name == 'attribution-approved'to the resolverif:condition.tests/ci-workflows/ci-workflows.test.tsextracts all resolver label literals, rejects duplicates, and compares them withHYGIENE_GATE_LABELSplusgui-screenshot-waived. The changed behavior and the required alignment test are present in the whole-PR diff.
Full details: Out of Scope Changes check
-
Explanation
The pull request changes only the resolver label condition, its alignment test, and the corresponding row in
structure/ops/docs-and-release.md. The test and documentation directly support issue#7651. No unrelated implementation, permission, trigger, or job changes appear in the whole-PR diff.
Full details: Docstring Coverage
-
Explanation
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. (2 skipped: 2 unsupported.)
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- 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.
Comment @coderabbitai help to get the list of available commands.
|
✅ Deterministic PR hygiene checks passed. |
Local CI-equivalent (Linux) at 73e8133PASS under the temporary base-identical exception; raw failed exits are retained below. Host Environment: Selectors: ci=True, GUI=False, docs=False, structure=True. The requested direct structure check runs as well.
Test-file coverage: 2600/2600 general files, no gaps/duplicates:
Every batch uses
Combined command counts: 55872 pass / 0 fail / 173 skip. Failed command/batch exits stay failed. Failures:
Base command ledger (once per base/runtime/file or exact batch, cached across these PRs):
NOT RUN: gates/GUI lint: GUI selector false; gates/GUI build: GUI selector false; gates/Record dashboard preview source: GUI selector false; docs-site-build: docs selector false; GitHub Actions checkout/setup/upload-artifact infrastructure and other platform/job legs outside this assignment; checkout, Bun role setup and dependency artifacts are reproduced locally Fresh final PR head Exact per-batch file lists, exits and logs:
UTC: 2026-10-24T23:03:14.774395+00:00 |
|
Integration evidence (owner lane M1, maintainer integration): independent gpt-6.1-sol review PASS at 73e8133. Exact-head PR CI run 40120616593 succeeded and exact-head ci.yml lane=all run 40120620564 (workflow_dispatch) succeeded. Static merge simulation on current dev 26598df (this Mac): dev=26598df2c4c07d781e344ac6119953fed77ecb27 base=26598df2c4c07d781e344ac6119953fed77ecb27 pr_files= 3 overlap=[]; merge clean; install exit=0; gui install exit=0; tsc exit=0; tsc doctor exit=0; structure:check exit=0; privacy:scan exit=0; layout+ratchet guards exit=0 52 pass 0 fail ; Merged by the triage manager as maintainer integration (MAINTAINERS.md, dev only) with green exact-head PR CI, an independent review PASS, and the owner's approval of this bundle. |
macOS real-machine CI-equivalent verification (round 2, owner lane mac3)Result: PASS. Full macOS coverage. No INTRODUCED failures. One control-leg test failed once; it does not reproduce on this head or on dev (details below).
The shard legs cover 869 + 869 + 869 = 2607 files, which equals the control's membership. Failures and classification
NOT RUN: macOS keyring, npm-global, setup-action, and remote-helper legs (not selected for this diff). A signed or Xcode-backed widget build is not possible on this host. No changes, pushes, approvals, or merges were made. |
Summary
The enforce gate's
resolve-prjob wakes onlabeled/unlabeledevents only for an allowlist of label names, and that list left outattribution-approved..github/scripts/pr-hygiene.cjslists the label inHYGIENE_GATE_LABELS(labels that can clear or reinstate a hygiene failure), andpr-carry-attribution.cjshonors it to clearmissing_coauthor_credit. When a maintainer applied it, PR hygiene re-ran and cleared its failure, but the gate never re-evaluated, so READY/DRAFT stayed stale until some unrelated event..github/workflows/enforce-pr-target.yml: addgithub.event.label.name == 'attribution-approved'to the resolver condition. No trigger, permission, or job change; the resolver keepscontents: read/pull-requests: read.tests/ci-workflows/ci-workflows.test.ts: replace the seven hand-listed label assertions with a check that the label literals in the resolverif:equalHYGIENE_GATE_LABELSplusgui-screenshot-waived(no duplicates). A label added to one list without the other now fails the test.structure/ops/docs-and-release.md: the enforce-pr-target row says which labels wake the gate and where they are pinned (same-line edit; the doc is at its 600-line cap).Closes #7651
Verification
All on head
73e8133cbe(based ondev26598df2c4), Bun 1.4.3 test runner:bun test tests/ci-workflows/ci-workflows.test.ts -t "exact allowlist"→ 0 pass / 1 fail (exit 1), diff shows onlyattribution-approvedmissing.bun test tests/ci-workflows/ci-workflows.test.ts tests/ci-workflows/file-size-ratchet.test.ts tests/test-layout.test.ts tests/test-layout-tooling.test.ts tests/ci-workflows/structure-ssot.test.ts→ 229 pass / 0 fail (exit 0).node --test .github/scripts/pr-hygiene.test.cjs .github/scripts/enforce-pr-target.test.cjs .github/scripts/pr-quality-messages.test.cjs→ 75 pass / 0 fail (exit 0).bun run typecheck→ exit 0.OCX_TEST_RUNNER_BUN=<bun 1.4.3> bun run test:changed→ 142 pass / 0 fail (exit 0).bun run privacy:scan→ passed (exit 0).bun run structure:check→ passed (exit 0).bun run test— shared host with several concurrent lanes; the change touches one workflow condition and one test, both covered by the focused files above. Left to CI.pull_request_targetworkflows load from the default branch, so the live behavior changes after promotion tomain.Checklist
Summary by CodeRabbit
Chores
attribution-approvedlabel.Documentation