Skip to content

D-161: zero coverage is not a clean pass — Clojure gap names + -require-project - #131

Merged
MoSLoF merged 1 commit into
mainfrom
claude/assess-outstanding-branches-yc5chi
Aug 28, 2026
Merged

D-161: zero coverage is not a clean pass — Clojure gap names + -require-project#131
MoSLoF merged 1 commit into
mainfrom
claude/assess-outstanding-branches-yc5chi

Conversation

@MoSLoF

@MoSLoF MoSLoF commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

What

Closes the D-161 candidate from the 2026-08-28 swytchdb live scan: swytch.jepsen — a Leiningen project whose project.clj declares org.postgresql:postgresql@42.7.4 (3 real advisories) — produced no supported projects found (nothing to scan) at exit 0, with -fail-on-incomplete set.

Verification narrowed the diagnosis

The report framed this as "-fail-on-incomplete passes the zero-coverage case." That's half right. Reproduced live before writing any code:

  • The D-59 machinery already works: a recognized-but-unresolvable manifest (e.g. a bare pom.xml) is disclosed as incomplete coverage and exits 3 under -fail-on-incomplete today. The jepsen miss was two absent table entries — project.clj and deps.edn were simply not in gapManifestByName.
  • The genuinely open shape was a directory with no recognized manifest at all: its clean exit is deliberate (a full-send sweep must not fail on an empty or unsupported-only repo), but for a CI job pointed at a repo that must contain a project, a deleted/renamed manifest is indistinguishable from a clean pass.

Fix — two parts matching the two shapes

  1. Gap tables: project.clj (leiningen) and deps.edn (clojure) join the exact-name table (.clj/.edn are general extensions, so name-only per the OPU-18 dedication rule). A jepsen-shaped repo now discloses as incomplete coverage, emits a real JSON verdict (previously: no output at all — the report's third ask, satisfied by flowing through the normal pipeline), and fails -fail-on-incomplete at exit 3.
  2. -require-project (opt-in): zero discovered projects fails the run at exit 3 instead of the clean nothing-to-scan pass, in both recursive and -no-recursive modes. Defaults unchanged: sweeps still cross empty repos clean, and -fail-on-incomplete alone still passes a genuinely empty directory, because nothing was expected there.

Validation

  • Two-sided CLI tests (d161_zero_coverage_test.go): jepsen shape ungated (disclosed, exit 0) and gated (exit 3); empty dir clean by default and under -fail-on-incomplete, exit 3 under -require-project in both modes; -require-project passes on a real project.
  • Mutation-checked: reverting the two fix files fails all three new tests.
  • Live-fired through the built binary on the original repro directories, same results.
  • Full suite green (34 packages), -race clean on touched packages, gofmt/vet silent.
  • D-161 entry appended to docs/DECISIONS.md.

Not included (deliberate)

  • Homebrew formulae: a distribution-integrity surface, not a dependency manifest; .rb is any Ruby source, so this needs real formula parsing, not a name-table entry. Left as the narrower ask the report itself judged it.
  • Actually parsing Maven/Clojars manifests: ecosystem work of a different size — the declared deps still aren't resolved against OSV, they're now disclosed as unread instead of silently skipped. Backlog item.

🤖 Generated with Claude Code


Generated by Claude Code

…re-project

The swytchdb live scan walked a Leiningen project whose project.clj declares
a JDBC driver with three real advisories, and exited 0 with "nothing to
scan" — under -fail-on-incomplete. Verification narrowed the diagnosis: the
D-59 recognized-manifest machinery already handles this (a bare pom.xml
gates at exit 3 today); project.clj and deps.edn were simply missing from
the gap tables. The genuinely open shape was a directory with NO recognized
manifest, whose clean exit is deliberate for sweeps but wrong for a CI job
pointed at a repo that must contain a project.

- gap tables: project.clj (leiningen) and deps.edn (clojure), exact-name
  per the OPU-18 dedication rule (.clj/.edn are general extensions). A
  jepsen-shaped repo now discloses as incomplete coverage, emits a real
  JSON verdict, and fails -fail-on-incomplete at exit 3.
- -require-project (opt-in): zero discovered projects fails the run at
  exit 3 instead of the clean nothing-to-scan pass, in both discovery
  modes. Defaults unchanged: sweeps still cross empty repos clean.

Validation: two-sided CLI tests (d161_zero_coverage_test.go), mutation-
checked (reverting the fix files fails all three new tests), live-fired on
the original repro directories. Full suite green, -race clean on touched
packages, gofmt/vet silent. D-161 entry appended to docs/DECISIONS.md.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018d8nb38Prtn8dzwep6jaH9
@MoSLoF
MoSLoF merged commit 6312f2d into main Aug 28, 2026
11 checks passed
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.

2 participants