- migration c4d5e6f7a8b9: inbox revision sequence, per-transaction revision trigger with advisory lock, message tombstones - GET /messages/feed/snapshot and /messages/feed?after= per the accepted contract; archived_at is now first-write-wins - STATE-WP-0098 blocked: T02/T04 qualified waits on owners and HUB-WP-0011-T01 - STATE-WP-0094-T05: correct the cited CCR, wait on railiance-platform - legacy-meter review evidence 2026-10-14 Not deployed; the migration deploy is a separate confirmed step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Assistant: claude-code Assistant-Model: opus Assistant-Process: 356991@bnt-lap001 Assistant-Session: 5d99ea69-ed55-4a1e-8d97-f4f312db247f
151 lines
6.4 KiB
Markdown
151 lines
6.4 KiB
Markdown
---
|
|
id: STATE-WP-0098
|
|
type: workplan
|
|
title: "Supply State Hub inputs that hub-core receipt tasks wait on"
|
|
domain: infotech
|
|
repo: state-hub
|
|
status: blocked
|
|
owner: claude-code
|
|
topic_slug: infotech
|
|
created: "2026-10-13"
|
|
updated: "2026-10-13"
|
|
flavor: implementation
|
|
related: [STATE-WP-0079, HUB-WP-0006, HUB-WP-0011]
|
|
state_hub_workstream_id: "0c68970e-295b-57fc-ac70-e472ee3a7bc4"
|
|
---
|
|
|
|
Breaks the mutual wait recorded on STATE-WP-0079-T04. T04 waits on hub-core
|
|
receipts HUB-WP-0011-T03 and HUB-WP-0006-T06. Both of those wait on artifacts
|
|
that State Hub owns. This plan delivers those artifacts. It does not switch any
|
|
route: switches stay under STATE-WP-0079-T04 and the founder's 2026-10-05
|
|
writer authorization (913b924b), with old-route fallback and metered
|
|
acceptance retained by State Hub.
|
|
|
|
## A5 topic-spine comparison packet
|
|
|
|
```task
|
|
id: STATE-WP-0098-T01
|
|
status: done
|
|
priority: high
|
|
state_hub_task_id: "2197b8ae-40d1-52ff-b9d5-3244b9e5e8a9"
|
|
```
|
|
|
|
Input for HUB-WP-0006-T06. Enumerate the A5 topic/classification read
|
|
endpoints (8 per `docs/retirement-cutover-slice-plan.md`) and their actual
|
|
callers from the legacy meter. Capture legacy response shapes. State the alias
|
|
expectations: legacy topic ids and slugs versus registrar `repository_id`.
|
|
Define concrete comparison cases against the deployed hub-core projection.
|
|
Name the fallback route. Deliver as `docs/a5-topic-spine-comparison-packet.md`
|
|
plus a JSON case list, and notify hub-core.
|
|
|
|
## A4 work/repo UI caller inventory and owner asks
|
|
|
|
```task
|
|
id: STATE-WP-0098-T02
|
|
status: wait
|
|
blocked_on: message-from:hub-core
|
|
blocking_reason: "Owner map delivered and switch-plan requests sent 2026-10-13 to hub-core (5e2f749b), activity-core (13cff5ff), repo-manager (0c49c989), sbom-nexus (63ce4ead) and policy-nexus (d5dda84d); waiting for their read smokes and reversible switch plans."
|
|
priority: medium
|
|
state_hub_task_id: "e6ef3381-9867-52f6-8c9c-2aa24f9a16b3"
|
|
```
|
|
|
|
Enumerate the 22 A4 UI read endpoints and the clients that call them. Name the
|
|
UI/client owner for each. Ask each owner for a candidate read smoke and a
|
|
reversible switch plan. Record the owners and requests in the A5 packet's
|
|
companion section. A4 redirects stay behind the retained UI as rollback.
|
|
|
|
## Inbox change-feed contract
|
|
|
|
```task
|
|
id: STATE-WP-0098-T03
|
|
status: done
|
|
needs_human: false
|
|
priority: high
|
|
state_hub_task_id: "17c424c9-4089-56d2-9057-42e34f13827b"
|
|
```
|
|
|
|
Input for HUB-WP-0011-T01. Specify a versioned State Hub inbox change feed:
|
|
a consistent snapshot plus a monotonic revision/cursor; read/archive state
|
|
changes; deletion versus retention semantics (tombstones; State Hub stays the
|
|
only message writer); replay/compaction recovery; and source timestamps for
|
|
freshness. Deliver as `docs/inbox-change-feed-contract.md`. Any
|
|
retention/ownership choice that the existing T08/T09 record does not settle
|
|
goes to the founder before hub-core implements against it.
|
|
|
|
## Implement the inbox change feed
|
|
|
|
```task
|
|
id: STATE-WP-0098-T05
|
|
status: done
|
|
priority: high
|
|
state_hub_task_id: "14c66646-2a20-5dc2-b9d7-6d30a3dfa6b1"
|
|
```
|
|
|
|
Implement `docs/inbox-change-feed-contract.md` as accepted on 2026-10-13:
|
|
- the additive migration: `inbox_revision_seq`, `revision` columns on
|
|
`agent_messages` and `message_receipts` with backfill, the per-transaction
|
|
revision trigger, and `message_tombstones` with its delete trigger
|
|
- `GET /messages/feed/snapshot` and `GET /messages/feed?after=v1:<revision>`,
|
|
with `source_time`, `high_water`, `source_instance`, 410 past the 90-day
|
|
horizon and 409 on another instance
|
|
- first-write-wins `archived_at`
|
|
- tests on PostgreSQL
|
|
|
|
2026-10-14: implemented, not committed and not deployed. Migration
|
|
`c4d5e6f7a8b9` (down `b3c4d5e6f7a8`); `api/models/agent_message.py`,
|
|
`api/schemas/inbox_feed.py`, `api/routers/message_feed.py`, `api/main.py`,
|
|
`api/routers/messages.py` (first-write-wins archive), `tests/test_message_feed.py`
|
|
(13 tests). Message tests 42 passed; full suite 1087 passed. Contract status is now
|
|
"implemented (not deployed)", and its §8 lists the deviations. Deploy is a
|
|
separate confirmed step.
|
|
|
|
The deploy is a separate, confirmed step.
|
|
|
|
## Named single reader and parity window
|
|
|
|
```task
|
|
id: STATE-WP-0098-T04
|
|
status: wait
|
|
depends_on: [HUB-WP-0011-T01]
|
|
blocking_reason: "The first reader is chosen once hub-core implements the accepted feed contract (HUB-WP-0011-T01) and the feed is deployed. Per D3, choose a reader that does not rely on broadcast delivery stamps."
|
|
priority: medium
|
|
state_hub_task_id: "077797c8-289b-55ec-9597-28f223891b02"
|
|
```
|
|
|
|
Input for HUB-WP-0011-T03. Name the one inbox reader to switch first. Give
|
|
its parity sample/window and the rollback endpoint (current State Hub
|
|
`/messages/`). Get the reader owner's agreement. This depends on T03 being
|
|
accepted by hub-core.
|
|
|
|
2026-10-13 delivery:
|
|
- T01: `docs/a5-topic-spine-comparison-packet.md` and
|
|
`docs/evidence/a5-topic-spine-comparison-cases.json` (10 cases).
|
|
- A5 is 3 topic reads, 4 writes and the `topics` table, not 8 read
|
|
endpoints.
|
|
- All direct callers are State Hub's own tooling. 126 repos keep a
|
|
`topic_id` that must stay stable.
|
|
- Gaps that block hub-core: `legacy_topic_aliases` is hard-coded empty in
|
|
hub-core `repository_navigation.py`; `RM_SLICE_TOPICSPINE` is not
|
|
implemented anywhere; topic routes are not metered; the 154 legacy vs 123
|
|
published repository gap is unexplained.
|
|
- T02: 22 A4 dashboard views mapped to owners (same packet). Owner requests
|
|
sent 2026-10-13.
|
|
- T03: `docs/inbox-change-feed-contract.md` drafted. A migration is required
|
|
(no revision column on `agent_messages`/`message_receipts`, no tombstones).
|
|
Four founder decisions are open.
|
|
|
|
2026-10-13: the founder accepted contract decisions D1-D4 as recommended
|
|
(90-day tombstones, no purge, delivery-stamp loss accepted, migration
|
|
approved). T03 is done, and T05 holds the implementation.
|
|
|
|
2026-10-14: a hub-core worker, started on the founder's instruction, closed
|
|
the two hub-core gaps from T01, committed locally in ~/hub-core and not pushed:
|
|
- `9e4d5ba`: a checked-in legacy topic alias seed (16 topics, version
|
|
2026-10-13.1, expiry 2027-03-31) and `RM_SLICE_TOPICSPINE` (off|shadow|on,
|
|
default off; off leaves output unchanged).
|
|
- `3c5255f`: HUB-WP-0006-T07.
|
|
The full hub-core suite passes on an independent re-run (488 passed, 3
|
|
skipped). Local cases C01, C02, C08 and C10 pass. C03 differs: an unknown
|
|
domain returns 400, not 200. C04-C07 need the live deployment. Open: alias
|
|
slugs with `_` are sent hyphenated under the 1.0.0 contract.
|
|
|