carlos / platform Public

Owner-only config preservation observations and conditional patch receipts Feature Request open

Claimed by claude~paul@keymail.dev 1 month ago

Existing Oficina app adoption needs supported evidence that adding AGENTISSUER and AGENTTEAM preserved all previous configuration and storage bindings. Home capability is independently reviewed, but production activation is blocked on this observation facility: Home adoption.

Current console GET /config returns only key/kind for secrets; PUT is a per-key read-modify-write but exposes no version precondition or before/after receipt. Secret names alone do not establish unchanged values. No direct bucket or host access is an acceptable substitute for the member API.

Requested design, for review:

  1. Owner-only configuration observation: effective per-key opaque commitments plus stored versions of default, environment and any instance overlay, bound to account/app/instance/environment. Secret commitments must not expose plaintext or enable guessing low-entropy plaintext; a digest of the existing randomized sealed envelope may be suitable, subject to review. Define resealing semantics and precedence. Never expose inherited default metadata to team-scoped credentials (team credential boundary).
  2. Conditional config patch: accept an If-Match/version precondition, reject stale observations without writes, return acknowledged before/after versions and exact set/unset key names. Specify retry/idempotency and multi-bundle races. This must let a runner seal one baseline, add only its enumerated new settings, and refuse changed pre-existing entries without rebaselining on retry.
  3. Running-instance evidence: supported observation of rendered config identity and binding to live process/route/storage identity, with honest pending/stale semantics. Internal RenderHeld/CheckRenderedIdentity are prior art, not an exposed facility. Stored config equality alone is not proof the process received it; delivery gap, config lag.

Required negative checks include changed secret, changed ordinary value, shadowing through another bundle, stale version, concurrent write, wrong instance/storage, undelivered config, cross-account and team-role attempts. No secret values or deterministic plaintext hashes in reports/logs. New root-level read authority needs Astra census review under #280.

This records the prerequisite, not a settled platform design or authorization for infrastructure changes. No implementation owner is known after discussion/commit searches by the coordinating Home agent. Until reviewed facilities and the adoption observer exist, no production adoption activation or fabricated observation digests.

Spec approved by Paul (rev 6): docs/superpowers/specs/2026-11-02-config-receipts-design.md on branch design-config-receipts-522. Three Astra rounds; findings files beside it under docs/superpowers/reviews/.

How it answers the three asks:

  1. Observation. Every layer read carries version (cv1: SHA-256 of the stored bytes; none when absent). Every var carries digest (vd1:, over the stored form: the envelope for a secret, so nothing about the plaintext). Paul's ruling: the per-key test is "unchanged since observed", not "equals a value I hold". GET .../config/effective?host= shows which layer each key resolves from and what it shadows. Team credentials see only their owned environments.
  2. Conditional patch. if_version on PUT (S3-backed consoles only), 412 with nothing written when stale, a receipt with before/after versions and exact set / unset / unset_absent. §4.7 is the adoption recipe: baseline = per-key digests, so retries never rebaseline, and a changed preserved key or a conflicting new key stops the runner.
  3. Delivery evidence. Per-route acks (schema 2) on every state change, refusals included, on every route shape including declared named units. GET .../config/delivery?host= returns verdicts: delivered, overridden, pending, draining, blocked (with a reason code), file-only, not-delivered-by-carlos or unknown. Scope cut (Paul): a verdict is evidence about the launch that took the config, not the box afterwards. Names carlos sets at launch (CARLOS_HOST and friends) are refused at write.

Next: Plan 1 (console and appconfig) is being written now; Plan 2 follows.

Paul's rulings, 2026-11-16 (relayed from his Base session, which now drives 522 and oficina/home 103):

  1. Take over: this session drives 522 and home 103; earlier sessions went quiet on 2026-11-03.
  2. Plan 1 (config-receipts-1, CI passed at 48f5a22, Astra branch review READY, census approved): bring it up to date with main, rerun CI and census pin if needed, merge and release.
  3. Plan 2 (running-instance delivery evidence) is waived for the Oficina existing-team adoption only. In its place: a Paul-witnessed manual delivery check per app after restart: /api/version body and X-Carlos-Version unchanged, /healthz ok, sign-in still works, and GET /api/v1/operations moves from 404 to 401/200 (proof the process received AGENT_ISSUER). Plan 2 stays open as a platform feature; this waiver is not a precedent for other adoptions.

Plan 1 brought up to date with main at c5d5a930 (two main merges, 10 conflicts). Astra reviewed the resolutions and the re-pinned census: no findings; census APPROVE for #280 at c5d5a930 (root-read unit rows byte-identical to 48f5a22b; only envelope re-pins and appended chain seal; record-write census swaps registerCLIRoutes for the routeDecls/linkedPolicies pins). Merging and releasing as v0.38.0 once CI is green, per Paul's 2026-11-16 ruling. Note for clients: a console older than v0.38.0 ignores if_version, so conditional-write clients must check the console's capability first.

Handoff from session 4c585ebb (which drafted the spec and built Plan 1 up to 48f5a22b) to the driving session e8f83bff, per Paul 2026-11-17. This session is closing.

Open follow-ups, none started:

  1. Plan 1 polish: about 25 deferred P3s, listed in docs/superpowers/reviews/config-receipts-1-ledger-minors.md and the triage tables in docs/superpowers/reviews/CODEX-FINDINGS-config-receipts-branch-1.md (round 1). The two most useful: the per-instance view answers 502 "try again" for a route bound to a never-created environment (permanent; wants a clear 409), and carlos secrets set could compare the receipt's digests with the envelopes it just sent.
  2. Plan 2 (delivery evidence, spec §5): no plan written yet; open as a platform feature (waived for the Oficina adoption only, per Paul's 11-16 ruling above).
  3. Housekeeping: branch design-config-receipts-522 (ea02b306) is fully contained in main via c4b44c34 and can be closed; GitHub mirror sync if not already done after v0.38.0.

Rulings made during the Plan 1 build are in the ledger-minors file (lines starting "Ruling:") and the branch-review rulings files.