fix(0.40.4): runCampaign actually invokes judges (was a phase-1 stub)#100
Merged
Conversation
CRITICAL: the shipped runCampaign never called judges. runJudgeCell was a
hardcoded stub returning { composite: 0, notes: 'phase-1-stub' }, and
JudgeConfig only modeled a single-LLM-prompt judge (systemPrompt/buildPrompt)
— too narrow for real consumers (gtm scores with a 3-model ENSEMBLE +
deterministic checks). The measurement primitive did not measure. Surfaced by
building the first real consumer (gtm) against it — prove-one-before-fanning.
Fix:
- JudgeConfig is now score()-based: . A function, not a fixed prompt shape — ensembles, deterministic
checks, or a single LLM call all conform. (Matches what
primitives-integration-spec.md already documented; the impl was the stub.)
- runJudgeCell calls judge.score (deleted the stub).
- Fail-loud: a thrown judge now invalidates the cell (recorded as ),
NOT folded into a fake composite:0 that poisons aggregates — the exact
anti-pattern the spec forbids.
Tests (the regression guard the original lacked): assert the REAL composite
flows from judge.score (not 0 / not 'phase-1-stub'), aggregates reflect it,
and a thrown judge sets cell.error + records no fake score. Suite 1421/1421.
Unblocks ALL of Phase 4 — no consumer migration could measure until this.
0.40.3 → 0.40.4 (npm + python lockstep).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CRITICAL — the shipped
runCampaignnever judged.runJudgeCellwas a hardcoded stub returning{ composite: 0, notes: 'phase-1-stub' }, andJudgeConfigonly modeled a single-LLM-prompt judge (systemPrompt/buildPrompt) — too narrow for real consumers (gtm scores with a 3-model ensemble + deterministic checks). The measurement primitive did not measure. Surfaced by building the first real consumer (gtm) against it — prove-one-before-fanning.Fix
JudgeConfigis now score()-based:score({ artifact, scenario, signal })returns aJudgeScore. A function, not a fixed prompt shape — ensembles, deterministic checks, or a single LLM call all conform. Matches whatprimitives-integration-spec.mdalready documented; the impl was the stub.runJudgeCellcallsjudge.score(stub deleted).error), NOT folded into a fakecomposite:0that poisons aggregates — the exact anti-pattern the spec forbids.Tests (the regression guard the original lacked)
judge.score(not 0 / not phase-1-stub), and aggregates reflect itcell.error+ records no fake scoreSuite 1421/1421. Typecheck + lint clean. Unblocks ALL of Phase 4 — no consumer migration could measure until this. 0.40.3 → 0.40.4.