Skip to content

Measure allocation after closing the mutation handle - #4

Merged
kiranscript merged 1 commit into
polish-repofrom
fix-allocation-after-close
Nov 17, 2026
Merged

kiranscript merged 1 commit into
polish-repofrom
fix-allocation-after-close

Conversation

@kiranscript

Copy link
Copy Markdown
Owner

Fixes #2.

Problem

After a compress or decompress, the allocation used to compute the saving was read through the same handle that issued FSCTL_SET_COMPRESSION. For some non-aligned lengths that overstated allocation (e.g. 131,072 vs 69,632 bytes for a 65,537-byte file), skewing savings and the daily ledger.

Change

  • Mutator: verify the compression state through the handle, dispose it, then re-read allocation from a fresh handle. If the file's identity changed or the re-read fails, delta is left null (measurement unavailable) instead of recording a wrong number.
  • ZipXP.Checks: add a 65,537-byte round trip asserting reported allocation matches a fresh read, the ledger nets 0, and final allocation equals the baseline.
  • Remove the known-issue notes from README, CHANGELOG, docs/safety.md and docs/validation.md.

Testing

Not built or run: the authoring environment has no dotnet and the checks need Windows/NTFS. Please run scripts/check.ps1 on Windows before merging.

Base is polish-repo because main does not yet have the src/ZipXP.Core layout.

🤖 Generated with Claude Code

Re-read allocation from a fresh handle after compress/decompress so
non-aligned file sizes no longer skew savings or the daily ledger.
Adds a 65,537-byte round-trip check and removes the known-issue notes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@kiranscript
kiranscript merged commit ea5af51 into polish-repo Nov 17, 2026
1 check passed
kiranscript added a commit that referenced this pull request Nov 17, 2026
…-to-do, workflow)

- Accurate #2 status: fix (#4) is on a branch, not main
- Reserve wording, safety caveat, 'Careful by default', still-to-do list
- aria-live narrowed, light focus ring on dark, heading levels, tab ids
- Blue-family decorative palette, canonical/og tags, docs drawer parity
- Pages: no cancel-in-progress; build.yml skips site-only changes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kiranscript added a commit that referenced this pull request Nov 17, 2026
* Add ZipXP website (rebased onto new repo layout)

Static site in website/ with a Stripe-style gradient hero, real app
screenshots, an interactive policy-gate demo, safety pipeline, storage
accounting explainer, FAQ and a docs page. Text is black and white only,
colors follow the ZipXP blue logo, and paths match the src/ scripts/ docs/
layout. Deployed to GitHub Pages by .github/workflows/pages.yml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Website: address Sol review (neutral text, contrast, toggles, docs overflow, claims, hero)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Website: address Opus review (claims, #2 status, a11y, palette, still-to-do, workflow)

- Accurate #2 status: fix (#4) is on a branch, not main
- Reserve wording, safety caveat, 'Careful by default', still-to-do list
- aria-live narrowed, light focus ring on dark, heading levels, tab ids
- Blue-family decorative palette, canonical/og tags, docs drawer parity
- Pages: no cancel-in-progress; build.yml skips site-only changes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Website: switch contrast, heading levels, neutral list markers (Sol re-review)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Website: Opus re-review nits (mobile path wrap, hero focus, copy, chip legend, 404, tab keys)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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