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:
ZacharyZhang-NY committed 2026-04-20 11:48:55 -04:00
1 parent cb2a0a0693
commit f849efadf5
4 files changed
+133 -18

No files matched your search

+3 -1
View File
@@ -112,7 +112,9 @@ function evaluateOne(
case "message_contains_substring": {
for (const turn of turns) {
if (turn.role !== assertion.role) continue;
const content = (turn as AssistantTurn | { content: unknown[] }).content;
// UserTurn and AssistantTurn both expose .content; the `role` guard
// above restricts us to those variants, so no cast is needed.
const content = turn.content;
if (!Array.isArray(content)) continue;
for (const block of content) {
if (