[feature] Emit runner-info.xml with build SHA + JAR sha256 alongside JUnit output#51
Draft
joewiz wants to merge 1 commit into
Draft
[feature] Emit runner-info.xml with build SHA + JAR sha256 alongside JUnit output#51joewiz wants to merge 1 commit into
joewiz wants to merge 1 commit into
Conversation
Member
|
This PR seems to depend on another PR? |
Member
Author
|
[This response was co-authored with Claude Code. -Joe] @line-o — yes, you're right: this branch is built on top of `feature/qt4-xquery-update` and effectively depends on the QT4 bundle (#49). Since #49 is being moved to draft pending the post-7.0 XQ 4 / XQUF / XQFT integration push (eXist 7 is narrowing to XQ 3.1, code freeze for the beta is later today), I'm moving this one to draft as well. The runner-info.xml emission itself is suite-agnostic and could in principle be rebased onto `develop` for the 3.1 release, but that's a non-trivial rebase I'd rather not attempt today. Will revisit once #49 lands or split this out fresh against `develop` if there's appetite to include it in 7.0. |
…JUnit output Captures the runner JAR's git build SHA, sha256, and the embedded exist-core version into a sibling `runner-info.xml` written to the output directory root. Consumed by `eXist-db/exist`'s `compare-results.xslt` to surface a `comparison-warning` element when two runs' runner builds differ -- making runner-JAR drift directly attributable in CI XQTS comparison reports. Why: the same eXist source can produce dramatically different XQTS results when run against two different runner JAR builds (concrete data point from 2026-05-09: identical eXist SHA, +831 tests / 25x wallclock difference between the May 9 runner and the May 10 runner with the applyVersionHint cap-at-3.1 patch). Without metadata in the output, CI's `compare-results` transform attributes those deltas to the PR's source change, which is wrong. What changed: - New `RunnerInfo` helper reads the runner JAR's MANIFEST.MF (Git-Commit, Build-Tag, Build-Timestamp, ...), computes the JAR's sha256 via the existing `Checksum` utility, and reads the embedded exist-core's `META-INF/maven/org.exist-db/exist-core/pom.properties` for version + groupId + artifactId. All fields gracefully degrade to `unknown="true"` when not available (e.g., when the runner is launched via `sbt run` from a class directory rather than an assembled JAR). - `JUnitResultsSerializerActor` captures the run's start timestamp at construction and the xqts-version + test count from incoming `TestSetResults`, then writes `<output-dir>/runner-info.xml` during `FinalizeSerialization`. Failures here are logged but never raised -- emitting metadata must not affect the run's exit status. Companion eXist PR (the consumer of this metadata): TBD Parent issue: eXist-db/exist#6326 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1a5c00f to
c9da545
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.
Summary
Captures the runner JAR's git build SHA, sha256, and the embedded
exist-coreversion into a siblingrunner-info.xmlwritten to the output directory root. The metadata is consumed byeXist-db/exist'scompare-results.xsltto surface acomparison-warningelement when two runs' runner builds differ.Parent issue: eXist-db/exist#6326 (mitigation A).
Companion eXist PR: https://github.com/eXist-db/exist/pull/
Why
The same eXist source can produce dramatically different XQTS results when run against two different runner JAR builds. Concrete data point from a 2026-05-09 investigation, identical eXist SHA both runs:
applyVersionHintcap-at-3.1 patch)Without metadata in the output, CI's
compare-resultstransform attributes those deltas to the PR's source change. It's wrong. This patch is the first half of making such drift directly attributable.A second drift mode surfaced during PR #6331's perf-6322 investigation: locally-built runner JARs shade
exist-core, so two runs of the same runner-source git SHA can still differ if assembled from differentexist-coresnapshots.runner-info.xmlcaptures both signals (runner JAR's git-sha + sha256, and embeddedexist-core's version).What changed
RunnerInfohelper reads the runner JAR'sMETA-INF/MANIFEST.MFfor the fields already populated byCompile / packageBin / packageOptions(Git-Commit, Build-Tag, Build-Timestamp, ...), computes the JAR's sha256 via the existingChecksumutility, and reads the embedded exist-core'sMETA-INF/maven/org.exist-db/exist-core/pom.propertiesfor version + groupId + artifactId. All fields gracefully degrade tounknown=\"true\"when not available (e.g., when the runner is launched viasbt runfrom a class directory rather than an assembled JAR, or when a manifest field happens to be missing).JUnitResultsSerializerActorcaptures the run's start timestamp at actor construction and the xqts-version + test count from incomingTestSetResults, then writes<output-dir>/runner-info.xmlduringFinalizeSerialization. Failures are logged but never propagated -- emitting metadata must not affect the run's exit status.Sample output
Test plan
Risk and rollback
The change is purely additive. Reverting removes `runner-info.xml` emission; the runner runs normally otherwise. The companion XSLT side degrades to a no-op when `runner-info.xml` is absent, so the two PRs can land in either order.