PureOne's picture
Upload research package with Eve Uploader
fa25917 verified
|
Raw History Blame Contribute Delete
7.3 kB
# NYARION 8.0 weighted-capacity engine
The default engine is `pagefs.py`, class `PageStore` (also `CutStore` and
`ImageStore`). It remains a POSIX regular-file storage engine with a full RAM
logical state, not a mounted filesystem or Windows driver. The persistent
format remains 5. Application version 8.0 changes volatile admission accounting.
## Consolidated commit and checkpoint path
Fitting transactions write two complete capsule replicas and complete one
successful fsync before acknowledgment. Retry tokens bind an epoch to the
logical intent. A capsule must fit the bounded format. A pressure transaction
can first publish previously acknowledged work; those checkpoint barriers are
additional to its ordinary capsule force.
Checkpoints materialize changed immutable trie paths, new data chunks and
receipts, plus one catalogue. They force dependencies before writing and forcing
the inactive two-copy seal bank. The previous selected root remains protected
through publication. Volatile incoming-edge counts acquire the candidate root
before publication and release the old root afterward. Physical blocks return
to the heap only at the final reference transition. Writable recovery validates
the selected graph, repairs reachable replicas and restores required root
redundancy before another publication.
## Weighted persistent admission structures
Reservations remain anchored to published trie leaves or missing-child
positions, plus the union of touched published ancestors. Each affected cell
now contains a persistent symbolic tree instead of a growing flat entry map
that is re-serialized and repartitioned on every offer.
A symbolic leaf stores key-to-entry-byte weights, their sum, its depth and one
logical output node. Its exact symbolic JSON payload size is:
```
empty_skeleton(family, depth) + sum(entry_weights) + max(entry_count - 1, 0)
```
The empty skeleton already includes the entries dictionary's braces. Entry
weights include the encoded key, colon and encoded value. Key size uses the
same ASCII string encoder as canonical JSON. For verified format inputs:
- New inline file weight is `encoded_key_size + 14 + 4*ceil(raw_length/3)`.
- Published inline weight is `encoded_key_size + 14 + len(base64_text)`.
- New blobs use the maximum legal descriptor's encoded size.
- Published blobs use their exact immutable numeric descriptor widths.
- Receipt weight is `len(token) + decimal_digits(epoch) + 72`.
New inline reservation updates therefore do not base64-encode their data a
second time. Published entries are weighed once on first cell use. No changed
symbolic leaf needs full JSON encoding to test whether it fits.
An update copies the affected leaf's weight map and its symbolic ancestor
dictionaries. It subtracts the previous weight, adds the replacement weight,
and uses the cached sum to check capacity. An overflowing leaf is split by the
same SHA-256 nibble rule as the physical builder, and child node totals are
cached. Subsequent offers follow the existing symbolic path rather than
repartitioning all pending entries in the cell. An equal-weight replacement
can reuse the entire symbolic file subtree, while logical intent and receipt
state still change normally.
Nonempty symbolic branches are deliberately retained after shrinkage. Empty
branches are removed. Retaining a hash-prefix refinement is a safe overestimate
of a canonical rebuild and avoids walking unaffected descendants to merge
them. Exact fallback remains available when the maintained bound is too large.
At routing depth 64, a symbolic overflow becomes an inconclusive sentinel
larger than every legal free arena. It never fast-certifies an update; the
exact physical compiler must decide whether the smaller actual descriptors
still fit. Maximum-width branch, manifest and catalogue fit assertions remain
part of the format assumptions.
## Guarantee and fallback
The two-copy budget covers touched published ancestors, symbolic cell node
counts, coalesced dirty blob chunks/manifests and one catalogue. A sufficient
budget permits admission. Otherwise, the exact real-address compiler is tried.
If the offered state still cannot fit, the engine may drain the prior accepted
window before retrying, or refuse the offer before writing its capsule.
Reservation proposals are persistent path copies and become authoritative only
after capsule persistence. Lookup caches and diagnostic counters may change on
a refused offer; accepted cells, logical data and allocator ownership do not.
Memory failure after an uncertain persistent operation fences the writer;
memory failure in a pure proposal does not acknowledge the offer.
The guarantee is **logical engine-arena feasibility** under a serialized writer
and the stated persistence model. Sparse image length is not physical host
space reservation. Host ENOSPC, I/O errors, failed forces, memory exhaustion,
corruption and whole-device failure can still interrupt work. The engine does
not claim that any amount of distinct receipt history fits forever.
## Recovery and public API
Recovery reconstructs actual logical state and validates the disk graph. A
nonempty recovered tail is exact-certified before writable use; infeasible
legacy tails remain readable through read-only recovery. Symbolic reservations
are reconstructed from coalesced pending changes when needed.
Because live symbolic branches can retain historical splits, a reconstructed
budget can be smaller than the live pre-close budget. Exact bound-number
equality across restart is not an invariant. Both must dominate their actual
compiler allocation, and exact publication/data/receipt semantics remain the
compatibility boundary.
`admission_reservation()` returns a detached conservative summary with the
same fields as V7. A bound-certified tail need not have a cached exact plan.
`checkpoint_plan()` compiles or returns that exact plan on demand. Read-only
inspection can be inconclusive if the conservative bound is too large and no
exact plan has been cached; that does not establish impossibility.
## Cost and evidence boundaries
Normal non-overflow leaf maps are bounded by one symbolic page. Updates visit
their symbolic ancestor path; branch maps have at most sixteen children.
Splits can redistribute entries along several routing levels, first cell use
weighs the published leaf, and a depth-limit overflow can contain more entries
and force exact fallback. No universal constant-time, balanced-hash or hard
latency guarantee is claimed. Recovery still scans the full graph/arena and
all logical values remain in RAM.
The frozen V7 diagnostic profile is `evidence/profile_v7.txt`: it identifies
reservation work but also substantial fsync and checkpoint costs. It is not a
performance comparison. Final source-bound measurements are supplied separately.
The engine suite has 62 tests, retaining the previous durability, reuse,
reservation and fault coverage. Added checks cover no whole symbolic-leaf
serialization, exact escaped-entry size identities, unchanged-size subtree
sharing, partial-proposal rollback and one-time published-entry weighing.
Independent review tests and release checks provide additional evidence.
Current reviewed candidate SHA-256:
`e22e219b85e4b2a777b295ecad616cf4ef400e0189d7d7583d14f432d89ed807`