Repository navigation
Conversation
Coverage report: 100.00% (lines)Threshold 100%: PASS (enforced by the quality gates).
Lowest 15 of 99 files. Full HTML report: download the Updated by the quality gates run on every push. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
PR225 proved the 4-leg sweep (recipes + algorithms, JVM vs clojure-rs, per-case median cpu_s/maxrss_kb) on a workstation; without CI the signal rots the moment the next perf PR lands. Encode the session recipe as a required workflow: 8 shards x 2 runtimes x 2 suites (32 measure jobs) plus a strict fan-in gate that fails the PR on ANY loss. The runtime under test builds from the PR itself (interpreter-only release, once per run, fanned out as an artifact); suite revisions pin to master SHAs with dispatch overrides for bisection. No Bencher reporting by design: this gates, it does not track history. AI-Tool: Muse Code (Meta Muse Spark
actions/download-artifact does not preserve the executable bit, so every clojure-rs leg failed with '/usr/bin/time: cannot run clojure-rs: Permission denied' (exit 126). Restore the bit before adding the directory to PATH, in both the recipes and algos legs.
…ret) The org-level RESOURCES_PASSPHRASE decrypts only the bundle rebuilt in hhh-pa/clojure-code-snippet#51; the old pin predates the rotation, so every recipes leg failed in gpg with 'Bad session key'. AI-Tool: Muse Code (Meta Muse Spark)
e58f74e to
015cc7d
Compare
Sweep-skipped namespaces are recorded run-less in EVERY shard by design; the shard union treated the repeats as conflicting dupes and aborted the algos gate with exit 2. Dedupe identical run-less markers (and report them as SKIPPED-NO-RUNS instead of crashing the median comparison); genuine duplicate timed cases still fail loudly. AI-Tool: Muse Code (Meta Muse Spark)
Build both ends of the change (PR base/head, or master/dispatched ref) and sweep each suite under jvm + rs-from + rs-to (48 legs). The gate still fails only on JVM losses; the rs-from-vs-rs-to verdict tables are report-only (near-tie wobble), showing what the PR or branch changed against its base. rs_from/rs_to dispatch inputs take a SHA or branch/tag for bisection. AI-Tool: Muse Code (Meta Muse Spark)
|
Changelog: native-vs-native comparison added on top of the JVM gate.
Validation: YAML structural check (jobs/needs/matrices/outputs), Note: on this PR the native diff should come back ~all ties (workflow-only delta over PR225), which itself proves the new plumbing. AI-Tool: Muse Code (Meta Muse Spark) |
Stacked on #225 (base:
perf/h2h-cpu-mem, merges after it).Problem
PR225 proved the 4-leg head-to-head sweep — recipes + algorithms suites, JVM vs clojure-rs, per-case median
cpu_s/maxrss_kb— by hand on a workstation. That signal rots the moment the next perf PR lands: nothing re-runs it, nothing reds when the native runtime regresses against the JVM on a case.Root cause
The sweep recipe (Go harnesses, pinned suites, GNU-time signal, median-compare verdict) lives only in a session log and an uncommitted
/tmpscript. No workflow encodes it, so every future perf claim re-pays the manual-sweep cost or skips the evidence.Solution
Encode the session recipe as a required workflow + committed gate script:
.github/workflows/h2h-cpu-mem.yml: 8 shards x 2 runtimes x 2 suites (32 measure jobs) + fan-in compare job. Triggerspull_request+workflow_dispatch; cancel-in-progress concurrency likerust.yml.build-rsbuilds clojure-rs from the PR itself (cargo build --release --locked --no-default-features, interpreter-only) once per run and fans it out as an artifact to the 16 native legs.--repeat 3 --no-alloc --no-perf --jobs 3, temurin 21.0.13, Clojure 1.12.0 jars, GNUtime, 0-based--shard K/8).SNIPPETS_SHA_DEFAULT,ALGORITHMS_SHA_DEFAULT) with dispatch inputs to override either for bisection.tests/resources.tar.xz.ascexactly like the snippet repo and fail loud with a clear message ifRESOURCES_PASSPHRASEis missing (the algorithms suite carriesresources/in-repo, so it needs no decrypt).scripts/ci/h2h_compare.py(stdlib-only): ports the session compare script — median verdicts, README min/max cross-check, loss/failure/missing/drift lists — extended to union multiple shard JSONs per leg (duplicate case keys are a hard error), append a Markdown verdict table to$GITHUB_STEP_SUMMARY, write merged leg JSONs (uploaded as artifacts), and exit non-zero on any CPU or RSS loss (also on failures, missing, not-ok, drift, or leg mismatch). The two known-random algos namespaces get the same:pass-zeroing the algos workflow's own drift gate uses. Triage mode: dispatch withreport_only=true(or flip the gate) to get verdict tables green.No regressions
New workflow + new script only; no existing file touched, no behavior change to any current job. The workflow only adds checks.
Honest notes for the reviewer
search/bfs/test_case_5at 23.3x). If you would rather land this green first, dispatch/merge withreport_only=true(triage mode) or say the word and I will flip the default to report-only.RESOURCES_PASSPHRASEto hhh-pa/clojure secrets (copy the value from hhh-pa/clojure-code-snippet, Settings -> Secrets and variables -> Actions) or every recipes leg fails loud at decrypt.Test Plan
python3 -c yaml.safe_loadon the workflow: parses; jobsbuild-rs, h2h-compare, measure-algos, measure-recipes, resolve-suites; triggerspull_request, workflow_dispatch.actionlint 1.7.7on the workflow: clean. (shellcheckunavailable here — x86_64-only binary on an arm64 Mac — so all 14 inlinerun:blocks were extracted andbash -nchecked instead: all OK.)h2h_compare.py --jvm /tmp/recipes-jvm.json --rs /tmp/recipes-rs.json --label recipes: verdicts identical to the session script — CPU 1707/47/0, MEM 1754/0/0, same worst ratios (23.300x CPU, 0.560x MEM), same 47-loss list.--report-only, 2 on duplicate case keys across shards, 2 on missing input files.download-artifact-style directories: globs resolve, both suites compare,GATE: FAILlands in the summary, merged JSONs upload.git diff --check: clean.RESOURCES_PASSPHRASEsecret, neither available from here. The first CI run on this PR (after the secret lands) is the real proof; expect red per note 1.AI-Tool: Muse Code (Meta Muse Spark)