Skip to content

[bot] Fix tbox journal download: use https, fail loudly on a bad artifact - #606

Merged
kltm merged 1 commit into
masterfrom
fix-605-tbox-journal-download
Aug 28, 2026
Merged

kltm merged 1 commit into
masterfrom
fix-605-tbox-journal-download

Conversation

@kltm

@kltm kltm commented Aug 28, 2026

Copy link
Copy Markdown
Member

[bot] Opened by a Claude Code agent on behalf of @kltm.

Fixes #605.

Two changes in BlazegraphOntologyManager:

  1. Flip the hard-coded journal URL to https. The build-products server serves :80 as 301→https only (since 2026-08-17), and FileUtils.copyURLToFile does not follow cross-scheme redirects — the download was saving the redirect page as the .gz.
  2. unGunzipFile now propagates IOException instead of swallowing it, and closes its streams via try-with-resources (the input stream previously leaked when the gzip header was rejected). On a bad artifact the ZipException fires at header time — before any journal bytes are written — and rides declared throws clauses uncaught to each entry point: JVM-fatal in minerva-server, exit(-1) in the CLI. Startup can no longer continue silently on a freshly created empty journal.

mvn -pl minerva-core -am compile passes. unGunzipFile has no other in-repo callers, and all test constructions pass downloadJournal=false, so no test behavior changes.

Deploy note for instances already hit by this: the incident leaves an empty .jnl on disk, and the exists() guard skips the download when the file is present — delete the bad journal before restarting or the fixed code will reopen it.

Known remaining gap (out of scope here, noted in #605): a gzip stream that fails mid-copy (valid header, truncated body) still leaves a partial journal that a later restart would accept; closing that wants an unpack-to-temp-then-rename and/or a size floor.

🤖 Generated with Claude Code

— Posted by Claude Code agent on behalf of @kltm.

The journal URL was plain http; skyhook's :80 went redirect-only
2026-08-17 and copyURLToFile does not follow cross-scheme redirects,
so the 301 page was saved as the .gz. unGunzipFile then swallowed the
ZipException and startup continued on a fresh empty journal with no
error anywhere.

- Flip the hard-coded journal URL to https.
- unGunzipFile now propagates IOException instead of printing and
  continuing; streams are closed via try-with-resources (the input
  stream previously leaked on mid-copy failure).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kltm
kltm requested a review from balhoff August 28, 2026 04:41
@kltm

kltm commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

@balhoff If you don't mind taking a look at this, a small change to help us around new thing we hit as we have started shutting down our old HTTP contacts.

@balhoff balhoff left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good changes!

@kltm
kltm merged commit 15a3a3a into master Aug 28, 2026
1 check passed
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.

[bot] Tbox-journal download: hard-coded http URL now fetches a redirect page; failure is silent

2 participants