Skip to content

feat: a started board task gets its own conversation, bound to the engine's link - #189

Open
polymaniadeveloper-hub wants to merge 13 commits into
masterfrom
feat/board-owned-threads-creation
Open

polymaniadeveloper-hub wants to merge 13 commits into
masterfrom
feat/board-owned-threads-creation

Conversation

@polymaniadeveloper-hub

@polymaniadeveloper-hub polymaniadeveloper-hub commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

Board revamp slice 2, T3 half: a board task that the engine shows in work gets one conversation of its own, made by the server and bound to the engine's boardThread link. Built on the hardening round (#187), which is merged into this branch.

Spec: docs/context/delivery-system/BOARD-REVAMP-UI-SPEC.md (Operation-PaperClip, branch docs/board-revamp-ui-spec), sections 4, 5, 6, 6a, 7, 9, 10.

How a thread is created, and why it only reads engine facts

apps/server/src/delivery/BoardTaskThreads.ts reads the engine's lanes (/api/lanes?view=development&set=all) every 30 seconds. A task counts as started when its lane is not one of draft, chat, queue, intake, ready, not finished (completed, closed-not-done) and not moved/moving. A started task with no boardThread gets one thread, then the link is written back, then the task is claimed with the thread as origin. Each later pass is the claim's heartbeat.

The engine is the only source: its lanes say what started and which thread a task holds, its team configuration says who leads. T3 never starts a task, no client asks for a thread, and delivery.act refuses the link and claim routes. That keeps one writer per fact, so a board open in two clients or a restarted server cannot disagree with the engine about which thread is a task's.

Idempotence across double starts and restarts

  • The thread id and the create command id are derived from the task (board-task:<board>:<task> and <marker>:thread). A second pass, a second server and a restart between the create and the link all dispatch the same command and get the one thread (command receipts).
  • The marker is stamped when the thread is created and never after.
  • reconcile runs under a one-permit lock, and is safe to run twice at once.
  • Claim tokens live in memory only. After a restart the old lease lapses inside its 120 second window and the task is claimed again by the same thread.

Write-back semantics

  • PUT /api/tasks/<id>/board-thread with setBy the environment and expect: null: the write only lands if no link was set.
  • Every link write of the server waits in one serialized one-permit queue, so the engine gets one at a time (this also bounds the first run, when every open task has no link).
  • 409 conflict: the engine's current value is read and adopted, never overwritten. The thread made here holds no task and is archived, where the board's archive still reaches it.
  • moved and not-found are terminal: the thread is archived, and an archived thread is never linked, on a later pass or after a restart.
  • Restoring the thread from the board's archive is what re-enables linking.
  • The refusal's code decides, never its message text.

Marker grammar and its exact scope

board-task:<board>:<task>, with task id [\w-]{1,256} (what the engine's routes take) and a board id of 1 to 256 characters with no colon, whitespace or control character. Ids outside that are refused at write by boardTaskOf (hold unmarkable-id): no escaping, no thread, no link. The pin covers only the two ids T3 writes into a marker. A thread id the engine supplies in boardThread is taken as it is and never re-validated.

Lead selection and the holds

The lead is the seat with role team-lead, else the seat named lead, of the task's team in the engine's team configuration. Its harness picks the provider instance: the driver's default instance, or the sole enabled instance of that harness. Two instances of one harness are two accounts and the engine names a harness, not an account, so that case is held, not guessed.

A started task with no conversation is held for a logged reason: no-board, unmarkable-id, no-project, no-lead, no-lead-model, no-provider, ambiguous-provider, foreign-thread, archived-thread, no-key, refused, moved.

The archive door

A task's thread is in no thread list, and one whose task ended is archived, never deleted. The board toolbar opens "Archived task conversations" (delivery.archivedBoardThreads): each can be opened, restored or deleted. The server finds them by marker and names the board and task; the client never reads a marker.

Card and lane surfacing

A card carries the engine's message count, how many are new and the last line. The "Waiting on you" lane adds up its open questions and sign-offs in its header. A board task's conversation raises nothing in the sidebar or as a notification, so the card and this lane are where a person sees they are asked. Every number is a field the engine already sends.

Linked rows

A pull request's or issue's linked threads now include board tasks as "Board task: <title>". The rows are selected on the board-task: prefix, carry no thread id and open the task view (conversation and engine facts together). The ordinary list's exclusion of server-owned threads is untouched. An archived one reads as ended and opens the board. Mobile has no board: its issue screen shows the row and says where to open it.

Merge of master (#187) and what was checked

origin/master (360306b) was merged in, no rebase and no force push. Git merged every file without a textual conflict. One semantic seam: #187's archived-send test built markers from an unbranded {board, id}, which this branch's marker no longer takes; it now uses boardTaskOf (2902be8).

Present after the merge, with their test files passing:

  • OrchestratorThreadArchivedError with refuseArchivedThreadMessage and the archived-send test: ThreadLaunchService.test.ts 78 passed.
  • The ThreadRouteView serverOwned tag exemption and the hidden-tag matrix cases: ThreadRouteView.browser.test.tsx 9 passed.
  • The ThreadManagementService includeSubagents family rule: ThreadManagementService.test.ts 36 passed.
  • ComposerArchivedThread with the ChatView banner: ChatView.archivedSend.browser.test.tsx 2 passed.
  • The catalog sentence "Board and engine conversations already archived are kept." and the archived-notice key (fea770db813e04c2): in all 10 web catalogs, and the sentence in all 10 mobile catalogs. node scripts/i18n-check.ts passes.

Also run, one file at a time: BoardTaskThreads.test.ts 13, boardThreadMarker.test.ts 4, client-runtime delivery.test.ts 4, deliveryModelBinding.test.ts 1, projects.test.ts 2, ProjectSettingsPanel.logic.test.ts 10, ProjectSettingsPanel.browser.test.tsx 26, ArchivedBoardThreads.logic.test.ts 1. Typecheck is clean in packages/client-runtime, apps/server, apps/web, apps/mobile. The full suite was not run.

Real-engine validation, reproducible (review ask-back)

The repo already gates environment-dependent tests with skipIf and keeps host-side verifiers in apps/server/scripts, so the runner is committed under that convention:

  • apps/server/src/delivery/BoardTaskThreads.engine.test.ts: skipped unless T3_BOARD_THREAD_ENGINE_ROOT is set.
  • apps/server/scripts/board-thread-engine.ts: the engine process the test starts and stops.

Replay, against engine commit a658892b:

mkdir /tmp/engine-a658892b
git -C <Operation-PaperClip> archive a658892b delivery teams | tar -x -C /tmp/engine-a658892b
cd apps/server
T3_BOARD_THREAD_ENGINE_ROOT=/tmp/engine-a658892b vp test run src/delivery/BoardTaskThreads.engine.test.ts

I ran exactly this on a fresh archive of a658892b: 1 passed. Without the variable: 1 skipped.

Seed data (all under a temp folder, removed at the end): an engine home with one repository app bound to a new git repository with one empty commit, one board work, the engine's own teams folder, and an approval passphrase generated per run. Tasks are added through a control port on the script, because the engine's API offers no way to add a task in a chosen lane, move one or delete one.

Asserted, against the real engine's store and HTTP API:

  • One started task gets one thread; draft, ready and merged tasks get none.
  • The thread's model is the development lead's model read from the engine's team.json.
  • The link is {environmentId, threadId, setBy} of this environment; the lease origin is thread:<environment>/<thread>; a second pass renews the same claim; exactly one task.board-thread-set event.
  • Two passes at once plus a second server: one thread, one write.
  • Conflict: another writer links first with a thread id carrying :, / and %; the engine's link stands, ours is archived, no lease is held.
  • Moved between the lanes read and the write: hold moved, thread archived, never retried (archived-thread) even after the task returns.
  • Deleted between read and write: thread archived.
  • A wrong key: hold refused, nothing written or archived; the right key then links.
  • A linked task that is deleted leaves its thread archived, and other threads untouched.

Real: the engine, its store, its HTTP API, the delivery service's request path, BoardTaskThreads. Stubbed: T3's thread store (commands kept in memory with command receipts), the project lookup, the provider registry (codex and claudeAgent enabled), the board thread rows read. No provider or worker runs.

What ran only against the scratch engine (boardThreadEngine.testkit.ts, a model of the frozen 6a contract): the 13 cases of BoardTaskThreads.test.ts, including the restart between the create and the link write, the one-at-a-time write queue, the holds for lead and provider selection, an engine without the link, and a client's act being refused. Restore re-enabling linking follows from the archived-thread rule (a restored thread is no longer archived) and has no dedicated test case.

Removal dialog (QA round 3, finding 1)

The shell's serverOwnedThreads count covers only active board threads, so a project whose board threads were all archived was told only "Any archived threads are deleted from T3 Code", which is false for them. The confirmation now reads delivery.archivedBoardThreads once per environment (2 second deadline), counts the rows of the project's members, and when none is active adds "N archived conversation(s) started by a board are kept, not deleted." With an active one the existing line already says so, so there is one line, not two. An environment that does not answer or lacks the read counts as none.

Tests in ProjectSettingsPanel.logic.test.ts: the all-archived case, the count per member and environment, failed, absent and never-answering reads, and no doubled line. The new string (a65acdb87eac322b) is in every web and mobile catalog, machine-translated.

Not verified by hand in a running app: the dialog was exercised through the logic test and the existing browser test, not clicked through on web or mobile.

Capability gaps

  • The engine's team configuration names no environment per seat, so threads are local to the server that reads the engine, for now.
  • T3_DELIVERY_BOARD_THREAD_KEY must be set on the server host. Without it links are held as no-key.

T3 pieces reused

  • The archive list: ui/popover, ui/button, ui/toast, RelativeTime, and useThreadActions for restore and delete.
  • Linked rows: the existing PullRequestThreadLinks and IssueThreadLinks rows and the command palette's open action.
  • Removal dialog: the existing planProjectRemoval confirmation on both surfaces (api.dialogs.confirm on web, Dialog.confirm on mobile), the existing delivery.archivedBoardThreads read through createEnvironmentRpcCommand and useAtomCommand. No new UI element.
  • Catalogs: gt generate and scripts/i18n-check.ts.

Deferred

  • Per-client delta scoping.
  • The archived-seat listing edge.
  • The tab-title nit.
  • A native-speaker pass on the machine-translated catalog strings.

🤖 Generated with Claude Code


Independent QA, 2026-11-22 (head 8664955)

QA ran on a separate model from the builder, in its own detached worktree at the head. No product code was changed and nothing was pushed or merged. The engine repository was only read (git archive).

Verdict: pass with findings. 1 blocking finding.

Findings, ranked

1. Blocking: restoring the archived conversation of a deleted task makes it unreachable.
The archive door offers Restore on every row, including conversations whose task no longer exists. Restore clears archivedAt. The thread is then in no thread list (by design), it leaves the archive door (which lists only archived threads), and the reconciler never re-archives it: more than two passes later it was still unarchived. Its project's removal dialog still counts it ("1 conversation started by a board or the engine is archived, not deleted"), but no surface opens it. The only way back is its raw URL.
Reproduction, live (real engine at a658892b plus a T3 dev server at this head):

  1. Add a started task (control /add, state triage, submitted set) and let a pass link it.
  2. Control /delete the task. Within one pass the thread is archived and listed under "Archived task conversations".
  3. Click Restore on that row. The list says "No archived conversations on this board." archived_at is now empty.
  4. Wait for two or more reconcile passes. The thread stays unarchived. Sidebar search, the command palette, Settings > Archive and the board's archive door all fail to find it.
    The PR body says restore is what re-enables linking, which fits a task that still exists (conflict or moved). For a task that is gone, restore turns a recoverable conversation into an orphan. Suggested fixes: offer Restore only when the engine still lists the task, or have the reconciler re-archive an unarchived marker thread whose task the engine positively reports as not found (never when the engine is away).

2. Not a defect in this PR: UsageService.test.ts fails on this Mac.
"returns other providers' usage while Muse home discovery is still pending" expects /var/folders/... and receives /private/var/folders/... (macOS tmp symlink). It fails alone too. The PR touches no usage file; it ran only because import tracing pulled it in. Not re-run on master.

Observation (not counted): the task centre's composer reads "No team" for a board thread. That may be intended, since the lead's model is already set. Noted for the owner.

1. Real-engine test (BoardTaskThreads.engine.test.ts)

  • Without T3_BOARD_THREAD_ENGINE_ROOT: 1 skipped, clean.
  • With the engine at a658892b (git archive a658892b delivery teams): 1 passed.
  • With the engine at its current origin/main (20719419): 1 passed. The first attempt was killed by the OS (exit 137) under memory pressure, and a rerun on its own passed.
  • The test covers one thread and one write under two concurrent passes, conflict adoption with a thread id carrying : / %, moved, not-found, a wrong key, and archive on delete. The missing-key (no-key) hold is covered only by the scratch test (BoardTaskThreads.test.ts:465), not against the real engine.

2. Full loop in a real web client: pass, apart from finding 1

Setup: node apps/server/scripts/board-thread-engine.ts <a658892b archive> with T3_BOARD_THREAD_ENGINE_PHRASE, and pnpm dev --home-dir <scratch> with T3_DELIVERY_BOARD_THREAD_KEY set to the same phrase and delivery.engineUrl pointed at the helper. Setup note: the host's T3_WORKSPACE_* variables must be unset for a scratch dev server. Otherwise delivery refuses with "settings do not match its bound engine endpoint" and the home gets stamped to the host profile. This was a QA environment issue, not a product bug.

  • With no project at the engine's repository folder, the server held the started task as no-project (logged). After the folder was added through Add project > Local folder, the next pass linked it: boardThread.threadId = board-task:work:task-30a52d2a86, setBy = this environment.
  • The thread was created with the lead's provider and model from the engine's teams/development (codex, gpt-6-astra). Its title is the task title.
  • Task centre opens the linked conversation (repo / QA live loop task, lead model in the composer). Screenshot: /Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mwrxuny0-46dc9c26.png
  • Hidden everywhere: the thread is absent from the sidebar, sidebar search ("No threads found"), the command palette ("No matching commands, projects, or threads.") and Settings > Archive ("No archived threads").
  • Card activity: with one person message (engine API) and one open lead question (seeded in the scratch engine's task_messages), the card showed "2 messages, 1 new, lead: QA: which base should this go on?".
  • Waiting lane: with the task in needs-decision, the "Waiting on you" lane header showed "1 question". Screenshot: /Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mwrxxmhx-83632551.png
  • No second thread: the task was moved to ready and then back to triage over two passes. Still one thread, one link, and exactly one task.board-thread-set event.
  • End of task: after control /delete, the thread was archived within one pass and listed in the board's archive door. Screenshot: /Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mwry1w5a-d5c13a7b.png
  • Open from the door showed the conversation with "This thread is archived and cannot receive messages."
  • Restore cleared the archive (see finding 1 for what happens next).
  • Delete (second task): the confirm dialog appeared, deleted_at was set, and the row left the door.

3. Linked rows: pass (pull request), not run (issue)

The second board thread was linked to this PR through the palette's "Link pull request to thread" (a T3-side link; GitHub was only read). The PR detail showed "Linked from 1 thread". Its row read "Board task: QA linked rows task" / "Opens the task on the board" and opened /board?...&task=task-22d2d8462c (the task view), never the raw thread. Screenshot: /Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mwrya10s-98d6d9f8.png
After the task was deleted, the row read "Task ended. Its conversation is in the board's archive" and opened the board. After the thread was deleted, the link control was gone.
Issue rows were not exercised live: there was no issue tracker bound to a scratch repository. They share linkedBoardTasks with the pull request path.

4. #187 regression: partial

  • Pass: an archived board thread refuses sends with the notice, and ordinary threads behave as before (sidebar, search, palette).
  • Pass: the removal dialog for the board project counted the one unarchived board conversation (the orphan from finding 1) and said archived board conversations are kept.
  • Not exercised: the tagged board thread opening under the project filter.

Tests run (serialized, after the client pass)

Every test file importing a module this PR changes (import-traced, 94 files) plus the PR's own tests:

  • server: 25 files, 721 passed, 1 skipped, 1 failed (finding 2, unrelated)
  • web unit: 40 files, 667 passed
  • web browser: 9 files, 83 passed
  • client-runtime: 8 files, 143 passed
  • contracts: 4 files, 21 passed
  • mobile: 7 files, 62 passed
  • provider-pi: 1 file, 174 passed

Not verified

  • Typecheck and lint were not run (machine under swap pressure).
  • Restore re-enabling linking for a task that still exists (conflict or moved) was not exercised live.
  • The missing-key and refused holds were checked against the scratch engine only.
  • Issue linked rows and the tagged-thread filter (see above).
  • Known debt, not re-litigated: two-environment seat view, mobile, desktop and native-speaker strings. Apart from the mobile unit tests above, none were looked at live.
  • Machine conditions: swap stayed within about 0.4 to 1.5 GB of full the whole time. The T3 host briefly dropped its connection, and the page twice reported "froze for 8s". One server and one engine ran at a time, and both were stopped cleanly at the end.

Fix round, 2026-11-22 (head 0468243)

For QA finding 1: restoring the conversation of a deleted task orphaned it. Three commits on top of 8664955, no force push.

Cause. settleEnded did try to archive the restored thread again, but the archive command id was the same on every attempt (<marker>:archive:<reason>), so the first archive's receipt answered the retry and nothing happened. The same receipt swallowed the second archive of a displaced thread. The door offered Restore on every row.

Part B, the server (0b69b15). The archive command id now ends with the thread's revision: the version of its event stream (MAX(stream_version) of the thread, one indexed lookup in the rows read). Every event raises it and it never repeats, so a pass repeated over the same state is still answered by the first archive, and a thread restored since is archived anew. I chose it over a restore counter because it needs no new field on the thread and no new event. settleEnded and the door now share one rule, boardThreadStanding (linked, free, displaced, moved), and a restored thread whose task is on another machine is archived again too: before, it would also have sat open in no list.

Part A, the door (59da50e, 0468243). delivery.archivedBoardThreads now says how each thread's task stands, in a new field task:

  • open: the engine lists the task and its link is free or names this thread. The row offers Open, Restore and Delete.
  • held: another conversation holds the task, or it moved. Open and Delete, with "The task is held elsewhere."
  • deleted: the task is not in the lanes and the engine answers 404 for it. Open and Delete, with "The task was deleted."
  • unknown: the engine did not answer. Open and Delete, with "The task could not be checked." Never called deleted.

This is one step past the brief ("only for a thread whose task the engine still lists"): a displaced or moved thread is listed, but its restore would be undone by the next pass, so it is not offered either. The read lives in apps/server/src/delivery/archivedBoardThreads.ts; the handler only maps the error. The whole engine check has one 1.5 second wait, because the project removal dialog reads the same list with a 2 second deadline: past the wait every task is unknown and the rows are still answered.

Tests.

  • BoardTaskThreads.test.ts (13 passed): a deleted task's thread restored twice is archived again each time, on this server and on a new one; a displaced thread restored twice is archived again; a moved task's thread restored is archived again; a task back in work with its link free, whose restored thread the next pass links and claims. The earlier expectation ("it is not archived a second time") is replaced. With the old command id, the three changed cases fail.
  • BoardTaskThreads.engine.test.ts against the real engine at a658892b (1 passed): the deleted and displaced restores, the restore that links, and the missing-key hold (no-key), which only the scratch engine covered before.
  • ThreadLaunchService.test.ts (78 passed), on the real store: the read's open, held, deleted and unknown answers, and the revision rising across archive and restore.
  • ArchivedBoardThreads.logic.test.ts (2 passed): which rows offer Restore and what the others say.
  • Also run, one batch at a time: boardThreadMarker.test.ts 4, ws.test.ts 34, ProjectSettingsPanel.logic.test.ts and web state/delivery.test.ts (53 with the door's test), client-runtime delivery.test.ts 4. Typecheck is clean in packages/contracts, apps/server, packages/client-runtime, apps/web, apps/mobile.

QA finding 2, UsageService.test.ts. Run once on master (360306b) and once on this head: the same single case fails on both ("returns other providers' usage while Muse home discovery is still pending", /private/var/... received where /var/... is expected), 69 others pass. It pre-exists and is not fixed here.

Not verified.

  • Nothing was clicked through in a running app: no dev server was started in this round. The door's rows are covered by the logic test only, not a rendered one.
  • The 1.5 second wait itself has no test.
  • The three new strings in the door are English only, like the rest of the board's files.
  • The full suite was not run.

T3 pieces reused. The door keeps its ui/popover, ui/button and useThreadActions. The read follows linkedBoardTasks (the same lanes read through the delivery service, an engine that does not answer is never an error).


Independent QA of the fix round, 2026-11-22 (head 0468243)

QA ran on a different model from the builder, in its own detached worktree at the head. No product code was changed and nothing was pushed or merged. The engine repository was only read (git archive a658892b delivery teams). Setup was the same as the first round: board-thread-engine.ts with T3_BOARD_THREAD_ENGINE_PHRASE, and one pnpm dev --home-dir <scratch> with T3_DELIVERY_BOARD_THREAD_KEY set to the same phrase and the host's T3_WORKSPACE_* variables unset. The project was added through Add project > Local folder. One server and one engine ran at a time, and both were stopped cleanly.

Verdict: pass with findings. 0 blocking findings. The first round's blocking orphan is fixed.

Findings, ranked

1. Should fix, not blocking: against the real engine, a moved task is never held, and a forced restore of its thread is not undone.
At a658892b, laneOf returns null for moved (delivery/lib/views.mjs:274), so a moved task is in no lane of /api/lanes?view=development&set=all. Both new checks read those lanes, so the moved standing never applies with a real engine:

  • The door asks /api/tasks/<id>, gets 200, and labels the row "The task could not be checked." while the engine is up and answering. The design says "The task is held elsewhere." Restore is still withheld, so this part is only a wrong label.
  • settleEnded sees no card, gets 200 from /api/tasks/<id>, and moves on. A restored thread whose task is still moved stays open. The fix note's claim ("a restored thread whose task is on another machine is archived again too") holds only for the scratch engine in BoardTaskThreads.test.ts:375-380, which lists moved cards. The real-engine test restores the moved thread only after the task is back in triage (BoardTaskThreads.engine.test.ts:402).

Reproduction, live: add a started task (QA2) and let a pass link it. Clear its link with the key (DELETE /api/tasks/<id>/board-thread) and control /move it to moved. Archive its thread with a direct thread.archive command. The door row says "The task could not be checked.". Dispatch thread.unarchive, then wait more than two passes: the thread stays open (archived_at empty, no new archive event). It is in no thread list and not in the door, and the task centre for QA2 says "No conversation is linked to this task yet." No UI path offers that restore, which is why this is not blocking. The same open, unlisted state was reached without any restore: clearing the link of a moved task leaves its thread open forever (QA2 before the forced archive).
Related, and fine: a moved task that keeps its link (QA4, which is what the engine's own move-away in bundle.mjs does) keeps an open thread, and the task centre opens it from the sidebar's "With the team" list. So it is reachable.
Suggested fix: when a row's task is missing from the lanes, read its state from the /api/tasks/<id> answer that is already fetched. Treat moved/moving as held in the door, and as moved in settleEnded.

2. Not a defect of this PR: UsageService.test.ts on macOS. The builder's master check matches the first round's finding 2. Not re-run.

Observation: with the engine frozen (SIGSTOP), the board itself showed "Some requests are slow: 2 requests waiting longer than 15s" (the lanes reads). The door was not affected (below).

1. The orphan, as first reproduced: pass

  • Started task QA1, linked by a pass, control /delete: archived within one pass and listed in the door as "QA1 deleted task · Archived 1m ago · The task was deleted.", with Open and Delete only (no Restore). Screenshot: /Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mws000q3-1fa489b8.png
  • Open showed the conversation with "This thread is archived and cannot receive messages."
  • The app offers no other restore for it: the thread's header has no unarchive item, Settings > Archive hides board threads, and the door withholds Restore. So the restore was forced with a direct thread.unarchive command over the client's socket.
  • Forced restore 1: re-archived on the next pass with command id board-task:work:task-a15dcf3ffd:archive:deleted:3. Forced restore 2: re-archived with ...:archive:deleted:6. After that, more than two idle passes wrote no further archive event (idempotent). The row was back in the door each time. Delete still showed in every row. Delete was exercised in round 1 and not clicked again here.

2. The meaningful restore: pass

A free link was reached by displacement, not by "moved" (see finding 1 for why "moved" cannot produce it on this engine). QA3 was linked, then a rival link was PUT with the key: archived as displaced. Then the rival link was cleared.

  • After a pass with the link free, the thread stayed archived (no silent relink). The door row offered Open, Restore, Delete with no note. Screenshot: /Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mws0b27n-5108ea3f.png
  • Restore clicked in the door. On the next pass the task was linked to the same thread (board-task:work:task-1944b6d78a, this environment). The engine's events show exactly one task.board-thread-set after the restore (the full history is: set (ours), set (rival), cleared, set (ours)). The thread stayed open over a further pass, and T3 has one thread for the task.
  • The task centre (/board?...&task=task-1944b6d78a) opens the conversation, with no archived notice. Screenshot: /Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mws0cv1g-e0d9afb4.png

3. Displaced: pass

QA5 and QA3, after a rival link PUT with the key, were archived within one pass. Both read "The task is held elsewhere." with no Restore. Screenshot: /Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mws09ax8-51c3a7e5.png. A forced restore of QA5 was re-archived on the next pass (...:archive:displaced:2), and the rival link was untouched.

4. Unknown: pass

  • Engine frozen with SIGSTOP (requests hang): the door listed both archived rows, each "The task could not be checked.", with no Restore. A direct delivery.archivedBoardThreads call answered in 1519 ms, every row unknown. Screenshot: /Users/tevinmuparadzi/.polymania/t3-pm/userdata/browser-artifacts/browser-screenshot-localhost-mws0khqg-33c85d03.png
  • Engine stopped (connection refused): answered in 18 ms, every row unknown.

5. Regression: pass

  • The live, relinked QA3 thread is not in the sidebar, and the palette finds nothing for "QA3" ("No matching commands, projects, or threads.").
  • The archived board thread refuses sends with the notice (QA1, above).
  • No second thread: five tasks, five board threads. QA3's restore and relink reused its one thread.

6. Real-engine test: pass

  • Without T3_BOARD_THREAD_ENGINE_ROOT: 1 skipped, clean.
  • With the engine at a658892b: 1 passed. It now includes the deleted and displaced restores, the restore that relinks (:394, :402), and the no-key hold (:363).

Tests run (serialized, after the client pass)

  • server: BoardTaskThreads.test.ts, ThreadLaunchService.test.ts, boardThreadMarker.test.ts, ws.test.ts: 4 files, 129 passed.
  • web: ArchivedBoardThreads.logic.test.ts, state/delivery.test.ts: 2 files, 43 passed.

Not verified

  • The full import-traced suite was not re-run this round (swap was within about 1 to 2 GB of full). Only the changed test files above and the real-engine test were run. Typecheck and lint were not run.
  • A thread archived as moved by the pass itself (the link write racing a move) was not produced live. Its door label and forced restore were inferred from the code path and from the hand-archived QA2 thread.
  • Engine at origin/main was not re-tested this round.
  • Known debt, not re-checked: the two-environment seat view, mobile, desktop, issue linked rows, the tagged-thread filter, and strings other than English.

Tevin2119 and others added 13 commits November 22, 2026 04:27
…ts task

Board and task ids are percent-encoded in the marker, so board a:b with task c
and board a with task b:c no longer share a marker, a create command and a
thread. Plain ids keep the spelling #186 wrote. boardTaskOfMarker resolves a
thread's marker to its task, one way only; boardTaskThreadId names the one
thread a task is created as.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ne's link

The server reads the engine's lanes on a beat. A task the engine shows in work
with no boardThread gets one thread, created under the task's own command id
and thread id with the marker stamped at creation, led by the seat the engine's
team configuration names as its lead. The link is registered by the PUT route
with setBy the environment and expect null; a conflict leaves the other
writer's link standing and archives the thread made here. The task is claimed
with the thread's origin and each pass is the heartbeat.

No client starts any of this, and act refuses the link and claim routes.
Tested against a scratch engine that models the frozen 6a contract.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
lib/taskConversation reads boardThread, on the task and on its card, and stays
the only reader of it. The task.source stand-in is gone with no second source:
a task with no link is a draft, queued or unlinked, and the thread a task was
filed from is never shown as its conversation. A link wins wherever the task
stands, so a task sent back to the queue keeps what was said.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A task that ended leaves its thread archived, and no thread list shows a board
task's thread. The board toolbar now opens a list of them, each to open,
restore or delete. The server finds them by their marker and names the board
and task of each; the client never reads a marker.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… it owes

The card carries the engine's message count, how many are new and the last
line. The Waiting on you lane adds up its open questions and sign-offs in its
header. A board task's conversation raises nothing in the sidebar or as a
notification, so the card and this lane are where a person sees they are
asked. Every number is a field the engine already sends on the card.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…e and read back

The marker no longer escapes its ids. A task id is what the engine's routes take
([\w-]+) and a board id carries no colon, whitespace or control character; an id
outside that is refused at write (boardTaskOf), so the task gets no thread and no
link, and board-task:a:b reads one way. The pin covers only the two ids T3 writes
into the marker: a thread id the engine supplies in boardThread is taken as it is.

Every boardThread write waits in one server-side queue. On a 409 conflict the
current link is read from the engine and stands; the thread made here is archived.
moved and not-found are final: the thread is archived and an archived thread is
never linked, on a later pass or after a restart, until a person restores it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…task

A board task's conversation is in no thread list, so the linked threads of a pull
request or an issue left it out. It now returns as "Board task: <title>" and opens
the task view, conversation and engine facts together, never the raw thread: the
row carries no thread id. The rows are selected on the board-task: marker prefix,
apart from the ordinary list, whose exclusion of server-owned threads is untouched.

The title is the engine's when it lists the task. A task it does not list (deleted,
moved, or the engine away) keeps the title its thread was made with, and one whose
conversation is archived is told as ended and opens the board, where the archive
is. Mobile has no board: its issue screen shows the row and says where to open it.

The three new strings are in every web and mobile catalog, machine-translated.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Brings in the merged hardening round (#187).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ository

BoardTaskThreads.engine.test.ts was named by two comments and lived only in a scratch
folder. It is now a test that skips unless T3_BOARD_THREAD_ENGINE_ROOT names an engine
checkout, and scripts/board-thread-engine.ts is the engine it starts: the real engine
on a temp home, one bound repository and one board, stopped when the test ends. The
lead's model is read from the engine's own team file, not written into the test.

Also, after the merge of master: the archived-send test made its markers from an
unbranded task, which this branch's marker no longer takes. It uses boardTaskOf.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The shell counts only a project's active board conversations, so a project whose
board conversations were all archived got no line about them and was told only that
any archived threads are deleted. Those are kept. The confirmation now asks each
environment for its archived board conversations (the read the board's archive list
uses, once, with a two second deadline) and says how many are kept when none is
active. With an active one the existing line already says so.

An environment that does not answer, or has no such read, counts as none and the
confirmation is what it was. The new string is in every web and mobile catalog,
machine-translated.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…gain

A board task's thread restored from the board's archive stayed open for good
when its task was deleted or held by another conversation: the archive command
id was the same on every attempt, so the first archive's receipt answered the
retry and nothing happened. The thread was then in no list and not in the
archive.

The archive command id now ends with the thread's revision (the version of its
event stream), which every event raises. A pass repeated over the same state is
still answered by the first archive; a thread restored since is archived anew.
A restored thread whose task moved to another machine is archived again too.

Tests: the deleted task's thread restored, the displaced thread restored, the
moved task's thread restored, and a task back in work with its link free, whose
restored thread the next pass links. The real-engine test covers the same and
the hold without the approval key.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…take the thread

The archive offered Restore for every thread, including one whose task was
deleted, where a restore leaves it holding nothing.

The archived board threads read now says how each thread's task stands in the
engine: open (its link is free or names this thread), held (another
conversation holds it, or it moved), deleted (not in the lanes and the engine
answers 404 for it), or unknown (the engine did not answer in time). Only an
open task's row offers Restore; the others offer Open and Delete and say why.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…val read's deadline

Removing a project reads the archived board threads with a two second deadline.
The engine check now has a single 1.5 second wait for the lanes and every
task read together: past it each task is unknown and the rows are still
answered, so a slow engine never costs the removal confirmation its count.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants