B5 harness iteration: self-test + assertion-judge cleanup + dead branch fix + _BLOCKED timeline correction
- harness.test.ts: add in-memory self-test layer (pass + fail + purity), guard
fixtures dir with existsSync so absent dir yields empty list without
crashing the runner. Empty-fixture pnpm test:eval now carries real signal.
- replay-client.ts: remove dead if (!turn) branch; cursor bounds-check above
already guarantees the element. Use non-null assertion with a comment.
- assertion-judge.ts: drop unnecessary (turn as AssistantTurn | { content:
unknown[] }) cast. turn.role === assertion.role already narrows to
UserTurn | AssistantTurn and both expose .content.
- _BLOCKED-BY-CONSTRAINT.md: correct electron-builder note. files: is a
whitelist, so tests/eval is automatically excluded and no new rule is
required.
This commit is contained in:
1 parent
cb2a0a0693
commit
f849efadf5
4 files changed
+133
-18
No files matched your search
@@ -90,13 +90,9 @@ export function createReplayStreamFn(fixture: FixtureFile): StreamFn {
|
||||
`replay-client: fixture "${fixture.meta.fixtureId}" exhausted after ${assistantTurns.length} assistant turns; agent requested turn ${cursor + 1}`,
|
||||
);
|
||||
}
|
||||
const turn = assistantTurns[cursor];
|
||||
// Cursor is bounds-checked above, so the element is guaranteed to exist.
|
||||
const turn = assistantTurns[cursor]!;
|
||||
cursor += 1;
|
||||
if (!turn) {
|
||||
throw new Error(
|
||||
`replay-client: internal cursor error at position ${cursor - 1}`,
|
||||
);
|
||||
}
|
||||
const message = buildAssistantMessage(
|
||||
turn,
|
||||
model.id,
|
||||
|
||||
Reference in new issue
Block a user