ci(bench): reproduce idle-RSS + hot-path benchmarks in CI (roadmap 2.2) - #326
Conversation
Roadmap 2.2's "benchmark artifact reproducible in CI" metric was the last unmet repo-local roadmap item: nothing in .github/workflows/ ran the bench harnesses and the bench/README reference numbers (10/06/2026, commit 2f80ed3) were unguarded — a silent drift risk for the README's RSS/market claims. Additive-only bench.yml (new workflow, no existing file modified, no secrets, no write surface, deliberately not a required check): - triggers: push to main + pull_request, concurrency group per ref with PR-only cancel (shape from #325) - builds wad from the working tree via ./bench/idle-rss.sh (unpaired boot) and runs the four hot-path microbenchmarks with -count=1 -benchmem -vet=off - compares results against committed thresholds (10/06 baseline x 2x RSS / 3x ns/op, derived + cited in the workflow header), fails on regression, uploads raw output as the bench-results artifact - comparison is sed/awk only — no jq/benchstat, no new dependencies bench/README.md documents the CI job, the threshold policy and how to read the artifact; the 10/06 table is relabeled as the baseline it is. .zizmor.yml: bench.yml joins the documented self-hosted-runner exception list — every workflow on the [self-hosted, dokku] pool is listed there, and the required "workflow static analysis" check would otherwise stay red on the new workflow (zizmor enforce mode). Verified locally: harnesses + compare step pass on this host (32 MiB RSS; 338/3822/2912/4750 ns/op vs thresholds 1000/10000/8000/ 13000); actionlint 1.7.12 clean; zizmor 1.24.1 --persona=auditor: no findings. Signed-off-by: Pedro H S Balbino <30302237+phsb5321@users.noreply.github.com>
wa-qa review — cross-family gate (OpenAI-lineage lane)Review contract: /tmp/sp-dispatch/wa-contract-qa.md — 8 mechanical gates, R26–R32 correctly NOT applicable (no daemon/session/health surface — verified: diff touches only VERDICT: CHANGES-REQUESTED — gates 5, 8. Two small fixes; nothing structural. Gate verdicts
HygieneConventional title, single-token scope Falsifier for "review done"
|
The initial run of this PR's checks landed inside a GitHub Actions incident (status page: critical, 14:12-21:10 BRT). Three workflow runs (Reproducibility, CodeQL, quality-gates) were left in a zombie state — run-level 'queued' with zero jobs, refusing both cancel and rerun (HTTP 403 'already running'). All other checks passed on the original commit. This empty commit moves the head SHA so every workflow re-triggers fresh; no code or configuration changed. Signed-off-by: Pedro H S Balbino <30302237+phsb5321@users.noreply.github.com>
314×3.2 = 1004.8 → 1005 ns/op (was 1000, factor 3.185× below 3.2) 4.1 µs×3.2 = 13120 ns/op (was 13000, factor 3.171× below 3.2) qa (w8:p3) issuecomment-5207658880 G5: committed thresholds sat below their own documented slack product. Header comments and README table updated in lockstep. Signed-off-by: Pedro H S Balbino <30302237+phsb5321@users.noreply.github.com>
wa-qa re-review — G5/G8 fixes verified → APPROVERe-verified at head G5 — FIXED (thresholds = documented factor products, lockstep)
G8 — FIXED (body now accurate)PR body says: "the enforce-mode 'workflow static analysis' check (actionlint + CI + artifact evidence (the falsifier, now closed)All 18 checks green on head
The compare step passed, which itself proves all 5 thresholds parsed and satisfied (a missing line fails the job). VERDICT: APPROVE. Safe-class in every respect except the Actions-touch — merge stays |
Roadmap 2.2 metric "benchmark artifact reproducible in CI" — slice brief
wa-eng (w8:p2)(/tmp/sp-dispatch/wa-brief-eng.md).What
Additive-only new workflow
.github/workflows/bench.yml— no daemon code, no session/health/watchdog surface (reliability gates R26–R32 not applicable), no existing workflow modified, no secrets, no write permission, deliberately not a required check.concurrencygroup per ref withcancel-in-progresson PR runs only (shape from ci(sonar): stop a runner backlog from failing an unrelated PR #325).bench/README.md):./bench/idle-rss.sh— buildswadfrom the working tree, unpaired boot into throwaway XDG root (no account, no credentials, no session files), samples VmRSS after 5 s.go test ./internal/app/ -run xxx -bench 'BenchmarkEventFanout|BenchmarkChannelWrap|BenchmarkDraftCreate' -benchmem -count=1 -vet=offgo test ./cmd/wad/ -run xxx -bench BenchmarkDispatcherStatus -benchmem -count=1 -vet=offidle-rss.txt,bench-app.txt,bench-cmd.txt) uploaded asbench-results, retention 7 d (pinactions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2from ci.yml).Thresholds (honest, cited, factor > 1.0)
Baseline: 10/06/2026, commit
2f80ed3(bench/README table) × documented slack — 2× RSS, ≥3× ns/op — because these single-goroutine microbenchmarks share two self-hosted runners with the rest of CI. Same-machine rerun on the baseline CPU (Xeon E5-2699 v4) with Go 1.26.5 measured 26 % above the baseline table, which is the empirical floor for the factor choice.Thresholds live as workflow-level env with the derivation commented inline; the policy is documented in
bench/README.md.Companion change (flagged — 4th file, not in the brief's 3-file list)
.github/zizmor.yml: +1 line addingbench.ymlto theself-hosted-runnerdocumented-exception list. Required to go green: the enforce-mode "workflow static analysis" check (actionlint +zizmor --persona=auditor) runs over.github/workflows/; bench.yml uses the house-style[self-hosted, dokku]pool, which zizmor flags unless the workflow is on the repo's own documented exception list (every other self-hosted workflow is). Without this line the check can never go green on this PR. No suppression semantics changed — only the new workflow joins an existing documented exception.Verification (local, CI pins)
./bench/idle-rss.sh→ 32 MiB (this host), harness runs offline, unpaired.actionlint1.7.12 (CI pin) — clean.zizmor1.24.1 (CI pin)--persona=auditor .github/workflows/— No findings to report.Acceptance-gate checklist (brief's falsifier)
.github/workflows/bench.yml(new) +bench/README.md+.github/zizmor.yml(+1 line, see flag above)2f80ed3, 10/06/2026, factor rationale)./bench/idle-rss.shruns offline, unpaired boot, no credentials8eae54c(verifiedgh pr checks 326+ rollup, 0 failed)bench-results852 BEscalation
[pending] Pedro: merge #326— this PR touches.github/workflows/→ gated class per AGENTS.md R33 (GitHub Actions). Not self-merging.Revert path:
git revert <merge-sha>— additive-only change, no daemon surface.Incident aftermath (2026-08-06)
This PR's first check run landed inside a GitHub Actions incident
(status page: critical "Incident with Actions", ~14:12→21:10 BRT;
webhooks throttled to ~15 %, runners assigned invalid jobs). Three
workflow runs (Reproducibility, CodeQL, quality-gates) were left
zombie-wedged — run-level
queuedwith zero jobs, refusing both canceland rerun (HTTP 403 "already running"), and the incident-fix rollout
did not clear them. Empty commit
8eae54cmoves the head SHA andre-triggered every workflow fresh; all 18 checks passed on the new
head. No code or configuration changed in the re-trigger commit.