Repository navigation
refactor(lanes): run lane script entry points through lib/run-main.mjs (part 1 of 2) - #15500
Conversation
…s (part 1 of 2) The same 11-line entry tail (run main only when executed directly, print `::error::<label> failed` and exit 1 on a rejection) was copied into 13 .github/scripts files. lib/run-main.mjs now holds it once as runAsScript(metaUrl, label, run), and apply-patch, address-feedback, adjudicate-feedback, review-dependency, apply-dependency-verdict and fix-ci-context call it with the same arguments and label as before. Importing any of them still runs nothing. Part 2 moves the other seven. Since apply-patch, adjudicate-feedback and fix-ci-context are route entries and address-feedback is floored, lib/run-main.mjs gets an enforcement floor row (141 rows to 142, review route 59 to 60; no row dropped, no class changed), regenerated into merge-holds.mjs, both review workflows' hold-paths and ci-status's hold_patterns by scripts/sync-hold-floor.py. ci-status's base-config sparse checkout lists it beside address-feedback's other lib imports, the write runner's apply-base step copies it out of the base with apply-patch's other cross-directory imports, and the collect-base-activity test's base fixture stages it. The floor tests add the row and move the pinned counts and digests to the new set. Refs: #15448 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VQb9Q3tnh28AzDYZ8AUjhH
Codex Review Summary: ✅ CompletedThis 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. |
|
claude-security-review reviewed Security review (incremental): PR #15500, head 2d7764aNo security issues found. This incremental review covers the changes since What changed. The new test file How the test works.
No secrets, tokens or outside input reach the test. Trust controls checked.
Blocking only. This lane already reviewed an earlier head, so this review reports only CRITICAL and IMPORTANT findings. There were none. Spend. None beyond the normal CI test run. critical-findings: 0 |
|
claude-review reviewed Incremental code review: PR #15500 at
|
A fixture module run as a process must pass a resolved code through and print `::error::<label> failed: <message>` with exit 1 on a rejection; imported, it must run nothing. Inverting the entry-point guard fails all three tests. Refs: #15448 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VQb9Q3tnh28AzDYZ8AUjhH
Closes #15448
Summary
Thirteen
.github/scriptslane scripts end with the same copied entry tail: runmainonly when the module is the process entry point, then print::error::<label> failedon a rejection. A new.github/scripts/lib/run-main.mjsexportsrunAsScript(metaUrl, label, run), which holds that tail once, and this part moves six scripts onto it:apply-patch.mjs,address-feedback.mjs,adjudicate-feedback.mjs,review-dependency.mjs,apply-dependency-verdict.mjsandfix-ci-context.mjs. Part 1 of 2 of the split in restructuring pass #14159 (R1).Built in a session because the change spans shared
lib/and the hold floor (host-run); agreed with the hub session.session: Simplify Planning
Fix
lib/run-main.mjs: the entry tail, unchanged in behavior (the same arguments,::error::<label> failed: <message>line and exit codes); importing a module still runs nothing.enforcementrow forlib/run-main.mjs, since apply-patch, adjudicate-feedback and fix-ci-context are route entries. Nothing is removed or reclassified.merge-holds.mjs, both review workflows' hold-paths and ci-status'shold_patternsare regenerated byscripts/sync-hold-floor.py, and thetest_floor_pathspins follow.lib/run-main.mjswith the other cross-directory imports, and the collect-base-activity test fixture stages it. The issue lane already stages baselib/wholesale.Verification
dispatch.mjs(the different-label shape in part 2) behaves the same throughrunAsScript.python3 scripts/sync-hold-floor.py --check: pass. Floor pins: a script reproduced main's pins exactly before they were updated.callers.test.mjs(435), node suites of apply-patch, pr-unblock, pr-merge and lib (2,878), resolve-config and log-api-budget (1,238): pass.scripts/write-runner-never-rules.test.sh75/0,scripts/ci-lanes-pr-hold.test.sh344/0, actionlint clean apart from the knowncache-modekey.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01VQb9Q3tnh28AzDYZ8AUjhH