Repository navigation
fix(conformance): enforce vendored upstream checksums - #60
Merged
Merged
Conversation
magnusp
force-pushed
the
fix/53-enforce-vendoring
branch
4 times, most recently
from
October 21, 2026 21:55
267b9e7 to
85ccaa9
Compare
Make the manifest the single source of truth for the conformance copy and the export tool. Verify CHECKSUMS.sha256 in CI and during the conformance build, copy only the manifest set, and delete stale generated sources on every build. Record upstream hashes separately from current hashes so a deliberate divergence requires an updated checksum and a rationale in the manifest. Add a self-test that proves drift, unlisted files, deleted files, and unrecorded divergences are rejected.
The antrun run goal requires test-scope dependency resolution, so binding verify-vendored-upstream to validate made the dependency-submission job resolve unpublished sibling artifacts. Run the check at generate-test-sources instead, where the conformance build already needs the test dependencies, and add a root validate step to CI to guard the aggregator.
magnusp
force-pushed
the
fix/53-enforce-vendoring
branch
from
October 21, 2026 21:58
85ccaa9 to
95e8912
Compare
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.
Closes #53. Part of #54.
Stacked on #28 (
feat/jdbc-xerial-conformance) because the conformance module, manifest, and vendored tree do not exist onmainyet. This PR touches only lane F's vendoring and conformance-harness files; the vendored bytes are unchanged.What changed
tools/export-upstreamupstream-xerial_sqlite-jdbc.manifestby default and refuses to export when it is missing or empty.--verify: offline manifest/tree/checksum verification, including a check that no unlisted file is present.--self-test: exercises drift, unlisted, deleted, missing-manifest, and unrecorded-divergence cases on a temporary copy.CHECKSUMS.sha256now records the pinned-tag hash (# upstream ...) separately from the current hash.libsql-conformance/pom.xmlexport-upstream --verifyatgenerate-test-sources, where the build already needs test-scope dependencies. Binding it tovalidatemademaven-antrun-plugin:runresolve unpublished sibling artifacts and broke rootmvn validate.target/generated-test-sources/xerialbefore every copy, so non-clean builds cannot compile stale sources.includesfileinstead of the wholesrc/test/javatree..github/workflows/ci.ymland.github/workflows/pr.yml--verifyand--self-testbefore the Maven build.mvn --batch-mode validateso the aggregator stays independent of reactor artifacts.upstream-xerial_sqlite-jdbc.manifest/CHECKSUMS.sha256Divergence mechanism
A deliberate vendored edit must:
# upstream <hash> ./pathline inCHECKSUMS.sha256.# divergence: <path> -- <non-empty reason>toupstream-xerial_sqlite-jdbc.manifest.--verifyrejects an unrecorded divergence and a rationale whose file still matches upstream.Contract decision
Parity with xerial 3.53.4.0 at the pinned tag remains the contract. This is harness/build enforcement only; no JDBC behavior or vendored byte changes. Deviations: none.
Evidence
Failing before the fix
One-byte change to a vendored file, baseline:
Unlisted vendored file, baseline:
Deleted vendored file with a stale generated source, baseline:
The new verifier also failed against the old checksum format before it was regenerated:
CI fix at
0cf2ccfed31748fc79ed154306abf4a4c98bc9e3Root cause:
maven-antrun-plugin:rundeclaresrequiresDependencyResolution=test. The conformance module's validate-bound execution therefore forced resolution oflibsql-jdbc,libsql-client, andlibsql-hrana-codeceven though rootmvn validatedoes not build sibling reactor modules.Failing before (head
663ec1e65119d9e9e8077f116ff39d36a05aba6d, with the local~/.m2snapshot artifacts removed so it matches a clean runner):Passing after (head
0cf2ccfed31748fc79ed154306abf4a4c98bc9e3):Passing after the fix
One-byte drift, unlisted file, missing manifest, and recorded divergence:
Manifest-only copy, deleted vendored file, and stale-source removal:
Full verification at
0cf2ccfed31748fc79ed154306abf4a4c98bc9e3The plain
./mvnw spotless:check verifyfails in this nono sandbox atlibsql-itestsbecause Testcontainers cannot read~/.docker/config.json(the documented AGENTS.md section 4 denial). PointingDOCKER_CONFIGat the module's readable empty auth config makes the full reactor pass. The requested./mvnw -pl libsql-conformance -am verifypasses without that override because the conformance module sets its owndocker.config.dir.Deviations
None.