diff --git a/docs/hub-write-attribution-design.md b/docs/hub-write-attribution-design.md index ab827dc..247ed46 100644 --- a/docs/hub-write-attribution-design.md +++ b/docs/hub-write-attribution-design.md @@ -177,10 +177,19 @@ delivered and would risk every cron and relay writer at once. - Cross-repo drift: header names and `assurance` values become a contract; publish them in `docs/schemas/` and tell net-kingdom, hub_core and MCP maintainers. -## 10. Decisions needed from the founder +## 10. Founder decisions (decided 2026-10-25) -1. Accept option A as phase 1 (claimed tier) and the header names above? -2. Is commit-trailer correlation (phase 2) wanted, or is session id equality enough? -3. Phase 3 timing: wait for net-kingdom/key-cape agent tokens, and enforce or only observe? -4. Backfill of legacy authors: map via reviewed file, or leave unmapped? -5. Whether `hub_core` (shared factory package) changes are acceptable in this repo's cycle. +1. **Decided:** Option A is phase 1 (claimed tier) with the header names above. No `hub_core` + schema change; only the sidecar `write_attribution` table. Revisit `hub_core` if a per-record + actor column is ever wanted. +2. **Decided:** correlation with commits by equal session id and run id only. The asynchronous + commit verifier and `commit_ref` (Option B) are deferred; revisit if signed commits are + introduced. +3. **Decided:** phase 3 verifies key-cape agent tokens (KEY-WP-0043) in OBSERVE mode only: + record `assurance=token`, never reject. Enforcement is a separate later founder decision. +4. **Decided:** existing free-text authors are not backfilled. A read-only count of distinct + `author`/`decided_by`/`from_agent` values may be run later to size a mapping. +5. **Decided:** `hub_core` is not changed in phase 1. + +Sections 5 and 7 are read accordingly: phase 2 (commit_ref and trailer check) is deferred and the +backfill in section 7 is not planned. diff --git a/workplans/STATE-WP-0100-hub-write-attribution.md b/workplans/STATE-WP-0100-hub-write-attribution.md index 3502f42..1ad3c48 100644 --- a/workplans/STATE-WP-0100-hub-write-attribution.md +++ b/workplans/STATE-WP-0100-hub-write-attribution.md @@ -8,39 +8,40 @@ status: proposed owner: claude-code topic_slug: infotech created: "2026-10-24" -updated: "2026-10-24" +updated: "2026-10-25" flavor: implementation related: [NK-WP-0054] --- Proposed from hub message 05ba80d7 (net-kingdom, rule SI-15 accountable automation). Design and -recommendation: `docs/hub-write-attribution-design.md`. Nothing here starts until the founder -accepts the recommendation (option A now, token verification later). Phase 3 depends on -net-kingdom/key-cape minting agent tokens and is not ours to schedule. +recommendation: `docs/hub-write-attribution-design.md`. Founder decided on 2026-10-25: option A +is phase 1 with no `hub_core` schema change; commit correlation by equal session and run id only +(commit verifier deferred); phase 3 verifies tokens in observe mode only (enforcement is a later +founder decision); no backfill. Phase 3 depends on net-kingdom/key-cape minting agent tokens and +is not ours to schedule. ## Founder decision on the design ```task id: STATE-WP-0100-T01 -status: todo +status: done priority: high ``` -Founder answers the five questions in section 10 of the design. Done when recorded in the -design document or as a hub decision. Blocks T02 onward. +Founder answered the five questions in section 10 of the design on 2026-10-25; recorded there. ## Header contract and schema ```task id: STATE-WP-0100-T02 -status: wait +status: todo priority: high ``` -Prerequisite: T01. Publish the header names, `assurance` values and the `write_attribution` +Prerequisite: T01 (done). Publish the header names, `assurance` values and the `write_attribution` table shape in `docs/schemas/`; agree with net-kingdom, hub_core and MCP maintainers. -## Sidecar table, middleware and read endpoint +## Sidecar table (no `hub_core` change), middleware and read endpoint ```task id: STATE-WP-0100-T03 @@ -62,7 +63,7 @@ priority: medium Prerequisite: T03. `statehub` CLI, both MCP servers and the edge relay/outbox set and preserve the actor headers (`STATEHUB_ACTOR`, `STATEHUB_ACTOR_TYPE`, `STATEHUB_SESSION`). -## Legacy author mapping (optional) +## Legacy author count (optional, read-only) ```task id: STATE-WP-0100-T05 @@ -70,18 +71,20 @@ status: wait priority: low ``` -Prerequisite: T03 and founder decision 4. Read-only count of distinct author strings, reviewed -mapping file, `assurance=legacy` backfill. Never upgrade legacy rows. +Founder decision 4 (2026-10-25): no backfill. Only a read-only count of distinct author strings +to size a possible later mapping; the mapping file and `assurance=legacy` backfill are dropped. -## Commit-trailer correlation (optional) +## Commit-trailer correlation (deferred) ```task id: STATE-WP-0100-T06 -status: wait +status: cancel priority: low ``` -Prerequisite: T03 and founder decision 2. `commit_ref` plus asynchronous trailer check. +Cancelled by founder decision 2 (2026-10-25): session id and run id equality only. The +asynchronous commit verifier and `commit_ref` (Option B) are deferred; revisit if signed commits +are introduced. ## Token verification (gated) @@ -91,5 +94,6 @@ status: wait priority: medium ``` -Prerequisite: net-kingdom/key-cape agent-token availability and founder decision 3. Observe-mode -bearer verification per IAM Profile v0.3, then a separate enforcement decision. +Prerequisite: net-kingdom/key-cape agent-token availability (KEY-WP-0043). Observe-mode only per +founder decision 3 (2026-10-25): bearer verification per IAM Profile v0.3, record +`assurance=token`, never reject. Enforcement is a separate later founder decision, not in this plan.