Skip to content

Fix early-access never re-downloading; print local jar paths - #82

Merged
sake92 merged 1 commit into
mainfrom
fix/early-access-redownload
Jun 14, 2026
Merged

Fix early-access never re-downloading; print local jar paths#82
sake92 merged 1 commit into
mainfrom
fix/early-access-redownload

Conversation

@sake92

@sake92 sake92 commented Jun 14, 2026

Copy link
Copy Markdown
Owner

When an early-access build was detected as stale, the client printed "downloading..." but downloadAndCache's re-check short-circuited on the intact-but-stale cached jar (verifyCachedChecksum only checks local integrity, not freshness) and returned the old jar without downloading. getArtifact then wrote the new remote updated_at, marking the stale jar fresh so it would never update again.

Delete the stale jar + checksum before re-downloading (mirroring the checksum-mismatch branch) so a real download happens. This also removes the duplicate "re-downloading"/"downloading" stderr lines.

Also print the absolute jar path when using local server/test-runner builds.

Summary by CodeRabbit

  • Bug Fixes

    • Fixed stale early-access artifact cache not being properly cleared before re-download, ensuring fresh versions are retrieved when needed
  • Improvements

    • Enhanced logging to display resolved artifact paths with greater clarity when using local artifacts

When an early-access build was detected as stale, the client printed
"downloading..." but downloadAndCache's re-check short-circuited on the
intact-but-stale cached jar (verifyCachedChecksum only checks local
integrity, not freshness) and returned the old jar without downloading.
getArtifact then wrote the new remote updated_at, marking the stale jar
fresh so it would never update again.

Delete the stale jar + checksum before re-downloading (mirroring the
checksum-mismatch branch) so a real download happens. This also removes
the duplicate "re-downloading"/"downloading" stderr lines.

Also print the absolute jar path when using local server/test-runner
builds.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ec4f7fac-dce6-46e2-ac95-aee97a2a5b47

📥 Commits

Reviewing files that changed from the base of the PR and between 028bcaa and db0e8dd.

📒 Files selected for processing (2)
  • client/src/ba/sake/deder/client/ArtifactCache.java
  • client/src/ba/sake/deder/client/ArtifactManager.java

📝 Walkthrough

Walkthrough

ArtifactCache.getArtifact now deletes both the cached JAR and its .sha256 checksum file when the "early-access" artifact is stale before re-downloading. ArtifactManager.ensureArtifact updates its local-path log line to print the resolved absolute path.

Changes

Artifact Cache Eviction and Logging

Layer / File(s) Summary
Stale early-access cache deletion and local path logging
client/src/ba/sake/deder/client/ArtifactCache.java, client/src/ba/sake/deder/client/ArtifactManager.java
ArtifactCache deletes the stale cached JAR and its .sha256 file before invoking downloadAndCache, preventing a stale checksum from short-circuiting the re-download. ArtifactManager now prints the resolved absolute path of the local artifact in its status message.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Sniff sniff! A stale old JAR must go,
The .sha256 too—delete them so!
No shortcuts past the checksum gate,
Fresh downloads only, never stale.
And local paths now shine complete — 🌟
Absolute truth for every feat!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/early-access-redownload

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sake92
sake92 merged commit ee2c826 into main Jun 14, 2026
2 of 3 checks passed
@sake92
sake92 deleted the fix/early-access-redownload branch June 14, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant