Skip to content

feat(process): time-cost guard — PR field, per-row budget, exec process-start budget fixture (#687) - #698

Merged
MendixMau merged 6 commits into
masterfrom
feat/time-cost-guard-687
Nov 6, 2026
Merged

MendixMau merged 6 commits into
masterfrom
feat/time-cost-guard-687

Conversation

@MendixMau

Copy link
Copy Markdown
Owner

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:

  1. PR template: the Runtime row asks for a 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.
  2. docs/RELEASE-PROCESS.md §4a: a new Per-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 the Review: 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.
  3. CLAUDE.md "Merging a PR": one sentence: the reviewer re-measures time cost for PRs that touch hot-path files.
  4. tests/wave2/test-exec-process-budget.sh with the baseline in tests/wave2/fixtures/exec-process-budget.txt. The fixture runs one clean MDL exec on a minimal scaffold under env -i. PATH is closed: shims log each start, then exec the real tool. mxcli, mxbuild, java, sqlite3 and pgrep are logging stubs. An exported command_not_found_handle counts 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.sh picks the fixture up through its usage: line (subject exec.sh).

Skipped: the advisory diff check (item 5). bin/check-pr-discipline.sh does 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

Row Answer
Process No new blocking step for projects. One new CI fixture can turn a PR red when exec.sh's process starts rise more than 5%. The PR body now owes a Time cost: line for new steps.
Dependencies Read only, not changed: project-bin/exec.sh and 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 capture fixtures/lint-conv020-v028/.
Context cost none: no routed or always-loaded file touched (render-routing.sh --check passes)
Behaviour NOT RUN: process docs and a template that review agents read. No agent-stub or skill text changed.
Runtime Projects: none. CI: about 1.5 s for the new fixture.

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/master exec.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 7 date calls 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 after portability-ok markers on the Linux-only shim names), the leak guard, check-pr-discipline, and render-routing --check. No full suites.

Review: pending independent review


Generated by Claude Code

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants