Elamur Groupants⌕
☰

vfs-memory-edits

The groupant beside vfs/src/mem.rs in the Mova repository: what the code computes, what it never does, how to go back from its outputs, its invariants, cost and checks.

Facts

Implementation material. A Mova code model describes this code at one source revision: partial models, finite checks and their stated scope. It is not a reviewed general exposition, and its labels are shown as written, never raised.

Components

componentlabelwhere
approximantpartialapproximant
astpartial../syntax.json
compositionpartialcomposition
costpartialCost
descriptantpresentdescriptant
invariantpartialInvariant
testsexecuted bounded checkstests

Obernants

The typed relations around the forward model: the behaviour complement (what the code never does), the reverse reconstruction (every input compatible with an output) and specialised views.

idtypelabelwhere
behavior_complementbehavior_complementpartial source derived modelbehavior_complement
reverse_reconstructionreverse_reconstructionpartial source derived modelreverse_reconstruction
error_ordererror_orderpartial source derived modelerror_order
sparse_zerosparse_zeropartial source derived modelsparse_zero
touch_projectiontouch_projectionpartial source derived modeltouch_projection
quota_growthquota_growthpartial source derived modelquota_growth

Model text

descriptant

vfs-memory-edits

Single-file content mutation, sparse offsets and quota preflight.

Prospective epoch

2026-10-31: source reviewed before edits; prospective review retained under $MOVA_DATA/runs/octopus-wave31-vfs-2026-10-31/prospective.md. Predicted order/cost: COW shared parent map clones plus new content; append/At/truncate can clone old full buffer. Zero-filled hole costs offset-oldlen bytes.

Observation epoch

Bounded actual calls and compiled negative controls are recorded in tests.md. Production behavior bytes unchanged; only focused test blocks added. Snapshot constant-time wording is conditional on cwd and destruction; recursive operations may partially commit.

Unsupported approximants

No executable percentage surrogate is claimed for these categorical/state/effect observations. Future 1%,2%,5%,10% require a useful metric, explicit domain and exact reference.

approximant

Forward relation

Single-file content mutation, sparse offsets and quota preflight.

Derive old size, new size by replace/append/At/truncate/touch; check arithmetic and quotas, tick, COW update, then usage bytes=old total-old size+new size.

Domain: bounded inputs with available allocation and nonoverflowing counters unless checked explicitly. The relation is partial and source-derived.

composition

Composition

Single-file content mutation, sparse offsets and quota preflight. Shared state and order: Derive old size, new size by replace/append/At/truncate/touch; check arithmetic and quotas, tick, COW update, then usage bytes=old total-old size+new size.

Scoped children project this same source. Their domains and effects remain conditional; source execution connects these clauses rather than independently proving their wiring. Rejected size/quota edits preserve dump; existing Touch does not rewrite metadata but does tick. New Touch creates empty file.

models

Typed source models

Source-bound partial relations; no universal finite-test proof.

behavior_complement

Subject: vfs-memory-edits. Domain: Single-file content mutation, sparse offsets and quota preflight. Valid allocations, bounded counters, Fault=None unless explicitly named. Observation: one call or the stated finite trace.

Operator: offset MAX plus nonempty byte cannot wrap into an accepted low offset.

Approximation: source-derived partial relation; complement is an inner excluded-behavior claim under these premises, converse retains compatible antecedents. Evidence: tests.md; unobserved concurrency/resource failures remain unknown.

reverse_reconstruction

Subject: vfs-memory-edits. Domain: Single-file content mutation, sparse offsets and quota preflight. Valid allocations, bounded counters, Fault=None unless explicitly named. Observation: one call or the stated finite trace.

Operator: Replace output has arbitrary old payload antecedents; append with known suffix permits prefix recovery; truncation loses discarded suffix.

Approximation: source-derived partial relation; complement is an inner excluded-behavior claim under these premises, converse retains compatible antecedents. Evidence: tests.md; unobserved concurrency/resource failures remain unknown.

error_order

Subject: vfs-memory-edits. Domain: Single-file content mutation, sparse offsets and quota preflight. Valid allocations, bounded counters, Fault=None unless explicitly named. Observation: one call or the stated finite trace.

Operator: Trailing slash IsDir precedes path validation; node quota for new file precedes length quotas.

Approximation: source-derived partial relation; complement is an inner excluded-behavior claim under these premises, converse retains compatible antecedents. Evidence: tests.md; unobserved concurrency/resource failures remain unknown.

sparse_zero

Subject: vfs-memory-edits. Domain: Single-file content mutation, sparse offsets and quota preflight. Valid allocations, bounded counters, Fault=None unless explicitly named. Observation: one call or the stated finite trace.

Operator: At beyond EOF fills holes with zero; read_at beyond EOF returns empty.

Approximation: source-derived partial relation; complement is an inner excluded-behavior claim under these premises, converse retains compatible antecedents. Evidence: tests.md; unobserved concurrency/resource failures remain unknown.

touch_projection

Subject: vfs-memory-edits. Domain: Single-file content mutation, sparse offsets and quota preflight. Valid allocations, bounded counters, Fault=None unless explicitly named. Observation: one call or the stated finite trace.

Operator: Touch existing file allows absent write bit and leaves file times, but clock advances.

Approximation: source-derived partial relation; complement is an inner excluded-behavior claim under these premises, converse retains compatible antecedents. Evidence: tests.md; unobserved concurrency/resource failures remain unknown.

quota_growth

Subject: vfs-memory-edits. Domain: Single-file content mutation, sparse offsets and quota preflight. Valid allocations, bounded counters, Fault=None unless explicitly named. Observation: one call or the stated finite trace.

Operator: Total cap enforced only on growth; shrinking remains allowed after lower limits.

Approximation: source-derived partial relation; complement is an inner excluded-behavior claim under these premises, converse retains compatible antecedents. Evidence: tests.md; unobserved concurrency/resource failures remain unknown.

tests

Checks and limitations

Exact named observations: escape_by_dotdot_is_denied, symlinks_cannot_lead_outside, bad_names_and_paths, limits_fire_with_clear_errors_and_leave_state_unchanged, limits_parse, snapshot_changes_restore_is_byte_identical, snapshot_is_isolated_copy_on_write, restore_after_failed_ops_and_limits, posix_like_semantics, virtual_clock_is_deterministic, journal_records_ops_errors_and_denials, import_export_round_trip, dirfs_confines_to_root, gates_green_and_negative_controls_red, wave31_sparse_copy_and_partial_directory_failure.

Fresh receipts: $MOVA_DATA/runs/octopus-wave31-vfs-2026-10-31; run.sh retains four profile/repetition sets with raw logs and numeric statuses. native-commands.json and source-test-map.json disambiguate targets. Compiled mutations and exact restoration are separately retained in mutation-summary.json.

These finite observations are not semantic completeness. Source syntax generated twice and compared byte-for-byte. Host effects are limited to owned TMPDIR fixtures. Existing absolute_paths_never_reach_the_host and open_modes are skipped; snapbench main is skipped. Standalone helpers/reexports are only observed through named callers or representation checks; RealFs effect methods unexecuted.

invariant-and-cost

Invariant and cost

Invariant

Rejected size/quota edits preserve dump; existing Touch does not rewrite metadata but does tick. New Touch creates empty file.

Cost

COW shared parent map clones plus new content; append/At/truncate can clone old full buffer. Zero-filled hole costs offset-oldlen bytes.

No timing or numerical error guarantee is inferred from finite tests.

This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/vfs/src/mem.rs.groupant/edits.groupant/