Skip to content

ci(mecatequi): raise headless wall-clock timeout defaults (#72) - #83

Merged
JAORMX merged 1 commit into
mainfrom
mecatequi-headless-timeout-defaults
Jun 17, 2026
Merged

JAORMX merged 1 commit into
mainfrom
mecatequi-headless-timeout-defaults

Conversation

@JAORMX

@JAORMX JAORMX commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

What & why

Finishes issue #72. PR #76 already raised the turn/tool-call budgets (defaultMaxTurns 100→1000, defaultMaxToolCalls 400→4000) and added a --max-turns flag, but left the wall-clock ceilings at their interactive values. A bigger turn budget is useless if the clock kills the run first — the exact failure mode #72 was filed for (a real run hit both stop=max_turns and the 15-min wall at once). This raises both coupled ceilings.

Changes

  • Agent --timeout default 15m → 40m — .github/actions/mecatequi/action.yml input default + the mecatequi-reusable.yml workflow_call input default.
  • implement job timeout-minutes 20 → 50 — both the reusable workflow and the repo's own mecatequi.yml. The issue proposed 45m; this uses 50m for a 10-minute envelope around the 40m agent. The job ceiling is wall-clock for the whole job (pre-agent toolchain/setup-script + the 40m agent + post-agent artifact upload), and the asymmetry matters: overshooting the agent timeout is graceful (clean JSON summary), overshooting the job timeout is destructive (SIGKILL loses the artifacts post-mortems depend on). So the margin is biased to the job side.
  • Repo's own mecatequi.yml timeout: "15m" override → 40m (it calls the action directly, not the reusable workflow, so it's a separate instance of the same coupled pair).
  • Input descriptions note timeout is the primary cost ceiling for a headless run (mirroring the existing max-run-tokens framing) and drop the now-stale e.g. 15m example.
  • Docs — usage.md + ADR-0028 inputs tables and the prose default updated to 40m.

The coupling invariant agent < job holds on every path: 40m < 50m everywhere.

Review

Ran through the panel-review (Spec / Standards / devops-expert / ux-reviewer). Spec clean. The 50m job ceiling (vs the issue's proposed 45m) and the e.g. 40m description fix both came directly from the panel's findings.

Verification

task lint:actions (actionlint + reusable-pins + action-templates) and task test:actions (action-wrappers contract pins, including #76's MQ_MAX_TURNS wiring) both green. No Markdown headings/links changed → llms.txt byte-identical.

Closes #72

🤖 Generated with Claude Code

PR #76 raised the turn/tool-call budgets (1000/4000) but left the
wall-clock ceilings at their interactive values, so a long headless
run still dies on the clock before it can use the bigger budget.

Raise both coupled ceilings, keeping agent timeout strictly below the
job timeout so the job never SIGKILLs the binary mid-run:

- Agent --timeout default 15m -> 40m (action.yml + reusable input).
- implement job timeout-minutes 20 -> 50 (reusable + the repo's own
  mecatequi.yml). A 10m envelope (not 5m) around the 40m agent so the
  job ceiling absorbs pre-agent setup AND post-agent artifact upload
  before the hard SIGKILL: the agent timeout is graceful (clean
  summary), the job timeout is destructive (loses the upload), so the
  margin is biased to the job side.
- The repo's own mecatequi.yml timeout override 15m -> 40m.
- Timeout input descriptions note it's the primary cost ceiling for a
  headless run (mirroring max-run-tokens framing) and drop the stale
  "e.g. 15m" example.
- Docs (usage.md, ADR-0028) updated to the new 40m default.

Closes #72

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@JAORMX
JAORMX merged commit bac2f4e into main Jun 17, 2026
8 of 9 checks passed
@JAORMX
JAORMX deleted the mecatequi-headless-timeout-defaults branch June 17, 2026 11:25
JAORMX added a commit that referenced this pull request Jun 17, 2026
…cs (#84)

The github-action-benchmark "scenarios (smaller-is-better)" gate compared
one PR run's allocs/op against the single previous-main value at a flat 2%
threshold with fail-on-alert. Two TUI render metrics were never actually
deterministic: gh-pages history showed tui_scrollback_view swinging ~4.6%
and tui_scrollback_view_steady ~30% across commits that touched zero TUI
code. PR #83 (docs+CI only, no Go) false-failed because the previous-main
commit happened to be a low outlier. perf.yml's own comment anticipated
this and prescribed the escalation taken here.

Two independent root causes, both fixed:

A. Benchmark determinism. AllocsPerOp = total_allocs / b.N, and b.N is
   chosen from timing (runner-speed-dependent). BenchmarkScrollbackView
   called appendAssistant(".") every op, growing the live block
   unboundedly -> total allocs superlinear in b.N -> allocs/op rose with
   runner speed. New reviseAssistant() reducer replaces the live block
   with a fixed-SIZE, byte-different body each op through the
   currentAssistant() rev-bump gateway: the render+join caches still MISS
   every op (worst-case streaming floor preserved) but the block does not
   grow, so allocs/op is now b.N-independent. Guarded by
   TestScrollbackReviseAllocsIndependentOfN (mutation-verified: the old
   growth bug fails it at delta=456970 vs +/-1 tolerance) and
   TestScrollbackReviseBustsCacheEveryOp (asserts the join still all-misses
   so the bench keeps measuring the hotspot).

B. Gate restructure. perfconvert now emits a THIRD dedicated advisory
   suite (-render) carrying only the two noisy render-alloc points;
   perf.yml runs it with fail-on-alert:false in both jobs. Every
   deterministic gate stays hard: the render benches' tokens_total and
   goroutine_delta remain in the smaller suite, non-TUI scenario allocs
   stay hard, the bigger cache-hit suite is unchanged, and the
   allocsgate-over-task-bench gate is untouched. SHA-pins preserved;
   gh-pages fetch ordering across the now-three steps preserved (smaller
   fetches first; bigger and render use skip-fetch-gh-pages in perf-pr).

Reviewed via the panel (spec/standards/devops/QA): clean, no must-fix.

Co-authored-by: Claude Opus 4.8 <[email protected]>
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.

Raise headless run budgets: MaxTurns 100→1000, MaxToolCalls 400→4000, and a larger default timeout

1 participant