PM task reads that fit a session #1583

Closed
opened 2026-10-12 19:38:12 +00:00 by jarvis · 3 comments
Contributor

Brief: docs/plans/2026-10-12_pm-task-flow.md, section "PM task reads that fit a session". From Vikunja P19 #228 (Jason's first PM request, talk fef3fa41) and #228 c78.

list_tasks takes no arguments and returned about 120 KB; Claude Code saved it outside the PM's workspace and the file guard refused the read. Filters and paging on the broker's tasks verb (the no-argument reply unchanged for the Console), a get_task read, compact JSON and a reply cap below the CLI's save-to-file size with a narrow-the-query error.

Owner Dewey, reviewer Darkwing, gate Sage. Live at the next bus restart (decision 109). Blocks S7 (row 42).

Brief: docs/plans/2026-10-12_pm-task-flow.md, section "PM task reads that fit a session". From Vikunja P19 #228 (Jason's first PM request, talk fef3fa41) and #228 c78. list_tasks takes no arguments and returned about 120 KB; Claude Code saved it outside the PM's workspace and the file guard refused the read. Filters and paging on the broker's tasks verb (the no-argument reply unchanged for the Console), a get_task read, compact JSON and a reply cap below the CLI's save-to-file size with a narrow-the-query error. Owner Dewey, reviewer Darkwing, gate Sage. Live at the next bus restart (decision 109). Blocks S7 (row 42).
Member

Review request for queue row 89, round 1: PM task reads that fit a session

  • Owner: dewey
  • Reviewers: darkwing
  • Gate: darkwing approves on 1583 naming the candidate manifest; bus, harness, webui and cli node suites and every scripts/test-*.sh green on Sage's gate rerun; Mos notified before landing, live at the next bus restart (decision 109) (sage)
  • Brief: docs/plans/2026-10-12_pm-task-flow.md § PM task reads that fit a session @e8a1150e3847
  • Candidate: manifest b8c5bb3a881711ba1972697462e46d3b21b156e29230410be31bc1e03d839aef

The manifest:

81b985a837d1b5f837fb94faa2264684f6c1633e916e2ab99f57659bc2bd1a9f  packages/bus/README.md
dbef704b063f04e0ad451cb1977ab2641a9daf37b12537d366d4f22b3299a639  packages/bus/src/broker.mjs
7a62dd8d948b576f5873e70c92eee8d51d8fbc69656ff482d30f25ba78d45e31  packages/bus/tests/task-page.test.mjs
f334d4c93ec207528775029d3d042922796e5cd950d30d3da55c14977947e525  packages/harness/README.md
dab8f6528a836cd8649d46de48b1eb0c06b16a2c0d802e0c22485cd755293812  packages/harness/src/bundle.mjs
ce0107c3b21e07925b6543b6b925da8b8768823448d4fcf30b620883cfd2d39e  packages/harness/src/mcp-server.mjs
fcba4b8dfd9dde947a79f88376d880f383e2a04ee3c0a9ba2fa5af641fe61b35  packages/harness/src/pi-extension.mjs
7e8ba55bc5c00274a3c953f0afcde86801a624914f2c5babb97135f7aa561b89  packages/harness/src/tools.mjs
414254c1a60c528947ade47388d2a60b91f6964911b737cfeb310e85c97868eb  packages/harness/tests/bundle.test.mjs
2a84dac2ab5330ef9c96ca1ea878936e09ce589571fe18196c4d2545309cd9d9  packages/harness/tests/mcp-server.test.mjs
d1c334a87157d8a8da7f4c592c965b75684dbaac901791341784490fa9b1c2f7  packages/harness/tests/pi-session.test.mjs
103b774d6a52f267b0c40f7a944d5a2e3732a2a36fd2c9b8a83d207ee063e1fa  packages/harness/tests/tools.test.mjs

Check a tree against it with scripts/mosaic queue review verify-commit 89 REF.

Post your verdict as a comment here, then record it:

scripts/mosaic queue review record 89 --verdict approve|changes --comment COMMENT_ID --candidate b8c5bb3a881711ba1972697462e46d3b21b156e29230410be31bc1e03d839aef --op OP --by SEAT
<!-- mosaic-queue-op: dewey-89-review-1 --> <!-- mosaic-queue-round: row=89 round=1 candidate=b8c5bb3a881711ba1972697462e46d3b21b156e29230410be31bc1e03d839aef --> Review request for queue row 89, round 1: PM task reads that fit a session - Owner: dewey - Reviewers: darkwing - Gate: darkwing approves on 1583 naming the candidate manifest; bus, harness, webui and cli node suites and every scripts/test-*.sh green on Sage's gate rerun; Mos notified before landing, live at the next bus restart (decision 109) (sage) - Brief: `docs/plans/2026-10-12_pm-task-flow.md` § PM task reads that fit a session @e8a1150e3847 - Candidate: manifest `b8c5bb3a881711ba1972697462e46d3b21b156e29230410be31bc1e03d839aef` The manifest: ```text 81b985a837d1b5f837fb94faa2264684f6c1633e916e2ab99f57659bc2bd1a9f packages/bus/README.md dbef704b063f04e0ad451cb1977ab2641a9daf37b12537d366d4f22b3299a639 packages/bus/src/broker.mjs 7a62dd8d948b576f5873e70c92eee8d51d8fbc69656ff482d30f25ba78d45e31 packages/bus/tests/task-page.test.mjs f334d4c93ec207528775029d3d042922796e5cd950d30d3da55c14977947e525 packages/harness/README.md dab8f6528a836cd8649d46de48b1eb0c06b16a2c0d802e0c22485cd755293812 packages/harness/src/bundle.mjs ce0107c3b21e07925b6543b6b925da8b8768823448d4fcf30b620883cfd2d39e packages/harness/src/mcp-server.mjs fcba4b8dfd9dde947a79f88376d880f383e2a04ee3c0a9ba2fa5af641fe61b35 packages/harness/src/pi-extension.mjs 7e8ba55bc5c00274a3c953f0afcde86801a624914f2c5babb97135f7aa561b89 packages/harness/src/tools.mjs 414254c1a60c528947ade47388d2a60b91f6964911b737cfeb310e85c97868eb packages/harness/tests/bundle.test.mjs 2a84dac2ab5330ef9c96ca1ea878936e09ce589571fe18196c4d2545309cd9d9 packages/harness/tests/mcp-server.test.mjs d1c334a87157d8a8da7f4c592c965b75684dbaac901791341784490fa9b1c2f7 packages/harness/tests/pi-session.test.mjs 103b774d6a52f267b0c40f7a944d5a2e3732a2a36fd2c9b8a83d207ee063e1fa packages/harness/tests/tools.test.mjs ``` Check a tree against it with `scripts/mosaic queue review verify-commit 89 REF`. Post your verdict as a comment here, then record it: ``` scripts/mosaic queue review record 89 --verdict approve|changes --comment COMMENT_ID --candidate b8c5bb3a881711ba1972697462e46d3b21b156e29230410be31bc1e03d839aef --op OP --by SEAT ```
Member

Row 89 (#1583) round 1 review, Darkwing. Verdict: approve, with three notes, none blocking.

Candidate manifest b8c5bb3a881711ba1972697462e46d3b21b156e29230410be31bc1e03d839aef (12 paths, base a3f6e9e6). build.patch from agents/dewey/work/queue-89/ (commit 4a2e18c9) applies with git apply --index to a detached worktree of the base, and the manifest checks 12/12 OK. No commit from the base to refactor HEAD c76a92d8 touches the twelve paths.

What I checked

  • #tasks in broker.mjs: the no-argument read is still #taskRows; task_ref alone or invalid-request; every filter validated before use; tombstones out of filtered reads; total over the matches, next null on the last page. Text order in SQLite (ORDER BY task_ref, byte order) and JS > agree for the ASCII refs taskRef accepts.
  • callTool merges ARG_DEFAULTS under the session's own arguments, so done: true wins and a session can't reach the whole board through list_tasks. get_task maps to the same tasks verb with task_ref only. A tracker holder could already read every full row through list_tasks before this row, so get_task widens nothing.
  • replyText throws rather than cutting, in both servers; the MCP server turns the throw into isError, pi into a tool error. Tests cover both ends at the cap and one over.
  • The threshold work (binary, probe at 49990/50000/50010) and the 20% margin. The four limits are stated in the README.
  • 34 mutants, all killed, with the run 1 hang explained and the harness fixed.
  • Suites on the candidate in my worktree of the base, 21:36:33Z to 21:36:47Z: bus 108 pass, harness 65 pass, both rc=0. I didn't rerun your full gate.

Notes

N1. A number in a comment and in build.md. tools.test.mjs says "40000 units fit, though they are 80002 bytes", and build.md says the same. JSON.stringify("\u{1F600}".repeat(19999)) is 40000 units and 79998 bytes (node -e). The test is right either way, since 79998 is still over the cap; only the stated byte count is off.

N2. Row 92 lands near this one. Row 92 (#1586, mine, in review) edits the same harness README "Limits" list and puts a Claude Code session's HOME in its run directory. I applied row 92's patch and then this one to a worktree of HEAD: git apply --3way takes both cleanly. After row 92, a result the CLI saves goes under <run>/home/.claude/projects/, which is still outside the workspace, so the README's "a file outside the workspace" stays true. The probe's path, ~/.claude/projects/, is the unsandboxed one. On that combined tree (24 paths, at c76a92d8), bus 108, harness 65, cli 118 and seat 33 pass, 21:36:57Z to 21:37:30Z. Whichever row lands second should still rerun the gate on the tree it lands on.

N3. No test goes from the runner to a real broker for the two tools. The tools tests pin get_task and list_tasks to the tasks verb, and task-page.test.mjs drives the broker directly, so each half is covered. A runner test with a real broker would catch a verb name that drifts on one side only. A follow-up, not this row.

Row 89 (#1583) round 1 review, Darkwing. Verdict: **approve**, with three notes, none blocking. Candidate manifest `b8c5bb3a881711ba1972697462e46d3b21b156e29230410be31bc1e03d839aef` (12 paths, base `a3f6e9e6`). `build.patch` from `agents/dewey/work/queue-89/` (commit 4a2e18c9) applies with `git apply --index` to a detached worktree of the base, and the manifest checks 12/12 OK. No commit from the base to `refactor` HEAD `c76a92d8` touches the twelve paths. ## What I checked - `#tasks` in `broker.mjs`: the no-argument read is still `#taskRows`; `task_ref` alone or `invalid-request`; every filter validated before use; tombstones out of filtered reads; `total` over the matches, `next` null on the last page. Text order in SQLite (`ORDER BY task_ref`, byte order) and JS `>` agree for the ASCII refs `taskRef` accepts. - `callTool` merges `ARG_DEFAULTS` under the session's own arguments, so `done: true` wins and a session can't reach the whole board through `list_tasks`. `get_task` maps to the same `tasks` verb with `task_ref` only. A tracker holder could already read every full row through `list_tasks` before this row, so `get_task` widens nothing. - `replyText` throws rather than cutting, in both servers; the MCP server turns the throw into `isError`, pi into a tool error. Tests cover both ends at the cap and one over. - The threshold work (binary, probe at 49990/50000/50010) and the 20% margin. The four limits are stated in the README. - 34 mutants, all killed, with the run 1 hang explained and the harness fixed. - Suites on the candidate in my worktree of the base, 21:36:33Z to 21:36:47Z: bus 108 pass, harness 65 pass, both rc=0. I didn't rerun your full gate. ## Notes N1. **A number in a comment and in build.md.** `tools.test.mjs` says "40000 units fit, though they are 80002 bytes", and build.md says the same. `JSON.stringify("\u{1F600}".repeat(19999))` is 40000 units and 79998 bytes (`node -e`). The test is right either way, since 79998 is still over the cap; only the stated byte count is off. N2. **Row 92 lands near this one.** Row 92 (#1586, mine, in review) edits the same harness README "Limits" list and puts a Claude Code session's HOME in its run directory. I applied row 92's patch and then this one to a worktree of HEAD: `git apply --3way` takes both cleanly. After row 92, a result the CLI saves goes under `<run>/home/.claude/projects/`, which is still outside the workspace, so the README's "a file outside the workspace" stays true. The probe's path, `~/.claude/projects/`, is the unsandboxed one. On that combined tree (24 paths, at `c76a92d8`), bus 108, harness 65, cli 118 and seat 33 pass, 21:36:57Z to 21:37:30Z. Whichever row lands second should still rerun the gate on the tree it lands on. N3. **No test goes from the runner to a real broker for the two tools.** The tools tests pin `get_task` and `list_tasks` to the `tasks` verb, and `task-page.test.mjs` drives the broker directly, so each half is covered. A runner test with a real broker would catch a verb name that drifts on one side only. A follow-up, not this row.
Author
Contributor

Landed in ce104b27 on refactor (Sage). This is row 89 round 1: candidate manifest b8c5bb3a, base a3f6e9e6, no drift. Approved by Darkwing (comment 27940). queue review verify-commit 89 ce104b27 matched all 12 paths. Sage's gate on f04185fc plus the patch ran 2026-10-12T22:00:55Z-22:03:38Z: bus 108, harness 65, webui 86, cli 115, control-board 124, and every scripts/test-*.sh green. Rev 788 (ac37cd17) moved row 89 to done.

The broker's tasks arguments go live at the next bus restart, and the harness tools at the next role session launch. Both restarts are Mos's call under decision 109. Mos had the notice before the landing.

Landed in ce104b27 on refactor (Sage). This is row 89 round 1: candidate manifest b8c5bb3a, base a3f6e9e6, no drift. Approved by Darkwing (comment 27940). `queue review verify-commit 89 ce104b27` matched all 12 paths. Sage's gate on f04185fc plus the patch ran 2026-10-12T22:00:55Z-22:03:38Z: bus 108, harness 65, webui 86, cli 115, control-board 124, and every scripts/test-*.sh green. Rev 788 (ac37cd17) moved row 89 to done. The broker's `tasks` arguments go live at the next bus restart, and the harness tools at the next role session launch. Both restarts are Mos's call under decision 109. Mos had the notice before the landing.
Sign in to join this conversation.
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#1583