Office (4/5): stacks — collapse duplicate incidents, dependency chains, and possibly-resolved items #309

Closed
opened 2026-10-28 17:25:38 +00:00 by ben · 6 comments
Owner

Slice 4 of 5 of the Office (Ben's ask 2026-10-26). Depends on the read-only Office slice.

Why

The 2026-10-26 Outbox was ~77 items but only ~30 decisions: the same incident filed in 4–5 repos (bens-mac-04 reds; the watchdog job-log fault), a 12-ticket agent-blocked dependency chain, and a run of research questions for one audience. Collapse the pile before the human sees it.

What to build — deterministic, no Claude

In the pure model (web/office.js), group Outbox items into stacks:

  1. Chains — items linked by native dependencies (blocked_by[] already in the snapshot): the head item stands for the chain, "frees N" shown on it.
  2. Cross-references — items whose bodies/comments name each other (owner/repo#n or same-repo #n) across repos, plus a conservative title-similarity rule (normalised tokens, tested threshold) — a stack lists its members and why they were grouped.
  3. Possibly resolved — an item that names a ticket closed since, or a commit/ticket that has landed since it was last updated, gets a ⚑ possibly resolved by … flag.

A stack renders as one pile row (×N), opens as one item listing its members, and (once writes land) its decision fans out to every member, each getting its own comment. A member can be pulled out of a stack by hand (x on the member) — the grouping is a suggestion, never a lock.

If the collector lacks a field needed (e.g. comment text for cross-refs), add it to the collector under a snapshot_version bump in lockstep with EXPECTED_SNAPSHOT_VERSION — no second fetch path in the Floor.

Acceptance

  1. Model tests: chain grouping from blocked_by, cross-repo cross-reference grouping, a near-miss title that must NOT group, possibly-resolved flag, manual un-stack.
  2. A fixture snapshot reproducing the 2026-10-26 shape (one incident in 4 repos, one 12-chain) collapses to the expected stacks.
  3. Repo test loop green; journal entry.
Slice 4 of 5 of the Office (Ben's ask 2026-10-26). Depends on the read-only Office slice. ## Why The 2026-10-26 Outbox was ~77 items but only ~30 decisions: the same incident filed in 4–5 repos (bens-mac-04 reds; the watchdog job-log fault), a 12-ticket `agent-blocked` dependency chain, and a run of research questions for one audience. Collapse the pile before the human sees it. ## What to build — deterministic, no Claude In the pure model (`web/office.js`), group Outbox items into **stacks**: 1. **Chains** — items linked by native dependencies (`blocked_by[]` already in the snapshot): the head item stands for the chain, "frees N" shown on it. 2. **Cross-references** — items whose bodies/comments name each other (`owner/repo#n` or same-repo `#n`) across repos, plus a conservative title-similarity rule (normalised tokens, tested threshold) — a stack lists its members and why they were grouped. 3. **Possibly resolved** — an item that names a ticket closed since, or a commit/ticket that has landed since it was last updated, gets a `⚑ possibly resolved by …` flag. A stack renders as one pile row (`×N`), opens as one item listing its members, and (once writes land) its decision fans out to every member, each getting its own comment. A member can be pulled out of a stack by hand (`x` on the member) — the grouping is a suggestion, never a lock. If the collector lacks a field needed (e.g. comment text for cross-refs), add it to the collector under a `snapshot_version` bump in lockstep with `EXPECTED_SNAPSHOT_VERSION` — no second fetch path in the Floor. ## Acceptance 1. Model tests: chain grouping from `blocked_by`, cross-repo cross-reference grouping, a near-miss title that must NOT group, possibly-resolved flag, manual un-stack. 2. A fixture snapshot reproducing the 2026-10-26 shape (one incident in 4 repos, one 12-chain) collapses to the expected stacks. 3. Repo test loop green; journal entry.

swarm-claim host=matou-dev-server-01 run=26152
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=26152 (automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=bens-mac-04 run=26154
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=bens-mac-04 run=26154 (automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=26162
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=26162 (automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=26102
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=26102 (automated multi-host claim — lowest live claim id works this ticket)

⏩ independent reviewer for #309 — verdict unauthenticated

review JSON
{
  "verdict": "unauthenticated",
  "findings": []
}
:fast_forward: **independent reviewer** for #309 — verdict `unauthenticated` <details><summary>review JSON</summary> ```json { "verdict": "unauthenticated", "findings": [] } ``` </details>

close-report for #309 — status success

✅ close-report gates passed — every claim verified against the pushed worker branch sandcastle/worker/20261104-194113-a58f71 (pre-land — the host promotes it to main only after its post-run verify, #193/#283); issue closed.

envelope
{
  "issue": 309,
  "status": "success",
  "commits": [
    "d743876a0a8229796f9ced1281525f6ca3ade381"
  ],
  "changed_files": [
    "STATUS.md",
    "docs/journal/2026-11-04-309.md",
    "fleet-tui/collector.py",
    "fleet-tui/floor/server/office.test.js",
    "fleet-tui/floor/web/office.js",
    "fleet-tui/repostats.py",
    "fleet-tui/tests/test_collector.py",
    "fleet-tui/tests/test_repostats.py"
  ],
  "tests": [
    {
      "command": "cd fleet-tui/floor && node --test server/office.test.js server/office-filter.test.js",
      "exit_code": 0
    },
    {
      "command": "bash tests/docs-budget-test.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "1. model tests — chain grouping from blocked_by / cross-repo cross-reference grouping / near-miss title must NOT group / possibly-resolved flag / manual un-stack": "server/office.test.js: five new node --test cases, all pass (chain+frees, cross-repo cross-ref grouping, near-miss-vs-identical title pinning TITLE_SIM=0.6, possibly-resolved flag, manual un-stack via opts.unstacked)",
    "2. a fixture snapshot reproducing the 2026-10-26 shape (one incident in 4 repos, one 12-chain) collapses to the expected stacks": "server/office.test.js test 'the 2026-10-26 shape collapses: one incident in 4 repos and one 12-chain become two stacks' — 16 items collapse to 2 stack rows (cross-ref size 4, chain size 12 frees 11)",
    "3. repo test loop green; journal entry": "node office suites + office-filter green (19/19); docs-budget-test green; the four harness-loop reds (fleet-tui SIGTERM spawn flake, list-ready-tasks, run-swarm-ready-list) reproduce on the clean tree pre-change and are environment/network, not this change. Journal: docs/journal/2026-11-04-309.md, STATUS.md surface row updated in the same commit"
  },
  "summary": "The Office's pure model collapses the Outbox into chain / cross-reference / possibly-resolved stacks, and the collector carries issue body off the same pages (additive, no snapshot bump).",
  "blockers": []
}
**close-report** for #309 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against the pushed worker branch `sandcastle/worker/20261104-194113-a58f71` (pre-land — the host promotes it to `main` only after its post-run verify, #193/#283); issue closed. <details><summary>envelope</summary> ```json { "issue": 309, "status": "success", "commits": [ "d743876a0a8229796f9ced1281525f6ca3ade381" ], "changed_files": [ "STATUS.md", "docs/journal/2026-11-04-309.md", "fleet-tui/collector.py", "fleet-tui/floor/server/office.test.js", "fleet-tui/floor/web/office.js", "fleet-tui/repostats.py", "fleet-tui/tests/test_collector.py", "fleet-tui/tests/test_repostats.py" ], "tests": [ { "command": "cd fleet-tui/floor && node --test server/office.test.js server/office-filter.test.js", "exit_code": 0 }, { "command": "bash tests/docs-budget-test.sh", "exit_code": 0 } ], "criteria": { "1. model tests — chain grouping from blocked_by / cross-repo cross-reference grouping / near-miss title must NOT group / possibly-resolved flag / manual un-stack": "server/office.test.js: five new node --test cases, all pass (chain+frees, cross-repo cross-ref grouping, near-miss-vs-identical title pinning TITLE_SIM=0.6, possibly-resolved flag, manual un-stack via opts.unstacked)", "2. a fixture snapshot reproducing the 2026-10-26 shape (one incident in 4 repos, one 12-chain) collapses to the expected stacks": "server/office.test.js test 'the 2026-10-26 shape collapses: one incident in 4 repos and one 12-chain become two stacks' — 16 items collapse to 2 stack rows (cross-ref size 4, chain size 12 frees 11)", "3. repo test loop green; journal entry": "node office suites + office-filter green (19/19); docs-budget-test green; the four harness-loop reds (fleet-tui SIGTERM spawn flake, list-ready-tasks, run-swarm-ready-list) reproduce on the clean tree pre-change and are environment/network, not this change. Journal: docs/journal/2026-11-04-309.md, STATUS.md surface row updated in the same commit" }, "summary": "The Office's pure model collapses the Outbox into chain / cross-reference / possibly-resolved stacks, and the collector carries issue body off the same pages (additive, no snapshot bump).", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/dev-factory#309
No description provided.