Skip to content

feat(gate): emit self JUnit + reclassify doc/scaffold test_refs as evidence_refs#220

Open
yuyu04 wants to merge 1 commit into
qwerfunch:developfrom
yuyu04:feature/self-junit-emission
Open

feat(gate): emit self JUnit + reclassify doc/scaffold test_refs as evidence_refs#220
yuyu04 wants to merge 1 commit into
qwerfunch:developfrom
yuyu04:feature/self-junit-emission

Conversation

@yuyu04

@yuyu04 yuyu04 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

What

cladding's UNVERIFIED_AC detector verifies each done AC's test_refs actually ran and passed via a JUnit report — but cladding never emitted one for itself, so on its own self-gate the check silently degraded to existence-only: zero self-benefit (the gap flagged while triaging #201/#202).

This wires the emission and fixes what enabling it exposed.

Changes

1. Emit JUnit (vitest.config.ts)

reporters: ['default', ['junit', {outputFile: '.cladding/test-report.junit.xml'}]] — a DEFAULT_REPORT_CANDIDATE the detector auto-discovers, under .cladding/ (gitignored, never pollutes git status). In CI npm test runs before clad check, so the gate reads a fresh, complete report and now genuinely verifies AC↔test↔observed-pass.

2. Reclassify 15 mis-categorized test_refsevidence_refs (10 features)

Turning emission on first surfaced 21 warnings: 15 test_refs pointed at things that are not executable tests and so have no observed result in any JUnit:

  • docs (docs/ab-evaluation*/**.md), .gitignore, spec.yaml (dogfood markers), and underscore-prefixed scaffolds (_vanilla-sim.ts, _shared-scaffold.ts, _drift-injection.ts, _curator.ts, _size-budgets.ts).

MISSING_TESTS is satisfied by either test_refs or evidence_refs, so each AC stays verified — the refs are now recorded as the doc/artifact evidence they actually are (undoing the v0.2.2 "lump everything into test_refs" dishonesty that had recurred). One AC (F-d8223c) kept its real self-consistency.test.ts test_ref and moved only the scaffold.

Note: src/stages/detectors/README.md row | 37 | was not touched — it's the catalog ordinal, not a count (handled separately in #219).

Verification

  • UNVERIFIED_AC 0 / UNTESTED_AC 0 / MISSING_TESTS 0; strict gate GREEN with the report present — the self-gate now exercises its own JUnit feature instead of perpetually degrading.
  • Full local CI mirror green: build+diff, typecheck, lint, npm test, conformance, clad check --tier=pre-commit --strict.
  • attestation re-stamped (the 10 edited shards' features).

Base note

Branched off develop (independent of #219). Both re-stamp spec/attestation.yaml, so whichever of #219/this merges second needs a trivial clad sync + re-attest — no logical conflict.

Closes the ② half of the #202 follow-up (① = detector count, shipped in #219).

🤖 Generated with Claude Code

… evidence_refs

cladding's UNVERIFIED_AC detector verifies that each done AC's test_refs
actually RAN and PASSED (via a JUnit report) — but cladding never emitted one
for itself, so on its own gate the check degraded to existence-only and gave
ZERO self-benefit. Enabling emission first surfaced 21 warnings: 15 test_refs
across 10 features pointed at things that are not executable tests (docs,
underscore-prefixed scaffolds, .gitignore, spec.yaml dogfood markers), so they
have no observed result in any JUnit report.

- Wire vitest to emit JUnit to .cladding/test-report.junit.xml (a
  DEFAULT_REPORT_CANDIDATE the detector auto-discovers; gitignored, so it never
  pollutes git status). In CI `npm test` runs before `clad check`, so the gate
  reads a fresh, complete report and now genuinely verifies AC↔test↔pass.
- Reclassify the 15 non-test refs test_refs → evidence_refs. MISSING_TESTS is
  satisfied by EITHER test_refs or evidence_refs, so each AC stays verified;
  the refs are simply recorded as the doc/artifact evidence they actually are
  (the v0.2.2 "lump everything into test_refs" dishonesty, recurring). One AC
  (F-d8223c) kept its real self-consistency test_ref and moved only the
  scaffold.

Result: UNVERIFIED_AC 0 / UNTESTED_AC 0 / MISSING_TESTS 0, strict gate GREEN
with the report present — the self-gate now actually exercises its own JUnit
feature instead of perpetually degrading.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@yuyu04 yuyu04 force-pushed the feature/self-junit-emission branch from 208bd0a to 9c1e1fb Compare July 2, 2026 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant