state-hub/workplans/STATE-WP-0100-hub-write-attribution.md
tegwick 0789f9b71b 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
2026-10-24 23:49:25 +02:00

2.4 KiB

id type title domain repo status owner topic_slug created updated flavor related
STATE-WP-0100 workplan Attributable actor and session on State Hub writes (SI-15) infotech state-hub proposed claude-code infotech 2026-10-24 2026-10-24 implementation
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

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

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

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

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)

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)

id: STATE-WP-0100-T06
status: wait
priority: low

Prerequisite: T03 and founder decision 2. commit_ref plus asynchronous trailer check.

Token verification (gated)

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.