Repository navigation
Make MDF/MDS maintenance parity-safe and file-level - #305
Merged
Merged
Conversation
Hawkynt
force-pushed
the
feat/mdf-mds-maintenance
branch
3 times, most recently
from
September 11, 2026 19:19
ef1bf0b to
7e3cee7
Compare
# MDF defrag refused its own rebuild, and a scaffolding workflow shipped with it MdfCookedStream.SetLength refused every length change, but ISO defragmentation legitimately shrinks the logical volume inside a track whose physical size is fixed by the MDS descriptors. A shrink costs nothing physically and is now accepted; only growth past the track is refused. The branch also carried .github/workflows/mdf-docs-temp.yml, which applied its README row by string substitution on every pull request and pushed the result back. The row it writes is already in the branch, so the workflow could only fail from here on, and it is removed along with the matching test deferral it was meant to drop. Add_WithoutPhysicalHeadroom assumed a full track refuses any add, but AddOrReplace releases reclaimable slack before it checks capacity. The test now asks for more than the whole track, which no trimming can satisfy.
Hawkynt
force-pushed
the
feat/mdf-mds-maintenance
branch
from
September 11, 2026 20:12
7e3cee7 to
0f7e04e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
sector-NNNNNN.bindescriptor edits with transactional root-level ISO 9660 file add/replace/removeDesign
The archive API gives a format one stream, while Alcohol images are a paired MDF data stream plus MDS descriptor. Existing paired images are therefore treated as fixed-capacity: ISO metadata and payload may change inside the current track, but the physical MDF sector count may not. Edits are staged to a scratch file and committed only after the result can be parsed.
Raw-sector framing is not treated as disposable padding. Mode 1 EDC is recomputed over bytes 0..2063; Mode 2 Form 1 over subheader+data; ECMA-130 GF(2^8) P parity is generated before Q because Q covers P. The physical layout map conservatively reserves whole raw sectors when their ISO payload is otherwise free; the wipe path uses the finer cooked logical view and rewrites parity after zeroing payload bytes.
References / licensing
No third-party implementation code or lookup tables were copied. EDC/ECC tables are derived at runtime from the specification polynomials/field definition.
Validation
Local execution is unavailable in this session, so validation is being driven by repository tests plus GitHub Actions. The PR includes a fixed ECMA-130 Mode-1 known-vector SHA-256 and MDF round-trip/regression tests; CI results will be checked and failures caused by this change fixed here.