Repository navigation
spec(FIX-1664): amend task-to-run association and metrics source #2434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,8 +9,9 @@ Two decisions and one open fork are the sign-off surface. The epic's D1 to D3 an | |
|
|
||
| ```mermaid | ||
| flowchart TD | ||
| I["FIX-1664"] --> D1["D1 · Session is the task's own run session"] | ||
| I["FIX-1664"] --> D1["D1 · Session is the run the task's row names"] | ||
| D1 -.->|"rejected · a chat, not the task"| X1["the worker's own conversation"] | ||
| D1 -.->|"rejected · display-only, ambiguous"| X1c["match the listing's topic to a rebuilt key"] | ||
| D1 -.->|"rejected · a new read in the engine"| X1b["a task transcript API"] | ||
| I --> D2["D2 · only Interrupt works"] | ||
| D2 -.->|"rejected · the board refuses it"| X2["reassign through the board's action"] | ||
|
|
@@ -54,20 +55,24 @@ out when you needed it means the issue's first sentence, steer without a termina | |
| It comes down to steering: without the operation, the task screen watches and stops, nothing more. | ||
|
|
||
| <a name="d1"></a> | ||
| ## D1 · The Session tab is the task's own run session, found by its dispatch key, shown live | ||
| ## D1 · The Session tab is the run the task's own row names, shown live | ||
|
|
||
| | | | | ||
| |---|---| | ||
| | **Instead of** | The assigned worker's own conversation session · a new "task transcript" read in the engine | | ||
| | **Because** | A handed-off row runs in a child session the dispatch seam keys on the board and the task, and the session listing already returns dispatch runs with that key. Reading it is reading what ships (ER-5), and the live stream FIX-1609 shipped (`useSession` with `live`) follows it with no reload. The worker's own conversation is where it talks, not where this task ran. A transcript read would be a second API over the item log, which the Architect named an invent-kill | | ||
| | **Locks in** | A task's screen is exactly one run's session. Every attempt of the task is in it, in order, because a per-task key re-enters the same child. A board whose seat uses a per-worker or custom session key shares one session across tasks; its Session tab says so rather than filtering by guess | | ||
| | **Instead of** | The assigned worker's own conversation session · rebuilding the dispatch key and matching it against the session listing's `topic` · a new "task transcript" read in the engine | | ||
| | **Because** | Only the run itself knows, for certain, which session it is in. A handed-off attempt enters its run session through the board's claim gate, whatever the seat's session policy and whichever conversation drained the board, so the gate is the one place that can write down *this task's attempt N is running in session S, request R*. Rebuilding the key from outside can't do that: the listing's `topic` is display-only, the run's session id also folds in the parent session and its lineage (so a re-drain from another conversation makes a second run with the same topic), and a per-worker or custom policy never produces a per-task key at all. So the association is **a small new field on the task row, stamped by the gate** in `@flow-state-dev/orchestration` (Layer 2, the substrate that already owns the row and the gate), filed as its own child of FIX-1649 under the epic's split trigger: [the task-run link](PLAN.md#the-task-run-link). The row already reaches App Lab through FIX-1662's board read, so the link arrives with it; the live stream FIX-1609 shipped (`useSession` with `live`) follows the session with no reload. The worker's own conversation is where it talks, not where this task ran. A transcript read would be a second API over the item log, which the Architect named an invent-kill | | ||
| | **Locks in** | A task's screen is the run its row names, and Interrupt aborts the request the row names. A session shared across tasks (a per-worker or custom policy) shows only the items stamped with this task's id, which every item a task's worker emits carries from the moment the gate marks the scope; the screen says the session is shared. **FIX-1664's build waits on the task-run link**; nothing in Core or Engine changes | | ||
|
|
||
|  | ||
|  | ||
|
|
||
| It comes down to truth about the task: the worker's chat can't say what this run did. | ||
| It comes down to truth about the task: only the run can say where it ran, so the run writes it down. | ||
|
|
||
| **What would change my mind:** FIX-1651 defining a task as something other than a board row a | ||
| seat runs. Then the key moves, and the tab stays. | ||
| seat runs. Then the link moves to whatever it runs, and the tab stays. | ||
|
|
||
| **If wrong:** one small orchestration field nobody else reads, and FIX-1664 a child issue later | ||
| than it would otherwise be. Getting the lookup wrong instead shows another task's work, or | ||
| aborts another task's run, as this one's. | ||
|
|
||
| <a name="d2"></a> | ||
| ## D2 · Of the four controls only Interrupt works; Hand off, reassign and Open PR are disabled and name FIX-1651 | ||
|
|
@@ -92,8 +97,12 @@ the button calls it, with no change to the screen. | |
| - **Brief is the row's own fields**; acceptance criteria are a named gap (FIX-1651). | ||
|
jhoffner marked this conversation as resolved.
Resolved
|
||
| - **The plan and files are what the harness recorded** on the run session (Claude Code records | ||
| both), else a line saying this harness records none. Files show created or edited, no line counts. | ||
| - **Started is the row's; tokens, cost and harness come from the run's reported handle**, a dash | ||
| until then, as FIX-1662's BR-7 draws harness. **Branch** has no client read and is omitted. | ||
| - **Started is the row's. Harness, tokens and cost are a named gap owned by FIX-1652.** The | ||
| run reports them in its return value, which the client never sees; a detached run keeps no | ||
| session-state log of it; and the harness manager's run record, which does hold them, is | ||
| deliberately not client-readable. No shipped read carries them, so the inspector says so | ||
| rather than drawing a dash that looks like *not reported yet* ([the gap registry](BUSINESS-RULES.md#gap-registry)). | ||
| **Branch** has no client read and is omitted. | ||
| - **Linked** is the row's dependencies and its dependents; *review by* names FIX-1651. | ||
| - **The trace link opens the devtool App Lab was started with** (`--devtool <url>`), with the | ||
| run's session id beside it: the devtool can't open a session from its address yet. | ||
|
|
@@ -106,8 +115,11 @@ the button calls it, with no change to the screen. | |
|
|
||
| | Alternative | Why not | | ||
| |---|---| | ||
| | Find the run through the harness manager's run record | Not client-readable by design; its read surface is a lab's own `status` action | | ||
| | Find the run through the harness manager's run record | Not client-readable by design; its read surface is a lab's own `status` action. It also covers only boards the harness manager runs, and keys by the lab's own topic, not board and task | | ||
| | Find the run through its parent session's children | The parent is the session that drained the board, which the client can't learn: the row's claim coordinate is server-only | | ||
| | Rebuild the dispatch key and match the session listing's `topic` (the approved draft) | `topic` is display-only; the run's id also folds in the parent session and lineage, so two runs can share a topic; a per-worker or custom policy never yields the per-task key. It can show or abort the wrong run, or find none | | ||
| | Expose the row's claim coordinate (`claimedBy`) | Server-only by design, and it names the session that **claimed** the row, which on a handed-off board is the drain's, not the run's: the child never claims | | ||
| | Publish the harness's tokens and cost through a new projection now | A second read of the same numbers, for three inspector fields, with no second consumer. FIX-1652 owns inspecting a run and can shape it once | | ||
| | Cancel the row as well as abort the run on Interrupt | A shell-written board change; what an interrupted row becomes is FIX-1651's | | ||
| | Fold the task level back into FIX-1662 (epic D1's mind-changer) | It reads a run session, a harness's records and a request, none of which the workstream level reads | | ||
|
|
||
|
|
@@ -116,5 +128,10 @@ the button calls it, with no change to the screen. | |
| - **Draft**: framed as watching and steering one run; the Session reads the task's own run | ||
| session; only Interrupt ships; the turn into a coding run found unshipped and put as the open | ||
| fork. | ||
| - **Amendment after merge** (review on PR #2428, Codex): the run lookup by rebuilt key and | ||
| `topic` was ambiguous and couldn't serve a shared session, so D1 now reads a link the gate | ||
| stamps on the row, split out as the task-run link; and harness, tokens and cost had no | ||
| client-readable source, so they became a named gap. The goal, D2 and the open fork are | ||
| unchanged. | ||
|
Comment on lines
+131
to
+135
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This explicitly replaces an approved D1 after the original spec merged, but the directory still has no Useful? React with 👍 / 👎. |
||
|
|
||
| **Open: one** — [above](#open). | ||
Uh oh!
There was an error while loading. Please reload this page.