[BUG] Accept live handle records in retained permission and resize helpers #3

Closed
opened 2026-09-29 18:54:11 +02:00 by erikinkinen · 0 comments
Owner

Summary

The retained permission and truncation helpers accept HandleMetadata, the construction-only descriptor used when inserting a handle. Their callers pass the HandleRecord returned by lookup_handle. These are distinct Rust value types, so the helper signatures do not match the actual retained-state path.

Reproduction

Inspect lookup_handle in src/instances.rs, describe_permissions in src/instances/permissions.rs and truncate_retained_node in src/instances/truncate.rs. Compare their declared argument/return types with calls from permission_snapshot, truncate_if_permission and truncate_handle.

Expected and actual behavior

Expected: helpers consume the already-resolved live handle record in the same exclusive state turn, preserving its mount/node identity without a second lookup or a conversion back to insertion metadata.

Actual in source: both helpers name construction metadata as their argument. Change those arguments/imports to the live HandleRecord; keep all permission-revision, node-kind, bounds, timestamp and native caller obligations unchanged.

Environment and identity

  • Ramfsd branch feature/posix-compat; signed starting revision 0a82212d6f6f8c962f11673cbfb6bbdafba16cac.
  • Source inspection while implementing conditional provider acquisition.
  • No compiler, unit test, image, VM or CI execution was performed. This is a source-observed type mismatch, not an observed compiler diagnostic.

Evidence and prior checks

Conditional provider acquisition checkpoint: lib-ipc bb5df3d2, lib-posixabi cdc6eb9e, ramfsd ba8ea6da, docs d470ea50, integration b9acf76b, rootd 27835abd.

Compatibility 1.5 now describes Open/openat with raw borrowed pathname bytes and checked independent base, access, lookup, shared-status, inheritance and creation-mode domains. Private provider acquisition/retirement framing retains an original root and acquisition identity before submission. Ramfsd compares actual parent permission evidence and pins no-follow files, directories or symlinks in one exclusive turn. Cleanup does not require the original handle reply; retirement fences delayed replay without tombstone storage. Intermediate directory closure preserves independent children, and the original root cannot close while its pins remain.

Eighteen new controls are authored and unrun: five compatibility codecs, five private-provider codecs and eight actual Ramfsd state/dispatch cases. Ramfsd's live-handle helper types and stale compatibility-minor fixture expectations are corrected from source observations. No compiler or test failure is claimed. Component contracts and maintained manual/API-reference source are updated, and Rustfmt was applied.

Full native open/openat remains open: native source preparation, VFS candidate ownership, other providers, Posixd serving, creation/append effects and native workloads are unfinished. No acquisition acceptance credit is added. Weighted completion remains 16.91%, with 21/460 parents and 441/902 sub-items complete. Both EriX guest-build generations and the external Rust/LLVM guest rebuild remain unfinished.

Existing permission and conditional-resize controls exercise these paths, and are retained. Fix the source types alongside provider ownership work; do not replace actual retained identity with fabricated metadata. Tests and CI observation remain deferred by user instruction.

Tracking

Owning review: #2. Related native acquisition: erix/posixd#17. Phase tracking: erix/integration#65.

Ordinary V2 response correlation no longer admits retired effect operations.

They retain
root/parent/key fields, full-width handles and timestamps, optional trusted time,
explicit selected fields, invalid destination refusal and untouched short outputs. New literal stat controls cover framing, canaries and retired-family refusal. Retired numeric replies cannot satisfy ordinary V2 or native effect correlation. Vfsd's last old exported-name references become literal timestamp-adapter refusals
for all thirteen retired operations.

The existing superseded-bridge/provider-spelling-pin acceptance criterion in
the native ownership feature
is source-complete. Required imported FAT/exFAT binding and geometry guards remain. The remaining cwd/contextual-serving and complete lifecycle/control/graph criteria
need a current-source acceptance audit and any missing implementation, followed by
coherent runtime adoption. No synthetic weighted sub-item or full lifetime acceptance is added. Recomputed
phase progress remains 18.95% weighted and 6.81% whole acceptance: 25/460 parents
and 480/949 sub-items. Full EriX guest generations and external Rust/LLVM rebuilding
inside EriX remain required and unperformed.

Related records and contracts
Repository Links
docs PR 4
e2fsd PR 3
fatd PR 3
lib-ipc PR 2, retained-exact-entries.md
ramfsd PR 3
vfsd PR 3
## Summary The retained permission and truncation helpers accept `HandleMetadata`, the construction-only descriptor used when inserting a handle. Their callers pass the `HandleRecord` returned by `lookup_handle`. These are distinct Rust value types, so the helper signatures do not match the actual retained-state path. ## Reproduction Inspect `lookup_handle` in `src/instances.rs`, `describe_permissions` in `src/instances/permissions.rs` and `truncate_retained_node` in `src/instances/truncate.rs`. Compare their declared argument/return types with calls from `permission_snapshot`, `truncate_if_permission` and `truncate_handle`. ## Expected and actual behavior Expected: helpers consume the already-resolved live handle record in the same exclusive state turn, preserving its mount/node identity without a second lookup or a conversion back to insertion metadata. Actual in source: both helpers name construction metadata as their argument. Change those arguments/imports to the live `HandleRecord`; keep all permission-revision, node-kind, bounds, timestamp and native caller obligations unchanged. ## Environment and identity - Ramfsd branch `feature/posix-compat`; signed starting revision `0a82212d6f6f8c962f11673cbfb6bbdafba16cac`. - Source inspection while implementing conditional provider acquisition. - No compiler, unit test, image, VM or CI execution was performed. This is a source-observed type mismatch, not an observed compiler diagnostic. ## Evidence and prior checks Conditional provider acquisition checkpoint: [lib-ipc `bb5df3d2`](https://git.erikinkinen.fi/erix/lib-ipc/commit/bb5df3d21da19e585b5e0d4128cc84e103b43398), [lib-posixabi `cdc6eb9e`](https://git.erikinkinen.fi/erix/lib-posixabi/commit/cdc6eb9ebac4f8dace25fa3e2e5c78a42b450e3d), [ramfsd `ba8ea6da`](https://git.erikinkinen.fi/erix/ramfsd/commit/ba8ea6daaa1d0c6caa1baafff266c20c29fce8ed), [docs `d470ea50`](https://git.erikinkinen.fi/erix/docs/commit/d470ea50be9cf5b70491c99140ba4aa0e71bd60f), [integration `b9acf76b`](https://git.erikinkinen.fi/erix/integration/commit/b9acf76bba4967a139eaf16d666c8d05eb261482), [rootd `27835abd`](https://git.erikinkinen.fi/erix/rootd/commit/27835abda0a1356824ea462269fce68f0c048cdc). Compatibility 1.5 now describes Open/openat with raw borrowed pathname bytes and checked independent base, access, lookup, shared-status, inheritance and creation-mode domains. Private provider acquisition/retirement framing retains an original root and acquisition identity before submission. Ramfsd compares actual parent permission evidence and pins no-follow files, directories or symlinks in one exclusive turn. Cleanup does not require the original handle reply; retirement fences delayed replay without tombstone storage. Intermediate directory closure preserves independent children, and the original root cannot close while its pins remain. Eighteen new controls are authored and unrun: five compatibility codecs, five private-provider codecs and eight actual Ramfsd state/dispatch cases. [Ramfsd's live-handle helper types](https://git.erikinkinen.fi/erix/ramfsd/issues/3) and [stale compatibility-minor fixture expectations](https://git.erikinkinen.fi/erix/lib-posixabi/issues/4) are corrected from source observations. No compiler or test failure is claimed. Component contracts and maintained manual/API-reference source are updated, and Rustfmt was applied. [Full native open/openat](https://git.erikinkinen.fi/erix/posixd/issues/17) remains open: native source preparation, VFS candidate ownership, other providers, Posixd serving, creation/append effects and native workloads are unfinished. No acquisition acceptance credit is added. Weighted completion remains 16.91%, with 21/460 parents and 441/902 sub-items complete. Both EriX guest-build generations and the external Rust/LLVM guest rebuild remain unfinished. Existing permission and conditional-resize controls exercise these paths, and are retained. Fix the source types alongside provider ownership work; do not replace actual retained identity with fabricated metadata. Tests and CI observation remain deferred by user instruction. ## Tracking Owning review: https://git.erikinkinen.fi/erix/ramfsd/pulls/2. Related native acquisition: https://git.erikinkinen.fi/erix/posixd/issues/17. Phase tracking: https://git.erikinkinen.fi/erix/integration/issues/65. Ordinary V2 response correlation no longer admits retired effect operations. They retain root/parent/key fields, full-width handles and timestamps, optional trusted time, explicit selected fields, invalid destination refusal and untouched short outputs. New literal stat controls cover framing, canaries and retired-family refusal. Retired numeric replies cannot satisfy ordinary V2 or native effect correlation. Vfsd's last old exported-name references become literal timestamp-adapter refusals for all thirteen retired operations. The existing superseded-bridge/provider-spelling-pin acceptance criterion in [the native ownership feature](https://git.erikinkinen.fi/erix/vfsd/issues/16) is source-complete. Required imported FAT/exFAT binding and geometry guards remain. The remaining cwd/contextual-serving and complete lifecycle/control/graph criteria need a current-source acceptance audit and any missing implementation, followed by coherent runtime adoption. No synthetic weighted sub-item or full lifetime acceptance is added. Recomputed phase progress remains 18.95% weighted and 6.81% whole acceptance: 25/460 parents and 480/949 sub-items. Full EriX guest generations and external Rust/LLVM rebuilding inside EriX remain required and unperformed. <details> <summary>Related records and contracts</summary> | Repository | Links | | --- | --- | | docs | [PR 4](https://git.erikinkinen.fi/erix/docs/pulls/4) | | e2fsd | [PR 3](https://git.erikinkinen.fi/erix/e2fsd/pulls/3) | | fatd | [PR 3](https://git.erikinkinen.fi/erix/fatd/pulls/3) | | lib-ipc | [PR 2](https://git.erikinkinen.fi/erix/lib-ipc/pulls/2), [retained-exact-entries.md](https://git.erikinkinen.fi/erix/lib-ipc/src/branch/feature/posix-compat/docs/retained-exact-entries.md) | | ramfsd | [PR 3](https://git.erikinkinen.fi/erix/ramfsd/pulls/3) | | vfsd | [PR 3](https://git.erikinkinen.fi/erix/vfsd/pulls/3) | </details>
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:35:11 +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/ramfsd#3
No description provided.