Skip to content

v3.5.9

Choose a tag to compare

@mrbro-bot mrbro-bot released this 04 Aug 04:36
· 342 commits to main since this release
87ebf7b

What's new

Bug Fixes

Guard: canonicalize apply_patch paths in operation fingerprint (#747) — An apply_patch operation could fail closed to guard-unavailable, minting no implementation receipt, when a co-installed plugin's before-hook rewrote the patch file path (absolute↔relative) before the receipt guard observed it. The guard fingerprints apply_patch arguments over the raw patchText string, so the before-hook fingerprint (computed over the rewritten output.args) and the after-hook fingerprint (computed over the original input.args) diverged, causing takePendingOperation to seal the operation as abandoned.

The fix canonicalizes apply_patch path targets to their lexical absolute form (via path.resolve against the effective session location, not realpath) before fingerprinting, at both prepareOperation and finishOperation. The patch body, target ordering, move destinations, and all non-path arguments remain part of the hash, so a changed patch body or a different target file still changes the fingerprint. Ambiguous or unparseable patches fail closed, leaving args unchanged.

Four regression tests cover the relative-before/absolute-after mint-once case, a changed body producing unavailable, a different file producing unavailable, and an equivalent duplicate after-event replaying without a double mint — exercising the before/after args divergence that the existing unit and integration suites (which feed fixed args directly to the guard) never covered. A follow-up commit adds two more regression tests closing gaps flagged in review: hunks-array form canonicalization including move_path, and fail-closed behavior for a malformed patch with an empty file-target path.

Also in this release

  • deps: Update all non-major dependencies (#745).

Compare

v3.5.8...v3.5.9