Append-only default, two-way policy
- Status: SHIPPED with per-protocol WORM enforcement
- Spec: FR-02, FR-03
- Sources:
tosv.cppgrant tw flag,plan.mdwizard history,uploads/paste.txtGIGANTISCHE prompt, SPEC.md 2
What it is
Every grant is born append-only: add files, never overwrite, delete, or move, unless the wizard checkbox explicitly enables two-way drive use. Two-way carries a pre-decided optimal policy: realtime sync with 30s poll fallback, last-write-wins with 30-day version history, oplocks on, write-through cache capped at 128MB, TLS in transit required, audit on, prune policy on.
How TOSV does it
The grant form posts tw=1 only when checked; the DB stores the
flag and the grant reply names the mode (append-only or two-way drive). In v1 the flag is carried plus audited and DAV DELETE/MOVE
check it; per-protocol WORM enforcement (deny overwrite, delete,
move, object lock) is specified for M3 with the same flag as source.
What it protects against
Ransomware-style encryption over the mount, accidental overwrites, and confused clients that "sync" by deleting: the default mode makes the destructive verbs fail closed.
Attack realism
Very high. The number one killer of network drops is not theft but a compromised client encrypting the share. Append-only default ends that story for the common case, while two-way stays available for operators who accept the wider surface with eyes open.
Pros
Safe default, explicit upgrade. Policy pre-decided, no per-deploy arguing. Mode printed on every grant, so no mystery about what a cred can do.
Cons and how the vault resolves them
- v1 WORM is partly by convention. Resolved in M3 by per-protocol enforcement (deny verbs at the DAV layer, store-only HTTP), with Gate 2 tests attempting overwrite, delete, and move per mode.
- Two-way widens the surface (writes, locks, versions). Resolved by opt-in plus the full policy stack (history, locks, cache cap, TLS, audit) landing together, never piecemeal.
- LWW can drop a slow writer's work. Resolved by 30-day version history: losing means an older copy, never no copy.
- 128MB cache cap can throttle big syncs. Accepted: the cap is the DoS ceiling; large trees sync in passes.
Residual risk
Convention-grade WORM until M3 enforcement lands. Tracked in BUILD-TRACK M3 with Gate 2 proof required.
M6: wizard radio replaces the checkbox; omitted tw and layers keep current values (both directions proven). The M3 residual above is closed.