Download THEORY_NOTES.md from PureOne/NYARION-FS-8.0-Transactional-Storage-Engine: direct link, hf CLI and curl.
- Browser
- Download file 14 kB
-
https://huggingface.co/datasets/PureOne/NYARION-FS-8.0-Transactional-Storage-Engine/resolve/main/THEORY_NOTES.md
- Command line
-
hf download hf://datasets/PureOne/NYARION-FS-8.0-Transactional-Storage-Engine/THEORY_NOTES.md
-
curl -L -o THEORY_NOTES.md https://huggingface.co/datasets/PureOne/NYARION-FS-8.0-Transactional-Storage-Engine/resolve/main/THEORY_NOTES.md
NYARION final engine: weighted incremental capacity admission
These notes describe the supported POSIX image engine and its conditional logical-arena capacity argument. The proof is an ordinary invariant argument, not a mechanized refinement proof or a claim of superiority over NTFS. Final source binding and finite review results are recorded with the release evidence.
Independent core review approved source SHA-256
e22e219b85e4b2a777b295ecad616cf4ef400e0189d7d7583d14f432d89ed807.
The property being preserved
The engine must not acknowledge a new capsule merely because that capsule fits the bounded log. Its complete pending state must also be checkpointable into the fixed arena without overwriting the selected current graph. Admission therefore retains either a sufficient physical-block upper bound fitting the free arena, or an exact feasible checkpoint plan.
This is a guarantee about engine-arena addresses under one serialized publisher, validated immutable dependencies, stable image geometry and successful I/O. It does not reserve physical backing storage. Host ENOSPC, allocation failure, failed persistence barriers, memory errors, controller faults and corruption outside the declared model can still interrupt operations. Uncertain persistent or partially applied operations fence the session until recovery.
The published partition
During a capsule window the published files and receipt tries define fixed hash-prefix domains. A changed key reaches either an original leaf or a missing child position. That endpoint is its reservation cell. Cells are disjoint because they are endpoints in the same published trie. The union of their touched published ancestor branches is charged once per ancestor.
The exact physical compiler starts from that same published tree. It can rebuild only those ancestors and the affected endpoint subtrees; it can also prune a branch or share an unchanged descriptor. Charging all touched ancestors is thus conservative. It cannot require an uncharged published branch in another domain. File and receipt trees are distinct, and both must contribute to the budget.
Exact size observations in symbolic leaves
Let E(x) be canonical ASCII JSON. For a leaf entry (k,v), define
weight(k,v) = len(E(k)) + 1 + len(E(v)).
For family f and depth d, let S(f,d) be the serialized leaf with an empty entries dictionary. If the current entry count is n and W is the sum of entry weights, the exact symbolic leaf payload length is
S(f,d) + W + max(n - 1, 0).
The empty skeleton already includes the two dictionary braces. Each entry adds its key, colon and value; separators add n-1 commas when nonempty. Sorting changes order, not length. Computing keys and values through the actual canonical encoder correctly handles Unicode escapes, quotes, control characters, array punctuation and integer digit widths.
On an overwrite subtract the old entry weight and add the replacement. An insertion adds one weight and a deletion removes one. Maintaining W and n therefore preserves the exact symbolic leaf size by induction. Family and depth are included in the actual skeleton, so digit-width changes are not ignored. Ordinary updates need not encode the full unchanged entries dictionary.
This invariant is exact for the symbolic values. A symbolic new blob descriptor uses maximum legal field widths, so its weight can exceed the actual future descriptor's weight. That inequality is intentional.
Persistent symbolic trees
Each cell now holds a symbolic hash trie with cached node counts. A leaf stores a key-to-whole-entry-weight map and its weight sum, not another encoded value dictionary. A branch stores child nodes and a count equal to one plus the counts of nonempty children. An offered update follows its hash path, copies the changed nodes and updates the cached sums/counts. Accepted nodes and unchanged child objects are not mutated.
When a leaf exceeds the page payload it splits by the next SHA-256 nibble, using the same prefix partition as the physical builder. The split can inspect the old leaf entries once and build child sums. Later changes update those children directly. Nonempty symbolic branches may remain after deletions even when the remaining entries could fit in one leaf. This avoids rescanning and merging unchanged children; it can increase conservatism but cannot reduce the budget below a fresh canonical rebuild.
Empty cells have zero trie-node cost. At exhausted routing depth an oversized symbolic leaf cannot certify acceptance: its inconclusive sentinel exceeds all legal free arenas and forces exact compilation. The actual smaller descriptors may still fit a single physical leaf. A truly unrepresentable actual entry set must be refused before acknowledgement.
Safe descriptor and fixed-object widths
A new blob descriptor bounds legal arena indices, unsigned 64-bit birth generation, object kind, payload length and fixed-size digest. Unchanged old descriptors retain their literal sizes. A maximum-width placeholder is a size expression, not an allocated pointer; its two dummy indices need not be distinct.
The format's sixteen-child branch, largest supported blob manifest, catalogue and seal must fit their reserved payloads at maximum widths. The existing format inequalities remain mandatory: a descriptor occupies 112 JSON bytes, the maximum branch 1,931, the 17-chunk manifest 2,024 and the catalogue 415, within the 3,992-byte arena page payload. The seal payload fits its dedicated sector. These are bounds for this serializer and format, not arbitrary schemas.
Refinement and domination
Consider a symbolic cell trie T describing final entries E at depth d. Every leaf has the complete entries for its prefix and sufficient symbolic weights; every branch partitions those entries into the actual next-nibble domains. The exact builder's canonical tree C(E,d) allocates no more nodes than T counts.
Proof by induction on remaining routing depth. Empty entries need zero nodes. If T is a fitting leaf, actual entry sizes are no larger, so the physical builder also fits one leaf. If T is a retained or newly split branch, the physical builder either fits all entries into one leaf, costing no more than the nonempty symbolic tree, or splits into the same nonempty hash groups. Apply the induction hypothesis to each child and add the branch. The argument does not require T to be minimally compact; retained branches are allowed refinements. An overflow sentinel is never a successful sufficient certificate.
Let A be touched published ancestors, C the cells, n(c) their cached symbolic node counts, and B the current coalesced dirty blob debit. Then
U_logical = |A| + sum(n(c) for c in C) + B + 1 catalogue
U_physical = 2 * U_logical.
For every dirty non-null value above the inline limit, B includes its actual number of data chunks and one manifest, even if its bytes equal the published value. Replacing a pending value replaces its debit; deletion removes it. Untouched published blobs are shared and require no new object charge.
The published-partition argument and refinement lemma give
exact_new_checkpoint_blocks <= U_physical.
If this fits the free arena, sufficient distinct addresses exist outside the selected graph. If it does not fit, the inequality is inconclusive. The exact physical compiler can still accept a smaller real plan. Exact fallback is part of the admission algorithm, not a weaker unchecked option.
Accepted-prefix induction and failures
The proposed symbolic update is pure except for derived lookup caches/statistics. It must path-copy state and preserve the previous accepted tree if an exception or capacity refusal occurs. Only after both capsule copies and their successful force does the engine adopt the proposal and expose the new logical state. An unchanged retry token returns its old receipt before new admission work.
After acknowledgement, the current window has either the sufficient bound or an exact feasible plan. If the next offer has neither, the old accepted window can first be checkpointed, changing the published partition, and the offer can be retried. A refusal promises no offered logical mutation or receipt; it can follow maintenance publishing previously accepted work. After every cut, cells, ancestor union, blob debits and route caches reset to the new published roots.
Plan compilation uses a lazy sorted cursor over the free heap, recording exact addresses and page bytes without mutating live allocation. Execution binds the plan to its parent roots, generation, epoch/history and free prefix, forces all dependencies, then publishes and forces two successor seal witnesses. Current pages remain protected until that publication succeeds. Retiring old root edges then frees only zero-reference objects. Failed or uncertain sessions are fenced.
Restart does not preserve a particular symbolic shape
The symbolic tree is volatile. Recovery loads the selected published graph and replays the capsule tail, then certifies the recovered state before admitting further writes. A coalesced rebuild can compact a symbolic branch that was retained after transient insertions/deletions in the live session. Therefore equality of pre-crash and reconstructed reservation counts is not a general invariant. Both counts must dominate their exact output, and the accepted logical prefix and receipts must survive.
Writable recovery can compile an exact plan once for a recovered tail. A legacy writer can leave an acknowledged but uncheckpointable tail; read-only recovery remains possible, while writable admission refuses. Format-5 compatibility does not retroactively grant an older writer this admission guarantee.
Persistence and cost boundaries
Root election, mirrored objects and force ordering are inherited. Recovery elects the highest checksum-valid generation and does not silently fall back when its dependencies are unavailable. Two sector-disjoint newest witnesses survive one detected sector erasure; loss of every newest witness is outside this local rollback-detection model. One logical fitting capsule commit still requires one foreground fsync. Checkpoint-triggering calls include the ordered checkpoint work.
Weighted updates remove repeated full-cell JSON encoding in the fitting case. Path copying of a fitting leaf is bounded by the page format's entry population; splits inspect/repartition that leaf, and branch copies have at most sixteen children. Adversarial deep prefixes, symbolic overflow, exact fallback, cold recovery and initial cell construction remain real costs. No constant-latency, constant-memory, unrestricted balanced-tree or physical-power-cut claim follows.
All logical values and metadata still reside in RAM. Cold mount reconstruction still validates the live graph and arena ownership. Unique retry tokens remain live logical data and consume finite capacity. There is no mounted Windows filesystem, ACL implementation, concurrent writer or general large-file range interface in this storage-engine release.
Evidence and novelty
Independent tests compare cached weight sums and raw canonical leaf encodings, symbolic node counts and exact compiler output, accepted-state sharing, failed proposals, transient split/delete/rebuild, maximum-width fixed records, exhausted hash depth, exact fallback, retry receipts and restart. Tests and parameter sweeps are finite evidence, not an exhaustive byte-level implementation proof. Performance must include admission, automatic maintenance and final drain.
Incremental accounting, immutable path copying, conservative reservations and resource potentials are established techniques. The project contribution is the implemented weighted symbolic certificate and its correspondence to this checkpoint compiler. No field-defining novelty, T9 result or NTFS advantage is inferred from a speedup against this project's own earlier implementations.
Independent review record
The weighted-reservation review file retains the previous eight capacity and fast-path tests and adds five cases, for thirteen tests in this file. Together with the retained sixteen persistence/admission review tests, that is twenty-nine independent review tests. Additional engine and CLI tests are counted separately in the final release log.
The new checks include 540 exact entry-weight comparisons for inline, blob and receipt forms; 450 raw complete-leaf size comparisons across both families and depths 0, 9, 10, 63 and 64; fast offers while whole-plan compilation and repeated nonempty-leaf serialization are disabled after published-leaf decoding; transient 80-key insertion followed by 79 deletions with a smaller reconstructed bound; and a forced full-hash collision where the symbolic depth-64 sentinel triggers an exact fitting plan instead of a false fast certificate.
First-time published-leaf decoding still validates its canonical bytes. The no-reencoding test deliberately warms that decoding cache and targets repeated reservation reconstruction; it does not assert that cold mount/first touch requires no validation.
A separate deterministic pure-helper audit is reproducible with
experiments/verify_weighted_budget.py. It passes 4,400 mixed updates and 400
complete raw-JSON size/shape/fresh-rebuild comparisons, including escaped keys
and a forced 50-nibble common hash prefix. Its JSON identifies the engine hash
and seed. This is distinct evidence from actual physical compiler comparisons,
byte-image recovery or storage hardware qualification.
Primary background:
- Linux kernel developers, XFS Logging Design, transaction reservations: https://kernel.org/doc/html/v6.6/filesystems/xfs-delayed-logging-design.html
- Ohad Rodeh, B-trees, Shadowing, and Clones, USENIX LSF 2007: https://www.usenix.org/legacy/events/lsf07/tech/rodeh.pdf
- Btrfs developers, Btrfs design: https://btrfs.readthedocs.io/en/latest/dev/dev-btrfs-design.html