Tasks: the gateway learns a work item's collaboration channel
Six tasks, all in this repository. The gateway side (store, then route and resolution) comes first, because the client publishes to it. The docs task waits for the behaviour to settle.
Task list
- [x] 1. Store: the
roomstable andpublish_rooms- Add the table,
RoomsResult,publish_rooms,resolve_room,rooms_of, and theStoreprotocol entries. - Extract
_route_held_rowsfrombind;bindkeeps its behaviour. - Pruning drops a lapsed instance's rooms; subject pruning keeps subjects a room names.
- Depends on: none
- Requirements: R3.1–R3.3, R4.1, R4.2, R4.4, R4.5, R5.1–R5.3, R6.2, NFR store compatibility
- Test: T1 + T8 + T10,
tests/test_gateway_rooms.py(store cases, abuse 2 and 3, migration) (red→green)
- Add the table,
- [x] 2. Gateway:
PUT /rooms, the instances view, and resolution orderRoomsBodywith the id regex,KEY_MAX,ROOMS_MAX,slug_of; the handler, itsgateway.rooms/gateway.refused/subject.routedrecords;roomsinGET /instances._resolve_slack: thread binding → published room → static room → held.- Add the operation and
RoomsBodytothe-loop-gateway.v1.yaml. - Depends on: 1
- Requirements: R2.1–R2.4, R5.1, R5.4, R7.1, R7.2, NFR contract
- Test: T1 + T3 + T8,
tests/test_gateway_rooms.py(resolution order, route cases, abuse 1 and 5),tests/test_api_contract_parity.py(red→green)
- [x] 3. Instance: the store hook
CollaborationChannelStore.on_change, called after a changingadd,removeandclear, guarded so a raising hook never fails a declaration.- Depends on: none
- Requirements: R1.2
- Test: T1,
tests/test_gateway_rooms.py -k on_change(red→green)
- [x] 4. Instance: the client publishes rooms
GatewayClient.publish_rooms, the reconcile instep(), the full publish inregister(),roomsindocument(),attach(channel_store=…), the unreadable-dir guard.api/ingress.pypasses the dispatcher's channel store and setson_change.- Depends on: 2, 3
- Requirements: R1.1–R1.6, R4.1, R4.2
- Test: T1 + T8,
tests/test_gateway_rooms.py(client cases, fail-closed read) (red→green)
- [x] 5. End-to-end scenarios
tests/test_gateway_rooms_integration.py: the four Gherkin scenarios of the testing plan, throughGatewayHarness, the Slack HTTP ingress and aGatewayClient.- Depends on: 4
- Requirements: R1.1, R1.4, R2.2, R3.1, R4.1, R4.3, R6.1, R7.2
- Test: T2 + T8,
tests/test_gateway_rooms_integration.py(red→green on the branch before task 4's wiring, green after)
- [x] 6. Docs: issue-496 amendment and capability docs
- issue-496
requirements.mdR5.2 and R5.7 name rooms, pointing at this work item. docs/capabilities/gateway.mdanddocs/capabilities/channels.md: how a room reaches the gateway, the resolution order,slack.roomsas a static override.- Depends on: 5
- Requirements: NFR documentation
- Test: T11,
uv run pre-commit run --all-files(markdownlint)
- issue-496
Dependency graph (DAG)
Checkpoints
- After tasks 2 and 4:
cd cli && uv run python -m pytest -q tests/test_gateway_*.py tests/test_gateway_rooms.py tests/test_api_contract_parity.py. - After task 6:
uv run pre-commit run --all-files, then the verification node runstesting-plan.md.