Skip to content

refactor(ci): declare lane labels, markers and bot identity in one module - #18432

Merged
kyle-sexton merged 2 commits into
mainfrom
refactor/lane-vocabulary
Nov 23, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
refactor/lane-vocabulary

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

No related issue: candidate 5 of an /architecture:improve deepening pass over the CI lanes, run in a local session.

Summary

Label names, record markers, the Actions bot id (41898282, defined in 8 production files) and the lanes App login were re-declared in each module that used them, and each dispatcher and the merge arm kept its own set of hold labels. A rename had to find every copy.

Fix

  • New .github/scripts/lib/lane-vocabulary.mjs owns the label names, markers, ACTIONS_BOT_ID, the lanes App login and each caller's hold set as a named export (DISPATCH_HOLDS, FEEDBACK_HOLDS, SHARED_COPY_HOLDS, ARM_HOLDS, WIP_CAP_HOLDS), so the differences between them sit in one file. No value changes.
  • 22 scripts import it. merge-holds.mjs keeps LANES_APP_LOGIN, OUTSIDE_ACTOR_LABEL and PR_VERIFY_FAILED_LABEL and the module re-exports them, because pr-require-checks.yml:921 git shows that file into a directory alone, so it must stay import-free. admit, apply-verdict, reenter, flag and report-outcome re-export their old names, so their callers do not change.
  • humanGatedLabel is not unified: the three resolvers give different results (address-feedback.mjs:742 throws on an empty value and does not trim; merge-holds.mjs:1592 trims and falls back).
  • Trust paths: the module is a trust floor row (its importer enable-auto-merge is trust class); sync-hold-floor.py regenerated its copies and the floor pins moved. /.github/scripts/lib/lane-vocabulary.mjs joins the sparse lists in intake-triage.yml (check-born-triaged job) and pr-require-checks.yml's base_config. No job's base or head source changes.
  • work-resolve-issue/stop-routes.test.mjs copies stop-routes.mjs into a temp layout; it now copies lib/lane-vocabulary.mjs and pr-merge/merge-holds.mjs beside it so the copy resolves its imports. No assertion changes. No workflow copies that folder file by file; collect-base-activity copies all of lib/, and the write runner's apply-patch copy list needs no new file (write-runner-never-rules.test.sh 75 pass).
  • Left for a later stage: check-trusted-trigger.mjs's ACTIONS_BOT_ID, and resolve-config's dimensions.mjs, issue-status.mjs and write-status.mjs (resolve-config is a self-contained trust action with no ../../ imports).

Reasons kept from deleted comments

  • attended is the owner-present label (owner decision 2026-10-28) and only a listed human removes it.
  • github-iac GovernedRepositories.cs declares attended and host-run.
  • 41898282 is the GITHUB_TOKEN identity, with the same id in REST and GraphQL.
  • The shared-copy dispatch holds only on do-not-merge because it acts only while the gate label is on.

Verification

  • After merging current main: node --test --test-concurrency=4 over the touched and importer suites: 5380 pass, 0 fail. The new vocabulary pin test fails when a value changes and passes when restored.
  • Shell: ci-hold-lifted-by 79 pass, ci-lanes-pr-hold 358 pass, ci-hold-human-gated 81 pass. Python test_floor_paths OK; sync-hold-floor.py --check passes.

Follow-ups

  • Pre-existing (advisory): the resolve-conflicts and fix-docs dispatchers hold on a hard-coded needs-human, while fix-ci adds the configured baseHumanGatedLabel (dispatch.mjs:950-955); a repository whose human-gated label is not needs-human would not hold those two dispatches.

Related

Part of the .github deepening series.

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits November 23, 2026 00:24
…ds and bot identity

.github/scripts/lib/lane-vocabulary.mjs owns the Actions bot id, the
lane label names, the refinement marker and each caller's hold-label
set; the lanes App login and the outside-actor and pr-verify-failed
labels stay in merge-holds.mjs, which runs as a lone copy with no
imports, and the module re-exports them. Twenty-two scripts import it;
every value is unchanged.

The module is a trust-class hold-floor row (enable-auto-merge.mjs
imports it), and the sparse base checkouts of intake-triage's
check-born-triaged job and ci-status's hold config list it.

Reasons kept from deleted comments:
- attended is the owner-present label (owner decision 2026-10-28):
  only a listed human removes it.
- github-iac GovernedRepositories.cs declares the attended and host-run
  labels; host-run queues work for an unattended agent run on a host.
- github-actions[bot] (id 41898282) is the identity a job's
  GITHUB_TOKEN acts as; REST and GraphQL report the same id.
- The shared-copy refusal dispatch holds only on do-not-merge because
  it acts only while the human-gated label is on; the merge arm adds
  the tracker's human-gated label to its set itself.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep main's github-client and size-split imports beside this branch's
lane-vocabulary imports; regenerate the hold floor and repin its counts
and digests with the lane-vocabulary trust row added. stop-routes.test
now copies lane-vocabulary.mjs and merge-holds.mjs beside its module
copy, since stop-routes.mjs imports the vocabulary.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 23, 2026 12:19
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T12:21:28.514620Z 97708fa Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 97708fa4fb3f56feafa3bbe5a467b26b0ab425ab: read 35 of 35 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no findings

I read all 35 changed files in the diff. This refactor moves label names, record markers, the Actions bot id and the lanes App login into a new module, .github/scripts/lib/lane-vocabulary.mjs. I found no security issues.

Checks on the trust controls and merge holds:

  • Merge-arm hold set is unchanged.
    • enable-auto-merge.mjs HOLD_LABELS is now ARM_HOLDS, which is [DO_NOT_MERGE, PR_VERIFY_FAILED_LABEL, OUTSIDE_ACTOR_LABEL].
    • The new module re-exports those last two from merge-holds.mjs, and I checked their values there: PR_VERIFY_FAILED_LABEL = "pr-verify-failed" (merge-holds.mjs#L1616) and OUTSIDE_ACTOR_LABEL = "security: outside-actor" (#L1607).
    • The human-gated label is still appended at the call site (enable-auto-merge.mjs#L512).
  • Dispatcher hold sets are unchanged.
    • Same members as before: resolve-conflicts, fix-ci and fix-docs (DISPATCH_HOLDS), feedback (FEEDBACK_HOLDS), shared-copy (SHARED_COPY_HOLDS) and wip-cap (WIP_CAP_HOLDS).
    • No caller changes these lists in place. The fix-ci path builds a new array ([...new Set([...holdLabels, baseHumanGatedLabel(env)])], dispatch.mjs#L956). prHold and skipReason only call .includes.
    • Freezing the shared-copy list, which was a plain array before, can only make a write fail loudly. It widens nothing.
  • Identity constants are unchanged. Every 41898282 copy that was removed now comes from one ACTIONS_BOT_ID. who.mjs keeps it as a string through String(ACTIONS_BOT_ID). LANES_APP_LOGIN still comes from merge-holds.mjs, and no new login or id is trusted anywhere.
  • Hold floor gets tighter, not looser. The new module is added as a trust row in HOLD_PATH_CLASSES, in the pr-pipeline.yaml merge path classes and in the generated hold_patterns, so any later edit to it is classed like enable-auto-merge.mjs. The pin updates in the tests match one added row.
  • Base-config checkout. pr-require-checks.yml base_config now includes lane-vocabulary.mjs beside merge-holds.mjs (#L5631, #L5648), so base-sourced code still loads from the base commit. merge-holds.mjs still imports only Node built-ins, so the step that copies it into a directory alone (#L921) still works. If a checkout ever missed the file, the import would throw and stop the job; it would not drop a hold.
  • Other changes. The two hosted review workflows only add the path to their trusted-path lists. The intake-triage.yml sparse list only adds the file. No permission, trigger or token request changes, and no plugin manifest changes.

The only deleted text is code comments, not instructions to an agent, so the instruction-surface check does not apply. The PR description contains no embedded instructions to the review lane.

Spend: none. No lane runs, turn limits, schedules or billed resources change.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 97708fa4fb3f56feafa3bbe5a467b26b0ab425ab: read 35 of 35 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

The PR adds .github/scripts/lib/lane-vocabulary.mjs, a single home for the lanes' label names, record markers, the Actions bot id and each caller's hold set. 22 scripts now import from it. No value changes. I read every hunk of all 35 changed files and found nothing that meets the bar.

What I checked

  • Old and new values match. Every removed constant matches the value the new module gives it:
    • ACTIONS_BOT_ID is 41898282 in all the old copies.
    • who.mjs still yields the string "41898282" through String(ACTIONS_BOT_ID).
    • Each hold set is the same as before: DISPATCH_HOLDS for dispatch, fix-ci and fix-docs; FEEDBACK_HOLDS; SHARED_COPY_HOLDS; ARM_HOLDS (the old enable-auto-merge HOLD_LABELS); and WIP_CAP_HOLDS.
    • lane-vocabulary.test.mjs pins all of these values.
  • Re-exports. The old export names still resolve, so their importers do not change:
    • admit.mjs re-exports ACTIONS_BOT_ID, ATTENDED, HOST_RUN, NEEDS_DECISION, READY and REFINE_MARKER (used by refine.mjs, label-unblocked.mjs, resolve-pr.mjs and write-issue.mjs).
    • apply-verdict.mjs re-exports LANES_APP_LOGIN; reenter.mjs, flag.mjs, report-outcome.mjs and stop-routes.mjs re-export their old names too.
    • No file imports the same name from two modules.
  • Import-free merge-holds.mjs. lane-vocabulary.mjs imports merge-holds.mjs, which imports nothing, so there is no cycle. The isolated git show copy at pr-require-checks.yml#L921 still works. The step's comment says scripts/ci-early-queue-holds.test.sh covers it.
  • Copied or sparse layouts. Every layout that runs a changed module from a copy can resolve the new import:
    • collect-base-activity copies all of lib/ and pr-merge/merge-holds.mjs, which is what ../lib/lane-vocabulary.mjs → ../pr-merge/merge-holds.mjs needs.
    • The sparse lists in intake-triage.yml (check-born-triaged) and pr-require-checks.yml's base_config add the new file, and both already list merge-holds.mjs.
    • The apply-patch copy list in pr-run-activity-write.yml loads no changed module.
    • No other sparse checkout runs a changed module.
  • Hold-floor copies. The new trust row appears in pr-pipeline.yaml, merge-holds.mjs HOLD_PATH_CLASSES, both hosted review workflows' lists and the generated hold_patterns. The pin counts move by one each (trust 24→25, rows 159→160, high 94→95).
  • Deleted comments (REVIEW.md). The PR body's "Reasons kept from deleted comments" section keeps the decision reasons: attended is owner-only, github-iac declares host-run/attended, and the bot id is the same in REST and GraphQL. The other removed comments only described what a constant was for.
  • stop-routes.test.mjs. The temp layout now copies the new module and merge-holds.mjs beside stop-routes.mjs, and no assertion changed.

I did not run the tests. The pass counts in the PR body are the author's and unverified.

Closing issue: none. The PR says it has no related issue, so I checked no acceptance criteria.

Loosened checks: none. The changed test values in test_floor_paths.py, test_diff_risk.py and test_merge_holds_sync.py are floor pins re-pinned for one added held path, which makes the floor stricter. That makes them a pin or repin, which this criterion does not count as a loosening. The prompt gave no loosened-check settings, so I used the defaults, and I did not check the decision-record citation requirement. Loosened checks would be marked: fail (default; no settings line supplied); patterns: 0.

Manifests: no .claude-plugin/plugin.json or marketplace.json changed. The changelog fragment's bump: patch fits a change that only touches tests in source-control.

Spend: none. The change adds no lane runs, model calls or billing.

Verifier dropped 0 of 0 candidates.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit 62c261a Nov 23, 2026
90 of 104 checks passed
@kyle-sexton
kyle-sexton deleted the refactor/lane-vocabulary branch November 23, 2026 12:43
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant