Commit 3db669b
committed
Run a whole review against the fixture and score it against the answer key
Work item W7: the demo that makes this app judgeable before it has a screen.
It builds two git repositories with known defects planted in them, reviews the
branch pair for real, and prints which of those defects the review actually
found. The manifest is the answer key, so the output is a score rather than an
impression: every planted defect is FOUND or MISSED, and any finding in the
files that are deliberately fine is a false positive named as such.
`--fake` routes every model call through the test double, so the whole demo is
free and deterministic. That mode proves the plumbing carries a correct review
end to end; it proves nothing about review quality, which is what a real run is
for. `npm run demo:fixture -- --fake` currently prints:
Built the fixture: 8 planted defect(s), 2 file(s) that are deliberately fine.
...
8/8 planted defect(s) found.
No findings in the files that are deliberately fine.
outcome completed
discarded quotes 0
open questions 0
tokens 500 in, 100 out, 10,000 cached read
cost equivalent $0.0210
wall time 0.9s
Step zero of the plan was to prove tsx resolves the @/ alias rather than assume
it. It does, so the script runs directly and the tsconfig.scripts.json fallback
the plan held in reserve is not needed.
Two smaller decisions the output forced. Numbers are grouped by hand rather
than by toLocaleString, because this output is captured as gate evidence and a
locale-dependent separator would make two runs on two machines look different
when nothing about the review changed. And there is no colour: escape sequences
are control characters, which the house style gate refuses, and the output is
written to a file where escapes are noise rather than emphasis.
A real model run writes its event log and score to review/<date>-fg2/, which is
gitignored, and is the maintainer's to judge.1 parent 5199e6c commit 3db669b
4 files changed
Lines changed: 390 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
| 404 | + | |
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
0 commit comments