You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#1708 removed the sub-session worker's task-board mirror (PR #1967). That write was corrupt at the tasks table's key — a worker board numbers from "1" in its own namespace, so it upserted over the lead's rows at UNIQUE(session_id, task_id) — and its stated purpose ("so tasks queries see sub-agent boards too") was unachievable at that key, because no reader could tell a worker row from a lead row even if the rows had survived.
Dropping it was the correct call for the bug, and it is the reason the /clear seal (#1692) is now airtight: the driver is the session mirror's sole writer. But it means a sub-agent worker's private task board is now durably invisible. A delegated worker that plans its own sub-tasks with task_create leaves no persisted trace of that plan — only its lane's live events and its executions row survive.
That may well be correct (a worker board is scaffolding for one run, the same lifetime the pipeline gives an authored witness). This issue exists so the decision is on record rather than implied by a deletion, and so the work is scoped if the answer is "yes, we want them."
What it would take
The shape #1708 identified, unchanged by PR #1967 — all three parts are required together, and any one alone reintroduces a defect:
crates/stella-store/src/ddl.rs — TASKS_DDL (note its doc comment documents the current key and the SQL-NULL distinctness quirk; both need updating).
crates/stella-store/src/migrations/ — a migration bumping SCHEMA_VERSION. Existing rows backfill to the lead lane.
crates/stella-store/src/task_board.rs — record_task_board takes the lane; list_session_tasks either filters by lane or returns it.
Route the write through the driver. A worker-thread write cannot consult SubSessions::predates_task_board, so a pre-clear worker would repopulate a cleared mirror — A worker mirrors its OWN task board into the lead session's tasks rows — ordinal collision, and it bypasses /clear's board seal #1708's defect 2, which the lane column does not fix. Carry the board on SupervisorMsg::Ended (crates/stella-cli/src/subsession.rs) and let session_clear::settle_worker_task (crates/stella-cli/src/command_deck/session_clear.rs) arbitrate, exactly as it already does for the lead's row.
A reader that renders the lane. Both current readers are lane-blind:
Store::list_session_tasks (crates/stella-store/src/task_board.rs) — note it still has no production caller; see the companion issue.
crates/stella-store/src/lib.rs and src/tests.rs are at their file-size ceilings; crates/stella-cli/src/command_deck.rs is a god file closed to growth. New logic goes in sibling modules — stella-store/src/task_board.rs, stella-cli/src/subsession/closeout.rs and command_deck/session_clear.rs all have room. Do not raise a ceiling in scripts/file-size-baseline.txt.
stella-observatory must not link stella-store (it reads the DB directly) — a schema change means updating crates/stella-observatory/tests/schema_conformance.rs, which calls record_task_board.
Definition of done
Either:
Closed as "won't do", with a sentence in crates/stella-cli/src/subsession/closeout.rs's module docs recording that worker boards are intentionally ephemeral; or
All three parts above shipped together, with a witness test proving a worker board and a lead board coexist under one session without either overwriting the other, and that a pre-clear worker's board still cannot appear after /clear. The two witnesses in crates/stella-cli/src/subsession/closeout.rs must keep passing or be consciously replaced — they pin A worker mirrors its OWN task board into the lead session's tasks rows — ordinal collision, and it bypasses /clear's board seal #1708's two defects and a partial reintroduction would trip them.
Problem
#1708 removed the sub-session worker's task-board mirror (PR #1967). That write was corrupt at the
taskstable's key — a worker board numbers from "1" in its own namespace, so it upserted over the lead's rows atUNIQUE(session_id, task_id)— and its stated purpose ("sotasksqueries see sub-agent boards too") was unachievable at that key, because no reader could tell a worker row from a lead row even if the rows had survived.Dropping it was the correct call for the bug, and it is the reason the
/clearseal (#1692) is now airtight: the driver is the session mirror's sole writer. But it means a sub-agent worker's private task board is now durably invisible. A delegated worker that plans its own sub-tasks withtask_createleaves no persisted trace of that plan — only its lane's live events and itsexecutionsrow survive.That may well be correct (a worker board is scaffolding for one run, the same lifetime the pipeline gives an authored witness). This issue exists so the decision is on record rather than implied by a deletion, and so the work is scoped if the answer is "yes, we want them."
What it would take
The shape #1708 identified, unchanged by PR #1967 — all three parts are required together, and any one alone reintroduces a defect:
lanecolumn in thetasksUNIQUE key.UNIQUE(session_id, lane, task_id)— the lead's rows carrylane = 'lead'(or NULL), a worker's carry its lane (sub:2,req:1). Without this the ordinal collision returns exactly as A worker mirrors its OWN task board into the lead session's tasks rows — ordinal collision, and it bypasses /clear's board seal #1708 described it.crates/stella-store/src/ddl.rs—TASKS_DDL(note its doc comment documents the current key and the SQL-NULL distinctness quirk; both need updating).crates/stella-store/src/migrations/— a migration bumpingSCHEMA_VERSION. Existing rows backfill to the lead lane.crates/stella-store/src/task_board.rs—record_task_boardtakes the lane;list_session_taskseither filters by lane or returns it.SubSessions::predates_task_board, so a pre-clear worker would repopulate a cleared mirror — A worker mirrors its OWN task board into the lead session's tasks rows — ordinal collision, and it bypasses /clear's board seal #1708's defect 2, which thelanecolumn does not fix. Carry the board onSupervisorMsg::Ended(crates/stella-cli/src/subsession.rs) and letsession_clear::settle_worker_task(crates/stella-cli/src/command_deck/session_clear.rs) arbitrate, exactly as it already does for the lead's row.Store::list_session_tasks(crates/stella-store/src/task_board.rs) — note it still has no production caller; see the companion issue.crates/stella-observatory/src/sessions.rs, theFROM tasks WHERE session_id = ?1query). A worker row rendered indistinguishably from a lead row is the same "mixture with no way to tell the rows apart" A worker mirrors its OWN task board into the lead session's tasks rows — ordinal collision, and it bypasses /clear's board seal #1708 objected to.Constraints
crates/stella-store/src/lib.rsandsrc/tests.rsare at their file-size ceilings;crates/stella-cli/src/command_deck.rsis a god file closed to growth. New logic goes in sibling modules —stella-store/src/task_board.rs,stella-cli/src/subsession/closeout.rsandcommand_deck/session_clear.rsall have room. Do not raise a ceiling inscripts/file-size-baseline.txt.stella-observatorymust not linkstella-store(it reads the DB directly) — a schema change means updatingcrates/stella-observatory/tests/schema_conformance.rs, which callsrecord_task_board.Definition of done
Either:
crates/stella-cli/src/subsession/closeout.rs's module docs recording that worker boards are intentionally ephemeral; or/clear. The two witnesses incrates/stella-cli/src/subsession/closeout.rsmust keep passing or be consciously replaced — they pin A worker mirrors its OWN task board into the lead session's tasks rows — ordinal collision, and it bypasses /clear's board seal #1708's two defects and a partial reintroduction would trip them.Refs #1708, #1692, #1631. Follows PR #1967.