Files
callstack__agent-device/scripts/__tests__/help-conformance-sample-outputs.test.ts
devin-ai-integration[bot] 7402a40bac test: enumerate error-code recovery quizzes in a unit-lane gate (#1445)
* test: enumerate error-code recovery quizzes in a unit-lane gate

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test: mark recovery quizzes structurally and derive retriability from the enumeration

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-28 15:46:27 +02:00

20 lines
897 B
TypeScript

import assert from 'node:assert/strict';
import { test } from 'vitest';
import { SAMPLE_PRODUCERS } from './help-conformance-sample-producers.ts';
// Every quiz case in scripts/help-conformance-cases.mjs quotes "captured"
// agent-device output. These tests rebuild each quoted sample through the real
// production renderer, so a rendering or message change fails HERE instead of
// leaving the benchmark grading models against output the CLI no longer
// prints — the drift class that made hand-transcribed samples untrustworthy.
//
// The producers live in ./help-conformance-sample-producers.ts as data so the
// coverage gate can assert every exported sample HAS one
// (help-conformance-error-recovery-coverage.test.ts).
for (const { name, producer, sample, render } of SAMPLE_PRODUCERS) {
test(`${name} matches ${producer}`, () => {
assert.equal(render(), sample.output);
});
}