Repository navigation
refactor(ci): generate the two inline api-budget.bash copies in the required-checks workflow - #15969
Conversation
…equired-checks workflow pr-require-checks.yml carries api-budget.bash verbatim in two API_BUDGET_SH block scalars (mark-lanes and ci-status), pasted by hand on every change to the file. scripts/sync-hold-floor.py now writes them: - each BLOCKS entry carries its full marker label; the five existing `hold-floor <name>` labels are unchanged, so no existing BEGIN or END line moves; - two new labels, `api-budget mark-lanes` and `api-budget ci-status`, share one render function that emits `API_BUDGET_SH: |` at the BEGIN line's indent and each line of api-budget.bash two spaces deeper (empty lines stay empty, the final newline is dropped); - the workflow gains the four BEGIN/END comment lines, at the key's indent, outside the block scalar, and its two comments say the block is generated. The first run after the markers rewrites nothing, and --check exits 0. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…string Co-Authored-By: Claude Opus 5.5 <[email protected]>
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: no security issues foundScope: I read every hunk of all 4 changed files in the full diff. This is the lane's first review of the PR (0 earlier heads, blocking only: no), so findings at every severity were in scope. Trusted paths: two changed files are on the trusted-path list, and I read each whole change and what it gates.
Other files: the test docstring and the changelog fragment are prose only, with no instruction-surface or control change. Not applicable: no plugin manifest changed, so there are no critical-findings: 0 |
|
claude-review reviewed Code review: PR #15969 (generate the two inline
|
Closes #15967
session: Simplify E2 B
Summary
scripts/sync-hold-floor.pynow writes the two inline copies ofapi-budget.bashinpr-require-checks.yml, between BEGIN/END comment lines. Its existing--checkreplaces the hand pasting, as R2's Q1 option (b) decided. This is part of restructuring pass #15695.api-budget.bashitself is not edited, and the workflow's behavior is unchanged.Fix
scripts/sync-hold-floor.py:BLOCKSentry now carries its full marker label, andgenerate()matchesBEGIN <label>andEND <label>.hold-floor GATE_WORKFLOWS,hold-floor COST_PATHS,hold-floor HOLD_PATH_CLASSES,hold-floor hold-pathsandhold-floor hold_patterns.api-budget mark-lanesandapi-budget ci-status, share one render function,api_budget_sh. It emitsAPI_BUDGET_SH: |at the BEGIN line's indent, then each line ofapi-budget.bashtwo spaces deeper. An empty line stays empty and the file's final newline is dropped.generate(path, text)signature, the script name and--checkare unchanged. One docstring line names the new blocks.pr-require-checks.yml:# BEGIN api-budget mark-lanes: generated by scripts/sync-hold-floor.py/# END api-budget mark-lanes(10 spaces), and the same pair forci-status(6 spaces).api-budget.bash.API_BUDGET_SHblock changes. Permissions,if:s, env keys and their order, step names and job ids are unchanged.test_merge_holds_sync.py: the docstring bullet on the copies now names the twoAPI_BUDGET_SHblocks.nonechangelog fragment for source-control covers that test docstring edit.Verification
python3 -I scripts/sync-hold-floor.pywith the markers in place rewrites nothing; the working-tree diff is byte-identical before and after.--checkthen exits 0.git archiveexport of the branch with the edit not committed:SCRATCH-EDITto line 3 ofapi-budget.bash.--checkexited 1. Its diff showed that line changing in both blocks, at 12- and 8-space indents, and it printed "1 file(s) stale".SCRATCH-EDITthen appears at lines 255 and 4262, once in each block, and--checkexits 0.scripts/run-test-file.sh:log-api-budget.test.mjs(76; its equality test still finds both copies);scripts/ci-gh-read.test.sh;test_merge_holds_sync.py(21 tests, 1951 subtests);test_floor_paths.py(28);test_babysit_risk.py(143).scripts/run-ruff.sh checkis clean on both Python files.run-ruff.sh format --checkflagstest_merge_holds_sync.pyat lines 1706 and later.origin/main's copy fails the same check, and this PR changes only lines 13-16.scripts/check-affected.sh: 15 passed, 1 skipped.actionlintreports no errors beyond thecache-modeandconcurrency.queuekeys it does not know..githubsuite, under the one-suite-per-machine rule.Related
Note
The generator is a
trustrow on the hold floor, and the required-checks workflow is a gate workflow. A path hold on this PR is expected.🤖 Generated with Claude Code