Repository navigation
perf(pr-pipeline): keep the workflow file name in api-routes - #17531
Conversation
pr-merge.yml's jobs spent about 4,400 calls a day on
repos/{repo}/actions/workflows/{x}/runs, and the {x} hid which workflow
each listing read, so no cut could be aimed at one call site. The route
now keeps the file name after workflows/, which is a file name in this
public repository, so the job notice exposes nothing new.
- Kept only when it matches ^[a-z0-9][a-z0-9_-]*\.ya?ml$ and directly
follows workflows/; a numeric workflow id stays {n}, every other
variable segment is sanitized as before, and a route that would pass
80 characters keeps {x} there instead of turning into other.
- rate-guard.mjs routeOf and routeOk, api-budget.bash API_BUDGET_ROUTE
(pr-require-checks.yml copies regenerated by sync-hold-floor.py) and
babysit_gh.py api_route change together; rate-guard.vectors.json, which
all of them test against, gains the new cases.
Refs: #17460
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KeBVgaQE4QB75SPD3ky1jd
…ge made wrong
The comments above routeOf and routeOk (rate-guard.mjs), api_route
(babysit_gh.py) and API_BUDGET_ROUTE (api-budget.bash) said the segment
after workflows/ becomes {x} and that a route holds only REST path words
and placeholders. rate-guard.vectors.json, which every templater is
tested against, holds the rule.
Refs: #17460
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KeBVgaQE4QB75SPD3ky1jd
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-review reviewed Code review (96045c9)I reported blocking findings only. This lane already reviewed earlier heads of this pull request ( Scope. I read all 8 changed files in What I checked (by reading the code, I ran nothing).
Settled and prior. The earlier advisory thread (dangling docstring reference and the stale Closing issue. The PR only says Loosened checks. The prompt has no Loosened-check verdict: fail (default, no settings lines); patterns: 0 Security findings belong to the separate security lane that runs on this repository. No blocking findings. Verifier dropped 0 of 0 candidates. |
|
claude-security-review reviewed Security review: PR #17531I found no security issues. This lane already reviewed an earlier head ( What changed. The route sanitizer that feeds the job-end What I checked. I read all eight files on the full-diff list, and gave the trusted-path files (
The settled thread on critical-findings: 0 |
…se word-list comment Review of #17531: api_route's docstring still said "the rules above", which the previous commit deleted; it now names its twins (rate-guard.mjs routeOf, api-budget.bash API_BUDGET_ROUTE), says to change them together, and points at rate-guard.vectors.json and the test that checks it. The comment above REST_PATH_WORDS said any segment outside the list could be a name, a path or planted text, which a kept workflow file name now contradicts; it is deleted. log-api-budget.test.mjs still checks that api-budget.bash carries the same word list. Refs: #17460 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeBVgaQE4QB75SPD3ky1jd
…'s cover-read route
pr-merge's workflow.test.mjs pinned the cover read's reading to
repos/{repo}/actions/workflows/{x}/runs; with the workflow file name now
kept, the reading is .../workflows/pr-require-checks.yml/runs. The
dispatch POST keeps the {x}/dispatches route its step passes by hand.
Refs: #17460
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KeBVgaQE4QB75SPD3ky1jd
Refs: #17460
Summary
The api-routes job-end notice now keeps the workflow file name after
workflows/, so the ~4,400 calls a day pr-merge.yml spends onrepos/{repo}/actions/workflows/{x}/runscan be split by workflow before any cut is aimed at one call site. These are file names in this public repository, so the notice exposes nothing new.Fix
workflows/matching^[a-z0-9][a-z0-9_-]*\.ya?ml$is kept; a numeric workflow id stays{n}; every other variable segment is sanitized as before. A route that would pass 80 characters keeps{x}there rather than becomingother.routeOf/routeOk, api-budget.bashAPI_BUDGET_ROUTE(pr-require-checks.yml's generated copies viascripts/sync-hold-floor.py), babysit_gh.pyapi_route.rate-guard.vectors.json, which all three are tested against, gains the new cases.routeOf/routeOk,api_routeandAPI_BUDGET_ROUTEstated the old rule, so they are deleted;rate-guard.vectors.jsonholds the rule.Verification
node --testover log-api-budget.test.mjs and rate-guard.test.mjs: 250 pass. count-requests.test.mjs's "fix-ci-context's main counts each request its client sends" needsajv, which a fresh worktree lacks, and fails the same way on main.python3 -m unittestover test_babysit_gh_*.py: 148 pass.scripts/sync-hold-floor.py --checkclean;scripts/run-ruff.sh checkpasses; comment lint passes.Remaining
Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01KeBVgaQE4QB75SPD3ky1jd