fix(ci): un-poison the Maven cache so the Tycho baseline gate actually runs - #1497
Merged
joaodinissf merged 3 commits intoAug 24, 2026
Merged
Conversation
The Actions dependency cache persists Tycho's HTTP cache (~/.m2/repository/.cache/tycho) inside ~/.m2/repository. Tycho's cache-first transport never revalidates cached 404/301 entries and p2/releases/latest + p2/snapshots/latest are moving pointers, so restored blobs served a stale baseline and the compare-version-with-baselines gate passed vacuously (the mojo has no 'baseline not found' branch) - every compare execution completed in 1-22 ms with no network access and no comparisons, and the snapshot baseline validator logged 'No baseline version' for all 64 modules in every run since May. This is how dsldevkit#1474 changed bundle content without a version bump and still passed maven-verify. Delete only the DDK hosts' cached metadata after each cache restore, in verify.yml and snapshot.yml: the baseline is fetched fresh (a few KB) while versioned eclipse.org metadata and all downloaded artifacts stay cached. release.yml runs no Maven build and needs no change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Run https://github.com/dsldevkit/dsl-devkit/actions/runs/32746448963 (first run with the revived baseline gate) failed with 'Only qualifier changed for (com.avaloq.tools.ddk/17.3.1.v20260824-1542)' on an UNCHANGED bundle: the shallow clone (default fetch-depth 1) of the PR merge ref leaves Tycho's jgit build-qualifier no history, so every bundle's qualifier falls back to the HEAD timestamp. With correct per-bundle qualifiers, unchanged bundles match the baseline version exactly and pass via content comparison. A second latent bug masked by the cache poisoning: even with a clean cache, every PR build would have false-positived on all bundles. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The revived baseline gate correctly rejects same-version artifacts whose content differs from the v19.0.0 baseline. The tycho.version 5.0.3 -> 5.0.4 bump (0d9deaf) changed the compiled output of the Xtend-heavy bundles (e.g. generic-signature emission: Class<? extends Object> vs Class<?>) without touching their sources, so their jgit qualifiers - and versions - stayed at the baseline values. Bump the 18 affected bundles to 17.3.2 and, since their bumped versions change the built feature content, both features to 19.0.1 (with category.xml following). Enumerated with a full local reactor run using -DonIllegalVersion=warn against the live v19.0.0 baseline. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
joaodinissf
force-pushed
the
fix/ci-baseline-cache-poisoning
branch
from
August 24, 2026 16:52
c8c91fd to
4e79db7
Compare
rubenporras
approved these changes
Aug 24, 2026
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.
Summary
The Tycho baseline gate (
compare-version-with-baselines) has never actually compared against the live baseline repository in CI. This PR fixes three stacked problems — a poisoned metadata cache that made the gate pass vacuously, a shallow-clone qualifier bug (masked by the first) that would have made it fail on everything, and missing version bumps for bundles whose compiled output changed with the Tycho 5.0.4 toolchain bump (masked by both) — and proves the revived gate with a canary run (see Proof below).Context: #1474 changed bundle content without a version bump and still passed
maven-verify(comment).Root cause
snapshot.yml(save) andverify.yml(restore) cache~/.m2/repository, which contains~/.m2/repository/.cache/tycho— Tycho's transport cache for p2 metadata.cache firstand does not reliably revalidate. Cached 404/301 entries are served forever without revalidation; a 60-minute minimum-cache floor covers back-to-back master builds; and 304 revalidations refresh the staleness clock. Thep2/releases/latestandp2/snapshots/latestcomposites are moving pointers, so serving them from a restored cache means the build sees a stale (or effectively empty) baseline.CompareWithBaselineMojoiterates the resolution result; if the baseline IU isn't found, the loop body never executes — no warning, no failure.Observable evidence (run 32737809045, the run behind #1474's green check):
compare-version-with-baselinesexecution completed in 1–22 ms with zero output — no time for any network access, no content comparisons, no version errors. Bundles changed since v19.0.0 with unchanged17.3.1versions must fail this check when the real baseline is visible.Update mode: cache first,Cache location: /home/runner/.m2/repository/.cache/tycho.No baseline version <GAV>for all 64 modules in every run since May — including modules whose exact qualifiers were guaranteed to be published insnapshots/latestminutes earlier. The baseline repos have been effectively invisible to CI the whole time.Meanwhile the same mojo, same Tycho 5.0.4, same URL, run locally with a fresh cache, correctly fails (
Version has moved backwards…/Only qualifier changed…), and the published repo itself is complete and correct (all 87 IUs resolvable; verified viatycho-p2-extras:mirror).Why nobody noticed: before v19.0.0 (Aug 19) the baseline held
17.3.0bundles while the reactor was17.3.1-SNAPSHOT— a working check would also have passed silently. The gate only grew teeth when v19.0.0 put17.3.1in the baseline, and #1474 was the first qualifier-only change to cross it.Second root cause, exposed by the first fix
The first run with a clean cache (32746448963) immediately failed with
Only qualifier changed for (com.avaloq.tools.ddk/17.3.1.v20260824-1542)— on a bundle untouched since June. The qualifier is the run's own timestamp:verify.ymlchecked out the PR merge ref with the default shallow clone (fetch-depth: 1), leaving Tycho's jgit build-qualifier no history, so every bundle's qualifier falls back to the HEAD timestamp. Even with a clean cache, every PR build would have false-positived on all bundles. (snapshot.ymlalready usesfetch-depth: 0, so master builds were unaffected.) That run doubles as proof the gate is alive.Fix
verify.ymlandsnapshot.yml:Surgical on purpose: the only moving pointers in the build are the two
latestcomposites on these hosts. Versioned eclipse.org repo metadata and all downloaded artifacts (including baseline jars, cached by exact version under~/.m2/repository/p2/…) stay cached. Cost: a few KB of metadata re-fetched per run.release.ymlneeds no change (it promotes snapshots on gh-pages without a Maven build).fetch-depth: 0on themaven-verifycheckout so jgit computes real per-bundle qualifiers: unchanged bundles then match the baseline version exactly and pass via content comparison.Third finding: the Tycho 5.0.4 bump changed compiled output without version bumps
With correct qualifiers (run 32747012141) the gate reported
same fully qualified version, but different contentoncom.avaloq.tools.ddk.xtextandcom.avaloq.tools.ddk.test.ui— correctly. Diffing the published jars (release v19.0.0 build vs snapshot0d9deaf6build of identical sources) shows the divergence: the tycho.version 5.0.3→5.0.4 bump (#1496) changed generic-signature emission in compiled classes (Class<? extends Object>vsClass<?>) without touching any bundle source, so jgit qualifiers — and versions — stayed at baseline values while content changed. The gate exists precisely to catch this.A full reactor run with
-DonIllegalVersion=warnagainst the live baseline enumerated the complete set: 18 bundles (the Xtend-heavy ones) + both features (their builtfeature.xmlembeds the bumped plugin versions). This PR bumps those bundles to17.3.2, the features to19.0.1, andcategory.xmlaccordingly.Proof
fetch-depth: 0com.avaloq.tools.ddk, no version bumpOnly qualifier changed for (com.avaloq.tools.ddk/17.3.1.v20260824-1635). Expected to have bigger x.y.z than what is available in baseline (17.3.1.v20260601-1241)— exactly the failure #1474 should have producedThe canary is removed by force-push rather than revert: a revert commit would itself move the bundle's jgit qualifier past the baseline again and keep the gate red — same-version bundles must stay untouched until the next release.
Notes / follow-ups
tycho-p2-pluginbaseline (baselineRepositories→snapshots/latest). NobaselineMode/baselineReplaceis configured, so Tycho defaults apply (warn+all): identical rebuilt artifacts get replaced by their published baseline versions and content mismatches warn — builds won't start failing from that mechanism.17.3.2, or17.3.3if preferred after this PR's bumps —com.avaloq.tools.ddk.xtext.formatis not among the 18 bumped here, so17.3.2is free for it).🤖 Generated with Claude Code