Add fat-jar smoke test to CI pipeline - #173
Merged
Merged
Conversation
The srcmorph-cli fat jar is a GitHub-Release asset, built and GPG-signed on the publish path — and never once launched. Nothing else in the build touches it either: unit tests, PIT, SpotBugs and ArchUnit all run off target/classes, and `mvn package` only asserts that the assembly plugin wrote a file. So a missing Main-Class, a shade-mangled resource or an absent SLF4J binding would ship signed and unrunnable. Signing proves who built it, not that it works. java-llama.cpp shipped a corrupt native library through three releases for exactly this reason. The new smoke-fatjar job (needs: [build], in both publish jobs' needs) downloads plugin-jars and runs the CLI from examples/ against config_Plan.json, asserting exit 0 plus `Main#run end.` — the exit code alone is satisfied by a JVM that starts and does nothing. `Plan` with the mock provider needs no GGUF, no GPU and no network. .github/smoke-fatjar-cli.sh is kept byte-identical with BitcoinAddressFinder (both CLIs derive from the same cli.Main pattern and log the same marker); sync any edit to both copies and to the checksum table in workspace/crossrepostatus.md. The rule and the per-repo assertion table live in workspace/policies/fat-jar-release-assets.md. Deliberately not `All` over a real source tree: the example configs are tuned for a small demo tree, so All against this repo's own sources fails by design (19 files exceed the demo model's context window with onOversize=fail) — non-deterministic, not more thorough. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tzo7Yi8SXP6WxhqZXXbsco
bernardladenthin
had a problem deploying
to
maven-central
August 14, 2026 07:07 — with
GitHub Actions
Failure
bernardladenthin
had a problem deploying
to
startgate
August 14, 2026 07:07 — with
GitHub Actions
Error
bernardladenthin
had a problem deploying
to
maven-central
August 14, 2026 07:07 — with
GitHub Actions
Failure
|
✅ Review Complete No bugs, security issues, or architectural problems found. Summary: This PR successfully adds a critical smoke test for the fat jar artifact, addressing a real gap where unit tests run off target/classes and never touch the assembled uber jar. An unrunnable artifact (missing Main-Class, shade-mangled resources, absent SLF4J binding) could ship and be GPG-signed without detection. Key Strengths:
Quality: The shell script uses set -euo pipefail, validates directories exist, handles timeouts (600s), and requires both exit code 0 AND success marker in output. This is production-ready. Ready to merge. |
|
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
.github/smoke-fatjar-cli.sh, a cross-repo shared script that smoke-tests the fat jar by actually launching it withjava -jarand verifying exit code 0 plus a success marker in outputsmoke-fatjarjob into the publish workflow, gating both snapshot and release publication on successful fat-jar executionconfig_Plan.jsonwith themockprovider is the appropriate test caseRationale
The fat jar is a GitHub Release asset, but unit tests run off
target/classesand never touch the assembled artifact. An unrunnable uber jar—missing Main-Class, shade-mangled resources, absent SLF4J binding—can be built and GPG-signed without detection. The smoke test catches these issues by executing the actual published artifact before release, implementing the cross-repo policy documented inworkspace/policies/fat-jar-release-assets.md: "no release asset is attached that CI has not run."The test uses
config_Plan.jsonwith themockgeneration provider, which requires no GGUF model, GPU, or network—the cheapest possible real launch of the CLI. ThePlancommand cannot fail for configuration reasons and completes deterministically, making it ideal for smoke testing.Test plan
Related issues / PRs
Implements the cross-repo fat-jar release asset policy from
workspace/policies/fat-jar-release-assets.md.Checklist
CONTRIBUTING.mdandCODE_OF_CONDUCT.mdhttps://claude.ai/code/session_01Tzo7Yi8SXP6WxhqZXXbsco