Repository navigation
Closed
Labels
area:cliTouches the cli areaarea:primitivesPatch tables and filesready-for-agentFully specified, ready for an AFK agent
Description
Part of #384. Implements spec §10's shared file stores; decisions composition points 1, 2, 9 and 11, the reference CRM (tier 1 consumption, store dependants, shared samples).
What to build
- Sharing a store:
files(description, { shared: true }), shared whole. Sharing publishes read access to every file in the store; the docs say so. - Declaring:
uses: { kind: "sharedStore", patchId, store, id, revision }, the revision stamping the source's inventory with a stale stamp warning as for tables;patchy add shared-store <patchId>/<store> --as <alias>. - Tier 1 reads through the broker with
patchy.shared.<alias>.list/get/url/downloadby name. Tier 2 reads throughctx.shared.<alias>: list and metadata in a query, bytes in an action. There are no shared writes. - The gate: a tier 1 tool may read a tier 2 patch's shared store. A consumer document below its own patch's served tier gets
server_required. Every read and redemption re-checks live that the viewer can open the source and the store is still shared, otherwiseaccess_denied. - Reverse states, matching tables: omission and rollback never change sharing; unshare, retire and delete list live dependants and refuse without
force; unsharing advances the store's revision and the source's lifecycle revision; restore brings consumers back unchanged; a new patch under the source's old name never rebinds. - Discovery:
patchy list <patch> <store>showsshared,declarableand theaddhint. The portal card's dependants line covers stores. Store dependants are reported as stores, not in atablefield. - Dev:
refreshlays down a missingfixtures/shared-<alias>/named after the source's store; dev loads it at start without overwriting. To change a source locally, edit the fixture and restart dev; authority changes are not simulated. - The skill: a shared-stores sibling of
patchy-shared-tables; "stores are not shareable" removed frompatchy-loop.
Admitted at merge
Shared stores publish and read on both tiers.
Done when
A tier 1 and a tier 2 consumer read a shared store; an unshare refuses without force and names the consumer; with force, the consumer's next read is access_denied and a reshare recovers it; a rollback of the consumer never changes the source's sharing.
Surfaces
ADR-0004 (add shared-store), packages/patchy/README.md, the wire (docs/API.md), the Primitives glossary (Shared file store), docs/product.md § Primitives (shared stores), the skills.
Metadata
Metadata
Assignees
Labels
area:cliTouches the cli areaarea:primitivesPatch tables and filesready-for-agentFully specified, ready for an AFK agent
Activity
feat(runtime): share file stores across patches