← Back to Pull requests

Upgrade zip4j to 2.11.6 and report archive write failures #580

Closed
unknown closed this pull request without merging on Nov 27, 2026 05:12 UTC
View on GitHub
unknown unknown commented on Nov 16, 2026 16:59 UTC
Author

Upgrades zip4j from the vendored 1.3.3 jar to net.lingala.zip4j:zip4j:2.11.6 from Maven Central, and makes archive failures visible.

  • zip4j is only used to write password-protected ZIP exports and data-pruner archives. ArchiveUtils is ported to the 2.x API, and EncryptionType.getKeyStrength() now returns an AesKeyStrength.

  • Deletes our patched Unzip and UnzipEngine and their tests. Nothing in the engine extracts with zip4j, and they depend on 1.x internals.

  • A failure finishing an archive (disk full, for example) used to be swallowed for TAR and for ZIP with a compressor, and a truncated archive was moved into place. It is now reported, the file is closed, and the half-written archive is removed. If archiving succeeds and only moving the finished archive into place fails, that archive is kept.

  • A password combined with TAR or a compressor used to be silently ignored, writing an unprotected archive. It is now rejected before anything is written.

  • The headers of the touched main and test files are converted to SPDX.
  • Behavior change: a data pruner configured with a password plus TAR or a compressor, which the administrator UI can't produce but the API or a hand-edited configuration can, now fails on each run instead of archiving unprotected. Its channel isn't pruned until the configuration is fixed.

    Relates to #337 and #472, without resolving either.

    Claude checked:

  • ./gradlew clean build dist passes on this branch.

  • The new tests fail against the old code where they should: encrypted ZIP round-trips for each encryption type (including the JDK refusing the archive), TAR, tar.gz, zip.gz and empty-folder output, write failures to /dev/full for each format, and the password rules.

  • The smoke test passes 7 of 7 against a server built from this branch, and the server-side archive's entries are AES-encrypted. The same test passes 6 of 6 on the previous zip4j 1.3.3.
  • Reviewer notes


  • Separate existing bug, fixed in its own PR rather than here: the query-parameter variant of the server export endpoint (MessageServlet, getMessageWriterOptions) never sets passwordEnabled, so a password sent that way is dropped and an unprotected ZIP is written.

  • ArchiveUtils.java gets a little smaller if you hide whitespace changes
  • Release notes

  • Upgraded zip4j from 1.3.3 to 2.11.6.

  • Message export and the data pruner now report a failure to finish an archive instead of leaving a truncated archive in place.

  • A password is now rejected for any archive format except a plain ZIP, instead of being ignored. A data pruner configured with a password and TAR or a compressor now fails until it is corrected.
  • ---
    🤖 Drafted with Claude Code

    Diff: 341 lines (+255 / -86) across 4 files Reviewer: pacmano1 Review duration: 15133m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 341 lines diff across 4 files
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.349
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #580"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.3% (MEDIUM) · Higher = larger blast radius
    42.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.7% · Safe to merge
    16.7%