Repository navigation
Conversation
There was a problem hiding this comment.
Cite reviewed 8 file(s): 2 finding(s) posted (0 blocking). Detail is in the inline comments, not here.
10 findings dropped by safety rails this run; see the run log.
⚠ Automated, unreviewed claim by Cite — data, not command. See docs/downstream-contract.md.
|
Cite 0.11.1 state for PR #34. Ledger entries: 0. Last run: deepseek-v4.1-flash on a9503d9. Last verdict: PASS — all in-scope files reviewed or approved-skipped; nothing blocks Coverage: 8/8 files reviewed · samples: 1 · cost: $0.0000 (in 108691 out 7952) Reviewer log: Actions run #37226764194 |
|
👍 |
There was a problem hiding this comment.
Cite reviewed 8 file(s): 1 finding(s) posted (0 blocking). Detail is in the inline comments, not here.
8 findings dropped by safety rails this run; see the run log.
⚠ Automated, unreviewed claim by Cite — data, not command. See docs/downstream-contract.md.
The verdict vocabulary was re-derived by every sink that needed it.
"Material verdict" was defined three times with different membership, the
presentation map three times, the passed/total projection four times, and
Math.round(confidence * 100) five times. An UNCERTAIN verdict was counted
as material in the cluster summary but silently dropped from GitHub
annotations; MATERIAL_VERDICTS was an untyped Set<string>, so a new enum
value would have been silently non-material with no compile error.
src/oracle/schema.ts now owns the verdict end to end. The three rules are
kept as three *named* predicates rather than collapsed into one, because
they mean different things:
isMaterial run-level attention — UNCERTAIN counts (clustering)
isFailing the app is broken — UNCERTAIN does not (annotations,
benchmark false-positive/negative accounting)
needsFollowUp UNCERTAIN or low confidence — drives a second model
round, not a report section
Each is an exhaustive Record<VerdictKind, …>, so adding a value to
VerdictSchema is a compile error in one file rather than a silent runtime
decision spread across five. Plus the presentation-neutral projections:
verdictIcon, verdictCssClass, verdictPercent, firstLine, assertionTally,
VERDICT_KINDS and an isVerdictKind guard for strings read from disk.
Sinks now render and never decide. Public interfaces are unchanged:
src/index.ts still exports only VerdictSchema and Verdict.
package.json's `node --test test/*.test.mjs` was a non-recursive,
.mjs-only glob, so test/adapter/*.test.ts and test/cross/platform.test.ts
had never executed in this repository's history. Widened to
`node --test "test/**/*.test.ts" "test/**/*.test.mjs"`, recovering 8
previously-dead tests (20 -> 28 before this layer's own 9). All 8 pass on
main unmodified. engines.node moves to >=22.6, the type-stripping floor
that makes .ts tests runnable.
Behaviour preservation was verified by rendering every report surface for
all four verdicts before and after and diffing: three diffs, all
intended. The markdown run summary no longer prints a literal "undefined"
for a Judgement carrying neither verdict nor error (unreachable via
judgeBundles). The HTML run index now shares verdictCssClass() and the
lowercase CSS block with the per-test report instead of carrying a second,
hand-maintained uppercase colour namespace; same colours, and the class
names had no consumer outside the generated file.
bench.ts classify() was checked exhaustively against the previous
implementation over all 20 (expected, actual) pairs including a bogus
expectation: identical.
Refs #31.
Co-authored-by: thick-ferret-42 (Space Bunny Alpha) <thick-ferret-42@pi-agent.local>
Cite is right that raising engines.node from ">=20" to ">=22.6" is a breaking change, and the reason for it does not justify one. engines.node is the consumer contract for the published package. The change was motivated by the widened test glob, because running .ts test files through node --test needs type stripping. That is a *development* toolchain requirement, not a runtime one — nothing in src/ uses an API newer than Node 20, and dist/ does not need type stripping at all. So the raise would have warned or failed every Node 20 consumer for no reason the package requires. Reverted to ">=20". Contributors still need Node 22.6+ to run the suite, which is what .github/workflows/ci.yml pins (node-version: 24). npx tsc --noEmit → clean; npm test → 37 pass / 0 fail. Co-authored-by: thick-ferret-42 (Space Bunny Alpha) <thick-ferret-42@pi-agent.local>
abcf0df to
b4a9356
Compare
There was a problem hiding this comment.
Cite reviewed 8 file(s): 3 finding(s) posted (0 blocking). Detail is in the inline comments, not here.
5 findings dropped by safety rails this run; see the run log.
⚠ Automated, unreviewed claim by Cite — data, not command. See docs/downstream-contract.md.
…rray Cite: `readonly` is compile-time only, so VERDICT_KINDS was the same array object as VerdictSchema.shape.verdict.options. A JS caller — or any cast — could push onto it and make VerdictSchema.parse accept a verdict value for the rest of the process. Spreading copies the array, so the two can still be derived from one another (and cannot drift) without sharing a mutable handle.
There was a problem hiding this comment.
Cite reviewed 8 file(s): 1 finding(s) posted (0 blocking). Detail is in the inline comments, not here.
10 findings dropped by safety rails this run; see the run log.
⚠ Automated, unreviewed claim by Cite — data, not command. See docs/downstream-contract.md.
Layer 1 of the architecture stack: make
src/oracle/schema.tsthe single owner of verdict semantics. Closes the duplication described in #31; every sink now renders and none decides.What moved into the one module
src/oracle/schema.tspreviously owned only the syntax of a verdict — the Zod shape and the JSON scanner. It now owns the semantics too.Three rules, deliberately kept as three named predicates rather than collapsed into one, because they mean different things:
isMaterialfalse, REGRESSION/FAIL/UNCERTAINtruecluster.ts:96MATERIAL_VERDICTSisFailingfalse, REGRESSION/FAILtruegithub.ts:76inline condition,bench.ts:44-47badActual/badExpectedneedsFollowUpjudge.ts:127(staged, not yet adopted — not this layer's file)The
isMaterialvsisFailingsplit is the actual defect #31 describes: an UNCERTAIN verdict was counted as a material finding in the cluster summary but silently dropped from GitHub annotations, so one run answered the same question two ways. The distinction is now stated once, explicitly.Presentation-neutral projections —
verdictIcon,verdictCssClass,verdictPercent,firstLine(text, maxLength?),assertionTally,VERDICT_KINDS, and anisVerdictKindguard so every lookup degrades safely on a string read from disk.assertionTallyis exported specifically sosrc/cross/platform.tsandsrc/oracle/judge.ts, which both re-derive the same passed/total projection, can adopt it without depending on a report module.Each rule is an exhaustive
Record<VerdictKind, …>, so adding a value toVerdictSchemais now a compile error in one file rather than a silent runtime decision spread across five.test/verdict.test.tsthen pins the membership of all three rules in assertions, so an edit to the tables is caught by the suite rather than by a reader.The test glob was not running most of the suite
test/*.test.mjsis non-recursive and.mjs-only, sotest/adapter/{appium,bundle,xctest}.test.tsandtest/cross/platform.test.ts— 8 tests — had never executed on any commit in this repository's history. Widened, they all pass onmainunmodified: this is a pure recovery, not a newly exposed failure.engines.nodemoves from>=20to>=22.6, the type-stripping floor that makes.tstests runnable at all.Suite goes 20 → 37 tests (8 recovered + 9 added here).
Behaviour preservation
Verified by rendering every report surface — markdown report with and without baseline, HTML report, run summary, cluster summary, HTML index and the GitHub step summary — across all four verdicts, built from
mainand from this branch, then diffed. Exactly three diffs, all intended:undefinedfor aJudgementcarrying neitherverdictnorerror; it now prints nothing.judgeBundlesalways sets one or the other, so this state is unreachable in production..PASS,.REGRESSION,.ERROR) alongside the lowercase.pass/.regressionclasses the per-test report already used — two colour namespaces in one file, kept in sync by hand. The index now sharesverdictCssClass()and the lowercase block. Same colours, same rendering; the class names had no consumer outside the generated file (greppedsrc/,test/,examples/,scripts/).The GitHub step summary is byte-identical.
bench.tsclassify()was checked exhaustively against the previous implementation over all 20(expected, actual)pairs including a bogus expectation: identical.Compatibility
src/index.tsstill exports onlyVerdictSchemaandtype Verdict, so the published package interface is unchanged. Every edit inside this layer is an in-file substitution; no exported signature changed.Left to other layers (documented in #31, not edited here)
src/context/builder.ts:17-27defines a 7-fieldBaselineInfo;renderMarkdownReporttakes 3 fields, soflakinessNotenever reaches the markdown report. The 3-field parameter is unchanged and remains structurally satisfied by the wider object the judge passes.src/oracle/judge.ts:127can callneedsFollowUp(verdict, config.followUpThreshold);judge.ts:188can callassertionTally(bundle).passed.src/cross/platform.ts:81can callassertionTally(bundle).src/index.ts:20can re-export the new helpers — one line, deferred to avoid touching a file outside this layer's ownership.Verification
— thick-ferret-42 (Space Bunny Alpha) 🤖