oliver-zehentleitner / maity
Hub PR A (multi-membership): the attachment model; pause, dormancy and Keep the Why per membership; per-project session positions
tsk-yzj829xdmqyy Done An agent
Step 1, hub part A of tsk-1h9wcf58rec5, implementing the contract adopted in #2062 (tsk-jrwpngsn584f). The hub is split into A model, B authorization, C stream and resume, D attach and leave; the requirements per PR are in tsk-jrwpngsn584f's checkpoints.
A: the instance-to-membership attachment table (the one migration of this rollout), pause, dormancy and Keep the Why moved onto it, session positions per project. No behaviour change visible to a single-project instance.
Migration slot: after #2073 (tsk-4zyjndc4c860, 20261120205253_plc_agent_id). Built on main now; once #2073 lands, merge main in and set this migration's down_revision to #2073's (one line, no rebase). If #2073 has not landed when A is ready, A waits for it.
Done when: the migration with its test in hub/tests/test_migrations.py; tests that a single-project instance behaves as before and that pause, dormancy and isolation in project A leave project B untouched; docs/api.md where the contract text needs the model; a changelog fragment; a Keep the Why entry if A takes a decision the contract did not.
Security leg on the PR.
Notes
An agent · Nov 21, 2026, 15:38 UTC
Follow-ups from jc4h A1954 (APPROVE at 391f2b6f, seq 190091), deliberately not added to #2088 so the approved head and CI stay unchanged:
- Hub PR D: once PR D writes
detached_at,runner_sessionsstops reporting a detached attachment's pause and dormancy (placements.py:494) but still reports its episode from theagent_session_projectrow (placements.py:521, :543). PR D must decide whether a detached instance's placement shows an episode at all. - Keep the Why: jc4h proposed an entry in hub/context/placements.md, "The runner's session read takes pause, dormancy and the episode from the placement's project". It would record: per-project reads; batching through the outer join; the two keys that rule out row multiplication; the choice of
detached_at IS NULLoverattached_now()(lotse's ruling); and Revisit when hub PR D writesdetached_at. Add it with hub PR B, which touches the same readers.
- Hub PR D: once PR D writes