feat(8247): a test case is accounted for by what it guards, and the coverage line counts the suite by it
CI & Build / TypeScript typecheck (push) Successful in 37s
CI & Build / Plugin hooks (push) Successful in 17s
CI & Build / Python lint (push) Successful in 2s
CI & Build / Python tests (push) Successful in 2m24s
CI & Build / integration (push) Successful in 2m22s
CI & Build / Build & push image (push) Successful in 43s
CI & Build / TypeScript typecheck (push) Successful in 37s
CI & Build / Plugin hooks (push) Successful in 17s
CI & Build / Python lint (push) Successful in 2s
CI & Build / Python tests (push) Successful in 2m24s
CI & Build / integration (push) Successful in 2m22s
CI & Build / Build & push image (push) Successful in 43s
A refresh now stamps a test case `test` when it is linked to something it guards, and withdraws the stamp when its links go; a judgment always wins. A test case linked to nothing stays in the todo, because nothing says what it is for. Specs written as it()/test() calls get one ledger row per file, read whole. The coverage line and card count tests linked, guarding nothing found, and redundant, and the end-of-turn question no longer asks the writer to call a test case a one-off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -501,6 +501,8 @@ interface Coverage {
|
||||
recheck?: number;
|
||||
// Same-guard test groups awaiting a verdict (TestGuardReview).
|
||||
test_groups?: number;
|
||||
// The suite by what it protects.
|
||||
tests?: { linked: number; unlinked: number; redundant: number } | null;
|
||||
}
|
||||
interface Divergence {
|
||||
path: string;
|
||||
@@ -837,7 +839,7 @@ async function confirmDelete() {
|
||||
</div>
|
||||
<div v-if="coverage.counts" class="coverage-gaps">
|
||||
<span
|
||||
v-for="k in ['canonical', 'instance', 'variant', 'exempt', 'redundant', 'unused', 'scoped']"
|
||||
v-for="k in ['canonical', 'instance', 'variant', 'exempt', 'redundant', 'unused', 'scoped', 'test']"
|
||||
:key="k"
|
||||
>
|
||||
<span v-if="coverage.counts[k]" class="coverage-gap-chip">
|
||||
@@ -891,6 +893,20 @@ async function confirmDelete() {
|
||||
{{ coverage.recheck }} to recheck
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="coverage.tests && (coverage.tests.linked || coverage.tests.unlinked || coverage.tests.redundant)"
|
||||
class="coverage-gaps"
|
||||
title="Each test case is linked to the code it exercises. Linked tests are accounted for by what they guard; a test linked to nothing is in the todo until someone says what it protects."
|
||||
>
|
||||
<span class="coverage-gaps-label">Tests:</span>
|
||||
<span class="coverage-gap-chip">{{ coverage.tests.linked }} linked</span>
|
||||
<span v-if="coverage.tests.unlinked" class="coverage-gap-chip">
|
||||
{{ coverage.tests.unlinked }} guarding nothing found
|
||||
</span>
|
||||
<span v-if="coverage.tests.redundant" class="coverage-gap-chip">
|
||||
{{ coverage.tests.redundant }} redundant
|
||||
</span>
|
||||
</div>
|
||||
<TestGuardReview
|
||||
v-if="coverage.test_groups"
|
||||
:project-id="projectId"
|
||||
|
||||
Reference in New Issue
Block a user