[FEATURE] Bind conditional resizing to an explicit native file grant #6

Closed
opened 2026-09-29 15:42:32 +02:00 by erikinkinen · 0 comments
Owner

Problem and motivation

The ext and memory providers already compare retained permission revisions before truncating, but Vfsd has no exact native operation which carries that contract. Existing byte WRITE and directory READ_METADATA grants must keep their original authority rather than gain another operation family implicitly.

Proposed behavior and scope

Introduce an explicit exact-file permission-checked resize grant. It admits only the original file's permission snapshot, complete ACL pages, conditional resize and disposal. Define an exact receipt-free resize request containing original VFS object/revision correlation and the new length, without paths, private handles, credentials, clocks or replacement routes. Vfsd admits the actual original operation and write ceiling before provider observation or effects, rewrites only private handle correlation, obtains its own clock evidence and calls the existing provider conditional operation once.

This is the native effect layer of the broader compatibility permission work. Realm source preparation and Posixd's sealed-credential consumer must subsequently bind the same explicit grant before exposing a compatibility operation; they remain part of that active work. This issue does not claim a complete compatibility filesystem or guest build.

Authority, security and reliability

The original authenticated exact endpoint selects the file, provider and native operation. Record/revision numbers are descriptive correlations and cannot select another object. Existing read/write/directory grants refuse this operation family. Admission precedes request-dependent provider work; response capacity precedes effects. Metadata queries cannot consume one-shot grants. Provider comparison and mutation remain in one serialized provider turn; stale evidence refuses without automatic replay. Original native delivery retains the fixed result through failed completion, cancellation, retirement and independent receiver disposal. No capability, service discovery or private cleanup route is returned to the client.

Acceptance criteria

Checklist
  • Define documented disjoint wire framing and an explicit regular-file authority operation, with literal malformed/atomic-output controls.
  • Implement native grant admission, original snapshot/page forwarding and exact conditional provider resize without widening older grant families.
  • Preserve native write ceilings, provider kind/handle/revision correlation, optional trusted time, capacity-before-effects and definite stale refusal.
  • Author actual transport, resolver/dispatcher and owned-delivery positive/negative/refusal/cleanup controls, including no repeated effect after failed completion. Execution is waived by user.
  • Update component/manual contracts and publish coherent signed immutable dependency selections with related issue/PR and phase tracking.

Alternatives and tradeoffs

Reusing a directory metadata grant would add an unrequested mutation right. Reusing a byte-write grant for permission acquisition would silently change its operation ceiling. A separately selected resize grant keeps the compound permission/effect protocol explicit and can later be delivered through the counted realm source mechanism. Provider observations remain uncached; no performance improvement is claimed without measurement.

Tracking and rollout

Explicit native conditional resize — 29 September 2026: lib-ipc d785e672, vfsd 660d0fa1, powerboxd 52a5636e, launchd ba2d2a87, ttyd f220da8e, docs 51e49f5d, integration 47fb79a7, rootd 37ca91ad.

The separate RESIZE_FILE grant is implemented for one retained regular file. Original byte WRITE and directory READ_METADATA operation families remain unchanged. Vfsd forwards original permission snapshots and complete ACL pages, admits the retained write ceiling, matches the public object correlation and reserves fixed result space before trusted time or provider effects. The conditional adapter uses the original private handle/revision and a fresh private request correlation. Only a correctly framed provider RETRY denotes definite staleness; uncertain transport and malformed replies become INTERNAL. There is no replay, name lookup or unconditional resize fallback.

Original native CLAIM/COMPLETE/RELINQUISH custody keeps one fixed result through completion refusal and cancellation. Metadata observations preserve one-shot custody, explicit Close covers every supported resize lifetime, and receiver-disposal failure retains the counted row. Canonical operation recognition replaces duplicated launch/broker/session lists without widening bootstrap defaults or bypassing explicit manifest, session, approval and lifetime limits. Trusted review describes permission observation and conditional resizing together.

Twenty-three new controls are authored and unrun: four wire/domain, fourteen Vfsd transport/resolver/dispatch/native-custody, two broker, one launch and two session/review controls. Component contracts and the filesystem manual are updated. Rustfmt was applied; the largest changed source has 902 lines. The read-only inventory covers 76 repositories and 3377 source files, all below one thousand lines. Fifty-five repositories are published in 56 signed commits, with 206 Cargo and 111 catalog selectors updated. Rootd's two Cargo edges and both helper catalogs retain the independent Rust-helper 5b9676ff; the later Integration catalog head stays distinct.

Counted realm preparation and sealed-client conditional mediation, their native workload, other filesystem operations, both complete EriX guest-build generations and the external Rust/LLVM guest rebuild remain unfinished.

Related reviews: wire, Vfsd, broker, launch, session, manual, Integration. Fresh fixed-parent accounting is 16.24% weighted, 4.81% whole-item, 20/460 parents and 438/898 sub-items. The native layer receives its completed sub-item; the broader permission item remains open.

The broader consumer and producer work is tracked in erix/posixd#10 and erix/integration#65. Existing provider work: erix/e2fsd#7 and erix/e2fsd#8. Reviews: #3 and erix/lib-ipc#2. Tests, builds, lint checks, VM/manual/profiler execution and CI observation remain deferred by user instruction; preserve missing_docs and files below one thousand lines.

## Problem and motivation The ext and memory providers already compare retained permission revisions before truncating, but Vfsd has no exact native operation which carries that contract. Existing byte WRITE and directory READ_METADATA grants must keep their original authority rather than gain another operation family implicitly. ## Proposed behavior and scope Introduce an explicit exact-file permission-checked resize grant. It admits only the original file's permission snapshot, complete ACL pages, conditional resize and disposal. Define an exact receipt-free resize request containing original VFS object/revision correlation and the new length, without paths, private handles, credentials, clocks or replacement routes. Vfsd admits the actual original operation and write ceiling before provider observation or effects, rewrites only private handle correlation, obtains its own clock evidence and calls the existing provider conditional operation once. This is the native effect layer of the broader compatibility permission work. Realm source preparation and Posixd's sealed-credential consumer must subsequently bind the same explicit grant before exposing a compatibility operation; they remain part of that active work. This issue does not claim a complete compatibility filesystem or guest build. ## Authority, security and reliability The original authenticated exact endpoint selects the file, provider and native operation. Record/revision numbers are descriptive correlations and cannot select another object. Existing read/write/directory grants refuse this operation family. Admission precedes request-dependent provider work; response capacity precedes effects. Metadata queries cannot consume one-shot grants. Provider comparison and mutation remain in one serialized provider turn; stale evidence refuses without automatic replay. Original native delivery retains the fixed result through failed completion, cancellation, retirement and independent receiver disposal. No capability, service discovery or private cleanup route is returned to the client. ## Acceptance criteria <details> <summary>Checklist</summary> - [x] Define documented disjoint wire framing and an explicit regular-file authority operation, with literal malformed/atomic-output controls. - [x] Implement native grant admission, original snapshot/page forwarding and exact conditional provider resize without widening older grant families. - [x] Preserve native write ceilings, provider kind/handle/revision correlation, optional trusted time, capacity-before-effects and definite stale refusal. - [x] Author actual transport, resolver/dispatcher and owned-delivery positive/negative/refusal/cleanup controls, including no repeated effect after failed completion. Execution is waived by user. - [x] Update component/manual contracts and publish coherent signed immutable dependency selections with related issue/PR and phase tracking. </details> ## Alternatives and tradeoffs Reusing a directory metadata grant would add an unrequested mutation right. Reusing a byte-write grant for permission acquisition would silently change its operation ceiling. A separately selected resize grant keeps the compound permission/effect protocol explicit and can later be delivered through the counted realm source mechanism. Provider observations remain uncached; no performance improvement is claimed without measurement. ## Tracking and rollout Explicit native conditional resize — 29 September 2026: [lib-ipc `d785e672`](https://git.erikinkinen.fi/erix/lib-ipc/commit/d785e67275cd6e89140d0d4c4020fd8075316ced), [vfsd `660d0fa1`](https://git.erikinkinen.fi/erix/vfsd/commit/660d0fa1b3d30b2e712692d03cd78878adf03bf7), [powerboxd `52a5636e`](https://git.erikinkinen.fi/erix/powerboxd/commit/52a5636e0136a46e018f3628df240a560913d102), [launchd `ba2d2a87`](https://git.erikinkinen.fi/erix/launchd/commit/ba2d2a8717cd6e94ead5adb1fb82f2e0365052c3), [ttyd `f220da8e`](https://git.erikinkinen.fi/erix/ttyd/commit/f220da8e001f3d7f58c0b71c863aafcc198fc136), [docs `51e49f5d`](https://git.erikinkinen.fi/erix/docs/commit/51e49f5d8ed35bb16cd9fdb5dd66a5f1e4f0b7a0), [integration `47fb79a7`](https://git.erikinkinen.fi/erix/integration/commit/47fb79a7e963553902321f5db0e6341eb83cc253), [rootd `37ca91ad`](https://git.erikinkinen.fi/erix/rootd/commit/37ca91ad1371493968140322dd1ae2317d1c3e86). The [separate RESIZE_FILE grant](https://git.erikinkinen.fi/erix/vfsd/issues/6) is implemented for one retained regular file. Original byte WRITE and directory READ_METADATA operation families remain unchanged. Vfsd forwards original permission snapshots and complete ACL pages, admits the retained write ceiling, matches the public object correlation and reserves fixed result space before trusted time or provider effects. The conditional adapter uses the original private handle/revision and a fresh private request correlation. Only a correctly framed provider RETRY denotes definite staleness; uncertain transport and malformed replies become INTERNAL. There is no replay, name lookup or unconditional resize fallback. Original native CLAIM/COMPLETE/RELINQUISH custody keeps one fixed result through completion refusal and cancellation. Metadata observations preserve one-shot custody, explicit Close covers every supported resize lifetime, and receiver-disposal failure retains the counted row. Canonical operation recognition replaces duplicated launch/broker/session lists without widening bootstrap defaults or bypassing explicit manifest, session, approval and lifetime limits. Trusted review describes permission observation and conditional resizing together. Twenty-three new controls are authored and unrun: four wire/domain, fourteen Vfsd transport/resolver/dispatch/native-custody, two broker, one launch and two session/review controls. Component contracts and the filesystem manual are updated. Rustfmt was applied; the largest changed source has 902 lines. The read-only inventory covers 76 repositories and 3377 source files, all below one thousand lines. Fifty-five repositories are published in 56 signed commits, with 206 Cargo and 111 catalog selectors updated. Rootd's two Cargo edges and both helper catalogs retain [the independent Rust-helper `5b9676ff`](https://git.erikinkinen.fi/erix/integration/commit/5b9676ff151e1f1400aa8f9eed22cd39b833c287); the later Integration catalog head stays distinct. [Counted realm preparation and sealed-client conditional mediation](https://git.erikinkinen.fi/erix/posixd/issues/10), their native workload, other filesystem operations, both complete EriX guest-build generations and the external Rust/LLVM guest rebuild remain unfinished. Related reviews: [wire](https://git.erikinkinen.fi/erix/lib-ipc/pulls/2), [Vfsd](https://git.erikinkinen.fi/erix/vfsd/pulls/3), [broker](https://git.erikinkinen.fi/erix/powerboxd/pulls/2), [launch](https://git.erikinkinen.fi/erix/launchd/pulls/2), [session](https://git.erikinkinen.fi/erix/ttyd/pulls/3), [manual](https://git.erikinkinen.fi/erix/docs/pulls/4), [Integration](https://git.erikinkinen.fi/erix/integration/pulls/12). Fresh fixed-parent accounting is **16.24% weighted**, **4.81% whole-item**, **20/460 parents** and **438/898 sub-items**. The native layer receives its completed sub-item; the broader permission item remains open. The broader consumer and producer work is tracked in https://git.erikinkinen.fi/erix/posixd/issues/10 and https://git.erikinkinen.fi/erix/integration/issues/65. Existing provider work: https://git.erikinkinen.fi/erix/e2fsd/issues/7 and https://git.erikinkinen.fi/erix/e2fsd/issues/8. Reviews: https://git.erikinkinen.fi/erix/vfsd/pulls/3 and https://git.erikinkinen.fi/erix/lib-ipc/pulls/2. Tests, builds, lint checks, VM/manual/profiler execution and CI observation remain deferred by user instruction; preserve missing_docs and files below one thousand lines.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:35:16 +01: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
erix/vfsd#6
No description provided.