swg_read
Read a workspace file and return its content plus coherence metadata (version and owner generation) to detect stale state and guard external actions against concurrent overwrites.
Instructions
Read a workspace text file under coherence tracking. Returns {content, version, owner_generation}. The version is the comparand you pass to swg_write_cas; KEEP BOTH version and owner_generation and pass them to swg_gate before any irreversible external action you decide from this read (owner_generation=null means this coordinator does not report generations, so swg_gate will hold). A sticky-INVALID view returns fresh bytes but stays INVALID — use swg_reacquire to recover before writing. SINGLE-HOST only. Out of guarantee and NOT detected in v1: writers on different hosts or across a synced/network mount, divergent-history reconciliation, semantic correctness, server-enforced auto-merge.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |