[FEATURE] Publish exact native outputs through retained provider transactions #25

Open
opened 2026-10-24 04:53:07 +02:00 by erikinkinen · 0 comments
Owner

Problem and motivation

Native build tools need to replace an existing output atomically while preserving it until the replacement is complete. The fixed-entry rename API intentionally refuses an occupied destination.

Proposed behavior and scope

Add a provider transaction behind Vfsd's exact-output publication endpoint: Begin, confirmed-prefix Write, Sync, CloseWriter, Commit, Abort and Status. Retain the original parent, destination binding or absence, and adjacent temporary until the transaction settles. Keep existing fixed-entry operations unchanged.

Authority, security and reliability

Only the original retained provider handle admits operations. Native callers cannot choose another parent, mode or object key. CloseWriter closes writing while retaining publication pins. Commit replaces only the original destination; a moved or rebound entry conflicts. Abort removes only the unpublished original temporary. Lost observations never authorize replay, rebinding or ordinary reuse.

Reuse the original selected filesystem/journal devices and durable journal barriers. A failed or uncertain barrier retains the original transaction for fail-stop/recovery.

Acceptance criteria

  • Implement retained transaction state and exact provider protocol dispatch.
  • Support occupied and absent destinations with original binding checks and open-inode lifetime preservation.
  • Track temporary content and permissions through every alias before Sync/Commit.
  • Preserve first failures and independent cleanup observations; settle uncertain Commit by original Status only.
  • Cover replacement, conflicts, partial capacity, interruption and cleanup with meaningful regressions.
  • Document provider ownership and compose the native client, Launchd and Vfsd rollout.

Alternatives and tradeoffs

Do not widen ordinary fixed-entry rename into a path-selected replacement API. A dedicated retained transaction keeps temporary cleanup and atomic publication under the same original owner.

Tracking and rollout

See Boot-tool's native backend, broker attenuation and phase 6 tracking. Coordinate protocol producers and consumers before enabling native publication.

## Problem and motivation Native build tools need to replace an existing output atomically while preserving it until the replacement is complete. The fixed-entry rename API intentionally refuses an occupied destination. ## Proposed behavior and scope Add a provider transaction behind Vfsd's exact-output publication endpoint: Begin, confirmed-prefix Write, Sync, CloseWriter, Commit, Abort and Status. Retain the original parent, destination binding or absence, and adjacent temporary until the transaction settles. Keep existing fixed-entry operations unchanged. ## Authority, security and reliability Only the original retained provider handle admits operations. Native callers cannot choose another parent, mode or object key. CloseWriter closes writing while retaining publication pins. Commit replaces only the original destination; a moved or rebound entry conflicts. Abort removes only the unpublished original temporary. Lost observations never authorize replay, rebinding or ordinary reuse. Reuse the original selected filesystem/journal devices and durable journal barriers. A failed or uncertain barrier retains the original transaction for fail-stop/recovery. ## Acceptance criteria - [ ] Implement retained transaction state and exact provider protocol dispatch. - [ ] Support occupied and absent destinations with original binding checks and open-inode lifetime preservation. - [ ] Track temporary content and permissions through every alias before Sync/Commit. - [ ] Preserve first failures and independent cleanup observations; settle uncertain Commit by original Status only. - [ ] Cover replacement, conflicts, partial capacity, interruption and cleanup with meaningful regressions. - [ ] Document provider ownership and compose the native client, Launchd and Vfsd rollout. ## Alternatives and tradeoffs Do not widen ordinary fixed-entry rename into a path-selected replacement API. A dedicated retained transaction keeps temporary cleanup and atomic publication under the same original owner. ## Tracking and rollout See [Boot-tool's native backend](https://git.erikinkinen.fi/erix/boot-tool/issues/6), [broker attenuation](https://git.erikinkinen.fi/erix/launchd/issues/26) and [phase 6 tracking](https://git.erikinkinen.fi/erix/integration/issues/65). Coordinate protocol producers and consumers before enabling native publication.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:33:47 +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/e2fsd#25
No description provided.