D-162: Clojure adapter — project.clj and deps.edn resolve to Maven coordinates - #132
Merged
Merged
Conversation
…coordinates
D-161 made swytch.jepsen's project.clj a disclosed gap; its JDBC driver's
three real advisories stayed invisible. This resolves the Clojure manifest
family (Leiningen project.clj, tools.deps deps.edn) to Maven coordinates:
nodes carry Ecosystem "maven", group:artifact names, and pkg:maven PURLs —
the coordinate space OSV ("Maven"), deps.dev ("maven"), and any future
pom.xml/Gradle adapter share.
- Literal direct pins are observed facts (both tools fetch the stated
version); ranges, RELEASE/LATEST, and symbol versions disclose as
unresolved; :git/url and :local/root carry their source class + ref;
unparsed entries become placeholder unresolved names. Every root sets
flat resolution — the formats record no transitive structure (the
Pipfile.lock precedent: disclosed, not gated). Profile and alias deps
are read; #_ discards, comments, and string contents never resolve.
- One mapping case each in the OSV client (maven -> "Maven") and deps.dev
(both directions) — the -expand tier can now deepen Clojure trees.
- project.clj / deps.edn promoted out of the D-161 gap tables per the
supported-manifests contract; the D-161 CLI regression moves its gap
half to pom.xml and asserts the jepsen shape now resolves non-vacuously.
Validation: two-sided unit tests; two fuzz targets (seeded, 20s local,
added to the CI fuzz roster); mutation-checked at both wires (OSV mapping,
adapter registration); full suite green (35 packages), -race clean. Live-
fired: the jepsen fixture resolves to four pkg:maven nodes; with
api.osv.dev egress-blocked in this environment the scan disclosed
"degraded data source(s): osv ... NOT an all-clear", and the OSV wire
format is pinned in maven_test.go instead. D-162 entry appended to
docs/DECISIONS.md.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018d8nb38Prtn8dzwep6jaH9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The ecosystem expansion the swytchdb scan called for: a clojure adapter (
internal/ecosystem/clojure) that statically resolves Leiningenproject.cljand tools.depsdeps.edndirect dependencies. D-161 madeswytch.jepsena disclosed gap; this makes it a scanned project —org.postgresql:postgresql@42.7.4and its 3 advisories become visible to VC-008 instead of invisible.Design
Nodes carry
Ecosystem "maven", not "clojure" — the manifest family is Clojure, but the packages live at Maven coordinates, and every downstream authority speaks Maven: OSV ecosystem"Maven"withgroup:artifactnames, deps.dev systemmaven, PURL typepkg:maven. One mapping case each in the OSV client and deps.dev (both directions) wires the whole pipeline, and the existing-expandtier can now deepen Clojure trees from deps.dev. A future pom.xml/Gradle adapter emits into the same space unchanged.Claims vs. refusals (D-24):
RELEASE/LATEST, build-time symbol versions → declared-but-unresolved, never guessed.:git/url/:local/root→SourceGit/SourcePathwith ref — non-registry, no advisory coverage, disclosed.:dependenciesand alias:extra-deps/:replace-depsare read (same fetch surface);#_discards, comments, and string contents never become nodes.The reader is a bracket/string scanner, not an EDN parser (zero-dependency discipline) — comment stripping respects strings and
\;character literals, so a dependency spelled in a docstring can't be manufactured (the D-153 lesson applied at parse time).Gap-table promotion:
project.clj/deps.ednleave the D-161 tables per the supported-manifests contract. The D-161 CLI regression is knowingly superseded: its gap half moves topom.xml(still recognized-but-unread), and the jepsen fixture now asserts non-vacuous resolution — the verdict must contain the postgresql PURL, so an unregistered adapter can't pass on exit codes alone.Validation
FuzzParseProjectClj+FuzzParseDepsEdn(never panic/stall, no coordinate escapes the symbol shape), seeded, 20s each locally, added to the CI fuzz roster.pkg:mavennodes through the built binary.api.osv.devegress is blocked in this environment, and the scan discloseddegraded data source(s): osv … NOT an all-clear— the D-24 machinery working for the new ecosystem. The denied round-trip is pinned at the wire instead (maven_test.go: body must carry"ecosystem":"Maven"+ verbatimgroup:artifact).-raceclean, gofmt/vet silent. D-162 entry indocs/DECISIONS.md.Residuals (disclosed, not smuggled)
Transitives only via
-expand(labelled, never gating — no committed lockfile format exists). No Maven/Clojars registry source yet → VC-004/VC-005/VC-011/VC-012 don't fire on maven nodes (natural next increment).:plugins/:managed-dependenciesunread.pom.xmlstill a disclosed gap. Homebrew unchanged. Maven version-range evaluation not implemented — a range discloses as unresolved.🤖 Generated with Claude Code
Generated by Claude Code