STATE-WP-0100: design proposal for attributable actor and session on hub writes (SI-15)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

Assistant: claude-code
Assistant-Model: sonnet
Assistant-Process: 328925@bnt-lap001
Assistant-Session: 14b795fd-c632-4c01-8d28-e7e490c7b0ed
This commit is contained in:
tegwick 2026-10-24 23:49:25 +02:00
parent 7f1b057c1c
commit 0789f9b71b
2 changed files with 281 additions and 0 deletions

View file

@ -0,0 +1,95 @@
---
id: STATE-WP-0100
type: workplan
title: "Attributable actor and session on State Hub writes (SI-15)"
domain: infotech
repo: state-hub
status: proposed
owner: claude-code
topic_slug: infotech
created: "2026-10-24"
updated: "2026-10-24"
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.
## Founder decision on the design
```task
id: STATE-WP-0100-T01
status: todo
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.
## Header contract and schema
```task
id: STATE-WP-0100-T02
status: wait
priority: high
```
Prerequisite: T01. 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
```task
id: STATE-WP-0100-T03
status: wait
priority: high
```
Prerequisite: T02. Alembic migration, header validation, post-handler hook for all mutating
routes, `GET /attribution/`, tests per section 8 of the design. Unattributed writes are accepted.
## Client helpers
```task
id: STATE-WP-0100-T04
status: wait
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)
```task
id: STATE-WP-0100-T05
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.
## Commit-trailer correlation (optional)
```task
id: STATE-WP-0100-T06
status: wait
priority: low
```
Prerequisite: T03 and founder decision 2. `commit_ref` plus asynchronous trailer check.
## Token verification (gated)
```task
id: STATE-WP-0100-T07
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.