Defragment a file on an exFAT image #16

Closed
opened 2026-10-11 19:10:45 +00:00 by phg · 1 comment
Owner

Parent

IODD Tool specification

What to build

Extend the selected-file defrag workflow to exFAT images while preserving bitmap, FAT, stream, and entry-set correctness.

Acceptance criteria

  • The existing native preview/confirm/progress/result workflow handles supported fragmented exFAT files.
  • Chained and NoFatChain source states are interpreted correctly; successful destinations have verified complete contiguous ownership.
  • Bitmap changes, FAT state, stream flags, data/valid-data lengths, and spanning entry-set checksums preserve unrelated metadata.
  • Contents and relevant metadata remain independently identical except for the intended allocation changes.
  • Cancellation, short I/O, torn metadata, and flush failures follow the selected safe-boundary/recovery protocol.
  • Recovery is idempotent and retains evidence until a conclusive outcome; new mutations are rejected while ownership is ambiguous.
  • Independent post-operation analysis and fixture/checker results verify both success and injected failures.

Blocked by

Validation contract

Completion requires the applicable independently checked software evidence in Set validation gates and the implementation handoff. A closed policy decision does not establish that implementation tests have passed. Use disposable images/virtual volumes and controlled faults; no hardware-trial or performance gate applies.

Scope

This ticket belongs to the later implementation effort. All planning decisions are resolved; current work covers tracker and documentation updates. The parent specification indexes the authoritative product and software-validation contracts. Forgejo governs live updates; retained local files record the handoff.

## Parent [IODD Tool specification](https://git.s1q.dev/phg/iodd-tool/issues/7) ## What to build Extend the selected-file defrag workflow to exFAT images while preserving bitmap, FAT, stream, and entry-set correctness. ## Acceptance criteria - [ ] The existing native preview/confirm/progress/result workflow handles supported fragmented exFAT files. - [ ] Chained and NoFatChain source states are interpreted correctly; successful destinations have verified complete contiguous ownership. - [ ] Bitmap changes, FAT state, stream flags, data/valid-data lengths, and spanning entry-set checksums preserve unrelated metadata. - [ ] Contents and relevant metadata remain independently identical except for the intended allocation changes. - [ ] Cancellation, short I/O, torn metadata, and flush failures follow the selected safe-boundary/recovery protocol. - [ ] Recovery is idempotent and retains evidence until a conclusive outcome; new mutations are rejected while ownership is ambiguous. - [ ] Independent post-operation analysis and fixture/checker results verify both success and injected failures. ## Blocked by - [Analyze an exFAT image](https://git.s1q.dev/phg/iodd-tool/issues/9) - [Defragment a file on a FAT32 image](https://git.s1q.dev/phg/iodd-tool/issues/15) ## Validation contract Completion requires the applicable independently checked software evidence in [Set validation gates and the implementation handoff](https://git.s1q.dev/phg/iodd-tool/issues/6). A closed policy decision does not establish that implementation tests have passed. Use disposable images/virtual volumes and controlled faults; no hardware-trial or performance gate applies. ## Scope This ticket belongs to the later implementation effort. All planning decisions are resolved; current work covers tracker and documentation updates. The parent specification indexes the authoritative product and software-validation contracts. Forgejo governs live updates; retained local files record the handoff.
phg self-assigned this 2026-10-13 15:46:19 +00:00
Author
Owner

Resolution — exFAT image defragmentation implemented

Implemented on implement/iodd-tool-spec-7, completed branch 4ff6393, integration merge a4ec902.

The native reviewed defrag workflow and public operation API now relocate complete exFAT allocation through the existing bounded journal, destination-only writes, checked durable commit, rollback/forward replay, registry and retirement protocol. Bitmap/FAT ownership, NoFatChain publication, spanning entry checksums, DataLength/ValidDataLength, supported vendor allocations and opaque benign secondaries are revalidated and preserved. Complete allocated bytes, including slack and the raw ValidDataLength tail, are streamed and verified. Physical-unit-aware destinations and imported recovery recipes refuse outside permitted geometry/allocation. Padded bitmap scans pin the complete declared FAT chain while buffering only meaningful bits; known vendor entries enforce their actual flag semantics. Budget-exhausted or malformed scans withhold global claims and write authority.

Validation: final source bbe6601 passed all 124 tests in 843.200s with ordinary release optimization on pinned Xcode 27.0/27A266a. This includes all 62 rich/spanning geometry pairs, a greater-than-4-GiB 9,001-cluster file, 1,022 initial/torn/repeated-replay fault cases, short transfers, Stop, foreign/corrupt/missing evidence, expanded physical units, bitmap resource limits and valid/invalid/unknown secondary cases, plus FAT32 regression. Completed 4ff6393 and integration a4ec902 preserve the exact qualified Sources/Tests/scripts trees. Fresh integration smoke passes 5 named tests / 18 cases; arm64 release, plist and minimum macOS 15 checks pass.

Native image workflow evidence covers explicit preparation/backup/review/Confirm, progress, verified completion and safe Stop. The supplemental native matrix records 66 completed image-backed moves, 21 nonrepairing checker passes and 45 explicit driver sector-mismatch refusals; these refusals are not native geometry passes. Independent content/bitmap oracles are separate from optional full-container checker hashes. Root also executed the final-source standalone public probe on pristine macOS 15.6.1/24G90 arm64: all three files retained logical and full allocated hashes, lengths/ValidDataLength/attributes/entry offsets; the reviewed literal clusters 7–9 form one extent and independent bitmap ownership passes. Its supplemental report is retained in the shared execution context for final release validation.

Reproducible validation, complete logs, native evidence and qualification limits. Qualification covers disposable regular images and internal recovery storage. Raw-device access, physical-media behavior and final signed/notarized release remain separate tickets. Existing recovery evidence is preserved.

## Resolution — exFAT image defragmentation implemented Implemented on [implement/iodd-tool-spec-7](https://git.s1q.dev/phg/iodd-tool/src/branch/implement/iodd-tool-spec-7), completed branch [4ff6393](https://git.s1q.dev/phg/iodd-tool/commit/4ff6393cce2d27003a1d3c7619cb1e20de505e56), integration merge [a4ec902](https://git.s1q.dev/phg/iodd-tool/commit/a4ec902cac54efaf331b89a5c2a05e994b572851). The native reviewed defrag workflow and public operation API now relocate complete exFAT allocation through the existing bounded journal, destination-only writes, checked durable commit, rollback/forward replay, registry and retirement protocol. Bitmap/FAT ownership, NoFatChain publication, spanning entry checksums, DataLength/ValidDataLength, supported vendor allocations and opaque benign secondaries are revalidated and preserved. Complete allocated bytes, including slack and the raw ValidDataLength tail, are streamed and verified. Physical-unit-aware destinations and imported recovery recipes refuse outside permitted geometry/allocation. Padded bitmap scans pin the complete declared FAT chain while buffering only meaningful bits; known vendor entries enforce their actual flag semantics. Budget-exhausted or malformed scans withhold global claims and write authority. Validation: final source bbe6601 passed all 124 tests in 843.200s with ordinary release optimization on pinned Xcode 27.0/27A266a. This includes all 62 rich/spanning geometry pairs, a greater-than-4-GiB 9,001-cluster file, 1,022 initial/torn/repeated-replay fault cases, short transfers, Stop, foreign/corrupt/missing evidence, expanded physical units, bitmap resource limits and valid/invalid/unknown secondary cases, plus FAT32 regression. Completed 4ff6393 and integration a4ec902 preserve the exact qualified Sources/Tests/scripts trees. Fresh integration smoke passes 5 named tests / 18 cases; arm64 release, plist and minimum macOS 15 checks pass. Native image workflow evidence covers explicit preparation/backup/review/Confirm, progress, verified completion and safe Stop. The supplemental native matrix records 66 completed image-backed moves, 21 nonrepairing checker passes and 45 explicit driver sector-mismatch refusals; these refusals are not native geometry passes. Independent content/bitmap oracles are separate from optional full-container checker hashes. Root also executed the final-source standalone public probe on pristine macOS 15.6.1/24G90 arm64: all three files retained logical and full allocated hashes, lengths/ValidDataLength/attributes/entry offsets; the reviewed literal clusters 7–9 form one extent and independent bitmap ownership passes. Its supplemental report is retained in the shared execution context for final release validation. [Reproducible validation, complete logs, native evidence and qualification limits](https://git.s1q.dev/phg/iodd-tool/src/commit/a4ec902cac54efaf331b89a5c2a05e994b572851/docs/validation/exfat-defragmentation.md). Qualification covers disposable regular images and internal recovery storage. Raw-device access, physical-media behavior and final signed/notarized release remain separate tickets. Existing recovery evidence is preserved.
phg closed this issue 2026-10-13 17:44:51 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
phg/iodd-tool#16
No description provided.