Skip to content

Fix 1252 baseline reproduction test: pin the frozen sample set - #1290

Merged
waleedkadous merged 1 commit into
mainfrom
fix/1252-baseline-frozen-sample
Jul 30, 2026
Merged

Fix 1252 baseline reproduction test: pin the frozen sample set#1290
waleedkadous merged 1 commit into
mainfrom
fix/1252-baseline-frozen-sample

Conversation

@waleedkadous

Copy link
Copy Markdown
Contributor

Problem

prompt-behavior-metrics.test.ts reproduces the committed Spec-1252 behavioural baseline (b1_totalVerdicts = 160) by measuring live codev/projects/ history. Any project that runs consultations after the baseline was cut adds verdicts and breaks the test — discovered by the aspir-1286 builder, whose first review iteration moved the count 160 → 163 in its worktree. Every in-flight and future builder PR would hit the same CI failure, inviting per-PR "bump the number" commits that would quietly destroy the baseline's meaning.

Fix

A frozen baseline needs a frozen sample:

  • MeasureOptions.includeProjects — an optional allowlist applied before the existing excludeProjects, so a caller can pin the measured set.
  • The reproduction test now pins the 18 project directories the committed baseline was actually computed over (verified: this set reproduces 160 / 51.88 / 1.12 / 3.06 on main exactly), and asserts sampleProjects equals that list.

The M12b forward tracking (next-10-projects comparison vs the baseline) is unaffected — it measures live state by design; only the point-in-time reproduction is pinned.

Testing

All 9 tests in the file pass. The pinned set makes new-project perturbation impossible by construction; a failure of this test now means the measurement code's semantics changed, which is the only thing it was ever meant to guard.

🤖 Generated with Claude Code

The reproduction test measured live codev/projects/ history against the
committed n=160 baseline, so any later project's first consultation broke
it (160 -> 163 via project 1286's worktree). A frozen baseline needs a
frozen sample: add MeasureOptions.includeProjects and pin the test to the
18 projects the committed baseline was computed over. M12b forward
tracking is unaffected (it measures live state by design).
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