Skip to content

tooling(perf): reusable phase A/B harness + perf-ab skill - #3178

Merged
squid-protocol merged 1 commit into
mainfrom
perf/ab-harness-and-skill
Sep 18, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
perf/ab-harness-and-skill

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Codifies the ad-hoc worktree-A/B loop used to land #3069/#3072/#3173 into a
committed tool, and captures the honest-measurement playbook as a skill — so the
remaining perf tickets (#3171, #3174, #3175) don't re-derive it each time.

tests/tools/phase_ab.py

Runs galaxyscope over one repo with N alternating rounds across two-or-more
engine checkouts (each on PYTHONPATH), and reports each --file-speed --splicing-speed macro-phase total per engine with the delta vs baseline.

  • --control re-runs the baseline under a second label → the A-vs-A noise
    floor
    you must clear before believing any delta.
  • Artifact-identity diff on the deterministic surface: audit.json (minus the
    nested volatile Analysis ISO Timestamp / Total Scan Duration keys) and
    sarif.json. An output-preserving change must print IDENTICAL.
  • Drives the engine by importing gitgalaxy.galaxyscope.main() (never the console
    script) and prints gitgalaxy.__file__ so the running engine is unambiguous.

Validated: A-vs-A on curl shows a <1% noise floor and IDENTICAL artifacts.

python tests/tools/phase_ab.py --repo <mega-repo> --rounds 3 --control \
    --engine main=<worktree> --engine mine=<v6> --phase 5.5_Security_Lens

.claude/skills/perf-ab/SKILL.md

The setup env (license key, sandbox-off, PYTHONPATH engine, worktree vars), the
three anti-self-deception rules (alternate rounds, A-vs-A control, don't scale
single-segment micro-benches), the deterministic-surface + one-sided-gate proof
requirements, and report-without-overclaiming guidance — including that the
node/vscode source trees are no longer on the box (use all_language_repo /
curl / temporal-crucible-pool).

Ruff clean; audit baseline unchanged (the one subprocess call is # noqa: S603
with a reason — trusted internal args only).

🤖 Generated with Claude Code

Codify the ad-hoc worktree-A/B loop used to land #3069/#3072/#3173 into a
committed tool, and capture the honest-measurement playbook as a skill so it
stops living in scattered memories.

tests/tools/phase_ab.py: runs galaxyscope over one repo with N alternating
rounds across two-or-more engine checkouts (PYTHONPATH), reports each
--file-speed --splicing-speed macro-phase total per engine with the delta vs
baseline, plus an optional A-vs-A control (--control) for the noise floor and an
artifact-identity diff on the deterministic surface (audit.json minus the nested
volatile timestamp/duration keys, and sarif.json). Drives the engine by importing
gitgalaxy.galaxyscope.main() and prints gitgalaxy.__file__ so the running engine
is unambiguous. Validated: A-vs-A on curl shows a <1% noise floor and IDENTICAL
artifacts.

.claude/skills/perf-ab/SKILL.md: the setup env, the three anti-self-deception
rules (alternate rounds, A-vs-A control, don't scale micro-benches), the
deterministic-surface + one-sided-gate proof requirements, and the
report-without-overclaiming guidance (incl. the node/vscode-source-gone caveat).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit 20494c8 into main Sep 18, 2026
28 checks passed
@squid-protocol
squid-protocol deleted the perf/ab-harness-and-skill branch September 18, 2026 16:08
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.

1 participant