Repository navigation
fix(ci): reuse verified Java artifacts across partial reruns - #45
Conversation
There was a problem hiding this comment.
Reviewed af28e01 by reading the diff and the surrounding workflow/release code. I did not run the tests or any workflow. Findings were not independently verified.
I found no definite logic bug in the manifest record/verify code or the SHA pinning. One item to resolve before merging, the rest are minor:
- Important:
[skip ci]is in the only commit's subject, so none of this workflow change has executed (the PR has no checks). The repo allows squash merges withCOMMIT_MESSAGESand rebase merges; either can carry the marker tomainand skip its push CI too. Fix: reword the commit without the marker, get a green fresh run, and do the partial-rerun acceptance list before merging. - Pre-existing: release-suffixed uploads can block "Re-run failed jobs" (inline).
- Nits: toolchain missing from the identity, token-less
dist-jardownload, loose negative assertions, heavily mocked test, no test of the workflow wiring (inline).
— Claude (Opus 5.5), automated review via Claude Code
Pin source commits once, use stable CI artifact names, and validate the complete native set before JAR assembly. Preserve explicit release preparation suffixes and the existing sealing contract. Add offline coverage for fresh and mixed-attempt native sets and provenance failures. Hosted acceptance and Claude review remain pending. Refs #39.
Tighten negative diagnostics, exercise binary-only release assembly, and cover workflow artifact/source/overwrite contracts. Use explicit token lookup for both JAR consumers and forward the maintenance suffix consistently. Document immutable release recovery and the ordinary CI policy allowing mixed floating toolchains. Hosted acceptance remains pending explicit authorization to lift the no-CI constraint; remove skip directives from all PR commits before merging. Refs #39.
cc91c94 to
be194d6
Compare
There was a problem hiding this comment.
Follow-up on be194d6. I read the full fix diff. 17fa267 has the same tree as the previously reviewed af28e01 (ae5c5a2). I did not run anything locally; test results below are from the CI logs.
Earlier findings
[skip ci]: resolved. Neither commit message carries it, and run 47118308653 is green on attempt 1, including both packages and all 12 consumer legs.- Release upload conflict: resolved by documentation. I checked the pre-tag recovery advice against the code: the suffix comes from
GITHUB_RUN_ATTEMPTwhenprepareruns, so "Re-run all jobs" does allocate a new one. - Toolchain identity: resolved as an explicit policy that mixed toolchains are acceptable for CI.
dist-jardownloads: both now passgithub-token. The cross-attempt lookup itself is still unexercised (see below).- Negative assertions: resolved. They match specific diagnostics, and
run_idis now mutated as a string. - Over-mocked assembly test: resolved. Only external commands are faked, and it checks copied resources and JAR contents.
- Workflow wiring: resolved by
test_java_ci_workflows.py. It ran inrelease-fixtures(78 tests, OK).
Still open before merge: the partial-rerun acceptance. The run has only had attempt 1, so the behaviour #39 is about has not been exercised on hosted runners: a universal2-only retry, a JAR-only retry and a consumer-only retry.
Nit, new: the "Acceptance and merge gate" section of .github/ci-artifacts.md is mostly this PR's checklist ("must still exercise a fresh patched run", "pre-fix run") and goes stale on merge. It is already in the PR description; consider dropping it from the permanent doc.
No new correctness issues found.
— Claude (Opus 5.5), automated review via Claude Code
There was a problem hiding this comment.
Remaining before merge (head be194d6, run 47118308653, attempt 1 green)
Re-run individual jobs in that same run, one at a time, waiting for each attempt to finish. GitHub also re-runs the jobs that depend on the selected one. Do not use "Re-run all jobs", and do not push in between, since a push starts a new run.
- 1. Native only: re-run
Package / Build native (universal2). Expect a new ID forci-native-universal2, the other six native IDs unchanged, and JAR assembly and consumers green. - 2. JAR only: re-run
Package / Assemble fat JAR. Expect all seven native IDs unchanged from step 1, a newdist-jar-ciID, and consumers green. - 3. Consumer only: re-run one
Consumer testleg from the ordinary build and one from the v2.x build. Expectdist-jar-ciandv2x-dist-jar-ciIDs unchanged from before this step, and both legs green. - 4. Source pinning: in each attempt, confirm
Pin source commits for this rundid not execute again and that the re-run jobs checked out the same source SHAs as attempt 1, including v2.x in step 3. Ifv2.xdoes not advance in the meantime, the "even if the maintenance branch advances" case is not directly exercised; say so when ticking it. - 5. Release suffix isolation: the PR description lists this as hosted acceptance but also excludes a release rehearsal. Either run a rehearsal, or move the item to a follow-up and rely on the contract tests for this PR.
- 6. Optional nit: drop the "Acceptance and merge gate" section from
.github/ci-artifacts.md. Do this after steps 1-4 if those results are to be kept against this run; the push will start a fresh CI run.
Attempt 1 artifact IDs for comparison:
| Artifact | ID |
|---|---|
ci-native-universal2 |
15727507392 |
ci-native-x86_64-unknown-linux-gnu |
15727183313 |
ci-native-aarch64-unknown-linux-gnu |
15727148543 |
ci-native-x86_64-unknown-linux-musl |
15727148151 |
ci-native-aarch64-unknown-linux-musl |
15724629429 |
ci-native-x86_64-pc-windows-msvc |
15724534576 |
ci-native-aarch64-pc-windows-msvc |
15727871123 |
dist-jar-ci |
15731295695 |
v2x-dist-jar-ci |
15730456124 |
List current IDs after each attempt:
gh api --paginate "repos/project-minigraf/minigraf-java/actions/runs/47118308653/artifacts?per_page=100" \
--jq '.artifacts[] | select(.name | test("native|dist-jar")) | [.name, .id] | @tsv' | sort— Claude (Opus 5.5), automated review via Claude Code
Remove the PR-specific acceptance checklist from the permanent policy. Keep the general guidance on workflow versions and expired artifacts. Acceptance results remain recorded in the pull request.
There was a problem hiding this comment.
Follow-up on e977265 and the hosted acceptance evidence.
New commit: changes only .github/ci-artifacts.md, removing the PR-specific section and keeping the general guidance. The nit is resolved; no new findings.
Acceptance on be194d6, run 47118308653: accepted. I checked the main claims against GitHub's API, job logs and the live artifacts, not only the supplied evidence package:
- All five attempts are green and executed 37, 8, 7, 1 and 1 jobs. The source resolver ran only in attempt 1.
- Attempt 2's JAR job downloaded six attempt-1 natives plus the replaced
ci-native-universal2(15743761270). This is the #39 scenario. - Attempt 3 reused all seven natives. Attempts 4 and 5 downloaded the retained
dist-jar-ci(15744659620) andv2x-dist-jar-ci(15730456124). - All 14 current native binaries match their manifest SHA-256. The natives embedded in both current JARs match those manifests.
- The Linux x86-64 consumer receipts in the package match the current distribution files in all five attempts' evidence (ordinary 1-4, v2.x 5).
- The seven rerun jobs whose logs I read checked out the attempt-1 SHAs. I did not read the logs of the other rerun consumer legs.
Accepted limits, as the description states: v2.x did not advance between attempts, and the hosted release rehearsal is deferred. Please open an issue for the rehearsal if there isn't one.
Still open before merge: CI on the current head is red. Run 47147361590 ended in failure after the description was written, so its "pending" text is out of date. The three macOS jobs were never assigned a runner ("not acquired by Runner of type hosted even after multiple attempts"), so JAR assembly and all consumers were skipped. Every job that got a runner passed; this is not a code failure.
- Use "Re-run failed jobs" on that run and get it green. The other 12 natives should be reused from attempt 1, which also exercises this fix on a real runner outage.
- Update the "Current documentation-only head" section of the description with the result.
— Claude (Opus 5.5), automated review via Claude Code
There was a problem hiding this comment.
Follow-up on the current-head recovery for e977265. I checked it against GitHub's API and the job logs, not only the supplied evidence package.
Both items from my previous review are resolved:
- CI on the current head is green. Run 47147361590 attempt 2 shows 37/37 jobs successful. 17 jobs executed: the three previously unassigned macOS jobs, both JAR assemblies and all 12 consumers. The other 20, including the source resolver, were retained.
- The release rehearsal is tracked in #46. Its acceptance steps cover the preparation-attempt vs workflow-attempt case and confirm that tagging and publishing stay skipped.
The recovery reused retained natives after a real runner outage:
- The ordinary JAR job downloaded six attempt-1 natives plus the new
ci-native-universal2(15799570045). The v2.x JAR job did the same withv2x-ci-native-universal2(15797026849). Both passed CI-native verification. - The Linux x86-64 consumers downloaded the new distributions,
dist-jar- 8000 ci15799575587 andv2x-dist-jar-ci15800925095. - All four jobs checked out the merge snapshot
30dd389, whose parents arecdbb50aande977265; the v2.x jobs also checked out047ad05.
I did not download this run's distributions; the byte-level checks in my previous review apply to run 47118308653. The description is updated to match.
I have no outstanding findings. Branch advancement between attempts was not exercised, and the release rehearsal remains deferred to #46; both are recorded in the description.
— Claude (Opus 5.5), automated review via Claude Code
Problem
Partial CI retries advance
github.run_attemptfor rerun jobs, while successful producers retain their earlier artifact names. In #39, the macOS retry uploaded an attempt-5 artifact while the other six natives still had attempt-4 names, so assembly could not find the complete set. Consumer-only retries had the same problem with the JAR artifact.Changes
cinames within a workflow run when no explicit suffix is supplied; permit replacement only for those CI package uploads.v2.xsource refs to immutable SHAs once, and pass the retained resolver outputs to packaging, source tests and consumers.release.ymlis unchanged.Stable names avoid attempt-search selection logic. Manifest validation supplies the early failure for missing, stale, conflicting or corrupt inputs.
Review follow-up
The latest review accepted the implementation, documentation cleanup and original five-attempt hosted acceptance. Its remaining CI-recovery and rehearsal-tracking requests are addressed below. The changes also address the earlier review findings:
github-token; the maintenance package forwards an explicit suffix consistently.After all retry acceptance completed, documentation-only commit
e9772656155122b7e41884fd55b617489cf92ad1removed the PR-specific merge checklist from the permanent guide and retained general workflow-version/expiry guidance. The final commit changes only.github/ci-artifacts.md; workflow, implementation and test files are unchanged from the tested head.Validation
All functional hosted acceptance passed on PR head
be194d63510ed62e55429abe72eaa90dddecdf66, using one run and four sequential individual-job retries. No push occurred between those attempts.universal2GitHub creates new check-run IDs for retained results, so execution counts were verified from original execution timestamps and complete step histories, rather than job IDs alone.
Artifact and source evidence
ci-native-universal2ID15727507392with15743761270. Its manifest records producer attempt 2. The other 13 native artifact IDs and archive digests remained unchanged, including all six ordinary peers.dist-jar-ciIDs progressed15731295695→15743407657→15744659620in attempts 1–3. Distribution-file hashes were unchanged. Attempt 4 downloaded retained ID15744659620.15730456124throughout; attempt 5 downloaded it successfully. Both consumer-only attempts preserved both distribution artifacts and all 14 native artifact IDs/digests.59702ed091abb4d865e2b21d6f9dfe926f106616(the PR merge snapshot). Maintenance source SHA:047ad05a01ab0b95544bc1953c2abf9c1d0fd1f2.Source-pinning limit:
v2.xremained at the same commit during these attempts. Retained resolver output use is verified; a maintenance-branch advance between attempts was not directly exercised.Fixture and release-isolation coverage
release-fixturespassed both complete suites: 32 shared release tests and 78 Java tests.4selection independently of the current attempt are covered by passing fixtures/contracts.release.ymlis unchanged.A hosted release rehearsal is tracked separately in #46; no release preparation, tagging or publishing was performed for this acceptance.
Current documentation-only head
CI on the current head
e9772656155122b7e41884fd55b617489cf92ad1is green: run 47147361590, attempt 2 completed with all 37 jobs successful.Attempt 1 failed because three macOS jobs were cancelled before receiving a runner; all 20 jobs that executed passed.
Re-run failed jobsrecovered the run on the same head:15799570045and maintenance macOS artifact15797026849were added with producer-attempt-2 manifests. Both passed independent target, identity and archive/binary digest checks.15799575587and maintenance distribution15800925095were consumed by their respective source lines; representative consumer logs and provenance receipts were verified.30dd3897280e31e692ac76c943475afe77b24a8d(this head's PR merge snapshot) and maintenance source047ad05a01ab0b95544bc1953c2abf9c1d0fd1f2.This also exercises partial-rerun reuse on both source lines after a real runner-allocation failure. The original five-attempt controlled acceptance above remains complete.
An already-started run retains the workflow and artifact protocol that started it. Start a fresh run after changing that protocol; expired or deleted inputs require rebuilding the affected producers.
Related audit
Read-only inspection found the same fallback in the other six bindings' main workflows: Node has the closest native-aggregation equivalent; C/Python have matrix-to-consumer gaps; WASM/Android/Swift have consumer-only retry gaps. Android also supplies the attempt fallback in its CI caller. Those repositories are outside this PR.
Closes #39.