Repository navigation
feat(process): time-cost guard — PR field, per-row budget, exec process-start budget fixture (#687) - #698
Merged
Conversation
…ss-start budget fixture (#687) - PR template Runtime row: a "Time cost:" line (granularity, measured s + machine, can force rework, offset). - docs/RELEASE-PROCESS.md §4a: "Per-row budget:" with the 2026-11-06 baseline (128 process starts per clean MDL exec; #686 field: ~18 s/exec, 19 min/row) and the rule: a raise needs an offset or a maintainer OK, recorded in the Review: line. - CLAUDE.md "Merging a PR": reviewer re-measures time cost on hot-path PRs. - tests/wave2/test-exec-process-budget.sh: counts process starts of one clean exec through closed-PATH shims under env -i; FAIL above baseline + 5% (tests/wave2/fixtures/exec-process-budget.txt). Deterministic (128 over 6 runs), ~1.5 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jQvaonym9V1wKKfAEPmRr
…him names (#687) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jQvaonym9V1wKKfAEPmRr
…tool set via not-installed stubs (#687 review) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jQvaonym9V1wKKfAEPmRr
…list (#687 review) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jQvaonym9V1wKKfAEPmRr
…so CI shows it (#687) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jQvaonym9V1wKKfAEPmRr
Keep both sides of CHANGELOG.md. Re-measured: still 128 starts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jQvaonym9V1wKKfAEPmRr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Direct lane
What changed and why: #687 asks for a time budget that works like the word budget. Without one, each PR adds a per-exec or per-row step and nobody adds up the total; #686 measured an average of 19 min per row. This PR adds four things:
Time cost:line. It covers granularity (per exec, row, module, stage, project, or none), the measured seconds and the machine, whether the step can force rework (y/n), and the offset.docs/RELEASE-PROCESS.md§4a: a newPer-row budget:section. It has the 2026-11-06 baseline: 128 process starts per clean MDL exec; in the Research: Stage 5 per-row cost (avg 19 min, up to 41 min per build-plan row), where the time goes and what the toolkit should prescribe instead #686 field run, about 18 s per exec and 19 min per row. Its rule: a raise needs an offset or an explicit maintainer OK, and that is recorded in theReview:line. Prefer per-module or per-stage steps (perf(exec): take the mxcli report score at module close, not after every exec #615). The reviewer re-measures. RM-02 (process/roadmap.md) is cited for the per-release measurement.tests/wave2/test-exec-process-budget.shwith the baseline intests/wave2/fixtures/exec-process-budget.txt. The fixture runs one clean MDL exec on a minimal scaffold underenv -i. PATH is closed: shims log each start, then exec the real tool. mxcli, mxbuild, java, sqlite3 and pgrep are logging stubs. An exportedcommand_not_found_handlecounts any tool that is not on the list. The fixture FAILs above baseline + 5%. Lowering the baseline is free; raising it shows up in the diff. Background refresh is forced synchronous (MXTK_SYNC_REFRESH=1), because racing it made the count vary. Lint output is the verbatim v0.28.0 capture.run-all.shpicks the fixture up through itsusage:line (subjectexec.sh).Skipped: the advisory diff check (item 5).
bin/check-pr-discipline.shdoes not read the PR body.Resolution, read this. 5% of 128 is about 6 starts. One extra process, or a whole second lint-gate pass (+6 → 134), still passes, with a "rose by N" note. A step of 7 or more starts fails. Process count is a proxy: one mxbuild is one start but takes minutes. That is why the reviewer still re-measures seconds.
Baseline may need a re-measure after perf/module-close-proofs-686 merges, because it changes exec.sh's lane text. The baseline was measured on origin/master
ee12a615.Impact
Time cost:line for new steps.project-bin/exec.shand the rest of project-bin, copied into a scratch scaffold. The baseline depends on exec.sh; see the re-measure note for the sibling #686 PR. Reads the existing capturefixtures/lint-conv020-v028/.render-routing.sh --checkpasses)Time cost: per PR (CI) · ~1.5 s on Linux x86-64 sandbox · can force rework: y (a hot-path PR over budget) · offset: none needed, not on any project path
Field evidence: measured against
origin/masterexec.sh: 128 starts, the same over 6 runs, 1.1–1.5 s each. The numbers come from #686's field run (163 execs, 17 row agents). Fail demo: a dummy step of 7datecalls added to exec.sh after the lint-gate call gives 135 > 134, FAIL, rc=1, with a per-tool breakdown. Reverted, it gives 128, PASS. Linux only: the fixture SKIPs elsewhere. The count is not yet confirmed on the GH ubuntu runner, so CI on this PR is the first cross-machine check.Checks run: the new fixture (PASS=4),
check-scripts,check-portability(clean afterportability-okmarkers on the Linux-only shim names), the leak guard,check-pr-discipline, andrender-routing --check. No full suites.Review: pending independent review
Generated by Claude Code