feat(8246): the code index links each test to what it guards, and can say redundant or unused
CI & Build / Plugin hooks (push) Successful in 20s
CI & Build / Python lint (push) Successful in 3s
CI & Build / TypeScript typecheck (push) Successful in 41s
CI & Build / Python tests (push) Failing after 2m8s
CI & Build / integration (push) Successful in 2m24s
CI & Build / Build & push image (push) Skipped

Every coverage refresh now reads, for each test in a bound repo, which product
shapes its body exercises: through module aliases and imports, following test
helpers, with mocked names left out and shapes most test files reach dropped as
hubs. Tests in different files that guard exactly the same set form a group.
The project page lists the groups and a person can mark one test redundant,
naming the test that covers it, or keep them all with a reason. Agents get
test_guard_groups and review_test_group, and classify_shapes takes the two new
removal verdicts, redundant (with covered_by) and unused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-30 21:17:48 -05:00
co-authored by Claude Opus 5.5
parent 134dd68274
commit 865465ce8f
19 changed files with 1412 additions and 27 deletions
+10 -1
View File
@@ -18,6 +18,7 @@ import { canWriteRecord } from "@/utils/permission";
import ProjectRulesTab from "@/components/rules/ProjectRulesTab.vue";
import SystemsSection from "@/components/SystemsSection.vue";
import InceptionCard from "@/components/InceptionCard.vue";
import TestGuardReview from "@/components/TestGuardReview.vue";
import { fmtDate } from "@/utils/dateFormat";
import type { InceptionDecision, InceptionRecord } from "@/api/inception";
import {
@@ -498,6 +499,8 @@ interface Coverage {
divergent?: number;
divergence?: Divergence[];
recheck?: number;
// Same-guard test groups awaiting a verdict (TestGuardReview).
test_groups?: number;
}
interface Divergence {
path: string;
@@ -834,7 +837,7 @@ async function confirmDelete() {
</div>
<div v-if="coverage.counts" class="coverage-gaps">
<span
v-for="k in ['canonical', 'instance', 'variant', 'exempt', 'scoped']"
v-for="k in ['canonical', 'instance', 'variant', 'exempt', 'redundant', 'unused', 'scoped']"
:key="k"
>
<span v-if="coverage.counts[k]" class="coverage-gap-chip">
@@ -888,6 +891,12 @@ async function confirmDelete() {
{{ coverage.recheck }} to recheck
</span>
</div>
<TestGuardReview
v-if="coverage.test_groups"
:project-id="projectId"
:can-write="!!project && canWriteRecord(project.permission)"
@changed="loadCoverage"
/>
</template>
<p v-else class="coverage-empty">
Not measured yet — Refresh reads the bound repo's definitions into