P1 — define versioned principal-scoped persistence for user-authored semantic commands #162

Closed
opened 2026-08-22 21:53:41 +00:00 by lost-rob0t · 0 comments
lost-rob0t commented 2026-08-22 21:53:41 +00:00 (Migrated from github.com)

Parent epic: #151
Depends on: #150 release contract or the specific frozen schema slices #154-#157; #131 for principal persistence.

Goal

Define and implement durable storage for user-authored commands as versioned declarative semantic definitions, never arbitrary shell/Python/Prolog source.

Required model

Stable command id, owner principal, trigger/aliases, typed slot schema/defaults, ordered semantic actions/capability references, location/target policy where allowed, schema version, created/updated metadata, enabled state and migration metadata. Exact storage technology is research-owned but must use Zara's principal-scoped persistence conventions.

Invariants/tests

  • A cannot get/list/search/update/delete B definition even by known id/trigger;
  • duplicate/colliding ids/triggers deterministic;
  • guest/ephemeral durability policy explicit;
  • crash/partial-write atomicity;
  • schema upgrade/rollback fixtures;
  • malformed/unknown action/slot types fail closed;
  • stored strings cannot become dynamic imports/goals/shell;
  • export/delete principal isolation;
  • concurrent edits with defined conflict semantics;
  • restart persistence/hot-load input is validated before activation.

Gates

TDD; focused command-persistence/migration/isolation script; full repo/Nix and exact-head Actions.

Acceptance

A validated semantic command definition survives restart under immutable principal ownership and cannot encode an arbitrary execution escape hatch.

Parent epic: #151 Depends on: #150 release contract or the specific frozen schema slices #154-#157; #131 for principal persistence. ## Goal Define and implement durable storage for user-authored commands as versioned declarative semantic definitions, never arbitrary shell/Python/Prolog source. ## Required model Stable command id, owner principal, trigger/aliases, typed slot schema/defaults, ordered semantic actions/capability references, location/target policy where allowed, schema version, created/updated metadata, enabled state and migration metadata. Exact storage technology is research-owned but must use Zara's principal-scoped persistence conventions. ## Invariants/tests - A cannot get/list/search/update/delete B definition even by known id/trigger; - duplicate/colliding ids/triggers deterministic; - guest/ephemeral durability policy explicit; - crash/partial-write atomicity; - schema upgrade/rollback fixtures; - malformed/unknown action/slot types fail closed; - stored strings cannot become dynamic imports/goals/shell; - export/delete principal isolation; - concurrent edits with defined conflict semantics; - restart persistence/hot-load input is validated before activation. ## Gates TDD; focused command-persistence/migration/isolation script; full repo/Nix and exact-head Actions. ## Acceptance A validated semantic command definition survives restart under immutable principal ownership and cannot encode an arbitrary execution escape hatch.
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
nsaspy/zara#162
No description provided.