Skip to content

fix(orchestration): scope Mission Control Shipped to the director's lifetime - #28

Merged
zaridan merged 1 commit into
mainfrom
zaridan/fix-orch-shipped-log-scope
Jun 24, 2026
Merged

fix(orchestration): scope Mission Control Shipped to the director's lifetime#28
zaridan merged 1 commit into
mainfrom
zaridan/fix-orch-shipped-log-scope

Conversation

@zaridan

@zaridan zaridan commented Jun 24, 2026

Copy link
Copy Markdown
Owner

The bug

A brand-new Orcastrator's Shipped section in Mission Control showed shipped PRs from past sessions. Verified against a real repo: a fresh director in resonantiq-gtm listed PRs #16/#15/#17/#18 from a 2026-06-20 session.

Root cause

.orcastrate/log.jsonl is committed to the repo (intentional — it's the orcastrate skill's cross-session decision log). So every new director worktree, branched from main, inherits the full accumulated log from all prior sessions. Mission Control derived Shipped by reading directorPath/.orcastrate/log.jsonlparseOrchestrateLogOutcomesselectShippedWork, which filtered only by tag === 'shipped' with no scoping to the current director. Every historical shipped outcome rendered as if this director shipped it.

The fix — scope to the director's own lifetime

The log's outcome records carry a ts (ISO timestamp); the director worktree carries a createdAt (epoch ms).

  • Thread an optional sinceMs into parseOrchestrateLogOutcomes(content, sinceMs?). When set, skip outcome records whose ts parses before sinceMs.
  • Edge handling: an outcome with a missing or unparseable ts can't be attributed to this director, so it's excluded when scoping (err toward not showing foreign work).
  • OrchestratorMissionControl passes the director worktree's createdAt.
  • sinceMs stays optional: legacy callers and worktrees discovered on disk (no createdAt) keep prior behavior. Plan records remain unscoped — they only supply descriptions.

Result: a brand-new director → no outcomes after its creation → empty Shipped; inherited entries are filtered out; a director's own shipped outcomes (logged during its lifetime) still appear.

Out of scope (unchanged)

  • The orcastrate skill, the log format, and the fact that the log is committed.
  • The Spawned work section (live workers by lineage) — already director-scoped via worktree lineage; confirmed not regressed.

Tests

Added lifetime-scoping tests in orcastrate-log-shipped-work.test.ts that fail against the pre-fix code (which returns all outcomes):

  • old + new outcomes → scoped parse returns only the new one's shipped items;
  • brand-new director (sinceMs = now) over an old-only log → empty;
  • missing/unparseable ts → excluded when scoping;
  • sinceMs omitted → legacy behavior preserved.

Full vitest (20495 passed), typecheck, electron-vite build, and oxlint all green.

🤖 Generated with Claude Code

…ifetime

A brand-new Orcastrator's "Shipped" section showed shipped PRs from past
sessions. Root cause: `.orcastrate/log.jsonl` is committed to the repo
(intentional — it's the skill's cross-session decision log), so every new
director worktree branched from `main` inherits the full accumulated log.
Mission Control derived Shipped from that whole log with no scoping, so it
surfaced every historical shipped outcome as if this director shipped it.

Fix: thread an optional `sinceMs` into `parseOrchestrateLogOutcomes` —
when set, skip `outcome` records whose `ts` parses before `sinceMs`, and
exclude outcomes with a missing/unparseable `ts` (can't attribute them to
this director → err toward not showing foreign work). Plan records stay
unscoped (they only supply descriptions). `OrchestratorMissionControl`
passes the director worktree's `createdAt`. Optional, so legacy callers
and worktrees discovered on disk (no `createdAt`) keep prior behavior.

Result: a brand-new director → empty Shipped; inherited entries filtered
out; a director's own shipped outcomes still appear.

Out of scope (unchanged): the orcastrate skill, the log format, the
committing behavior, and the lineage-based Spawned-work section.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@zaridan
zaridan merged commit 60ae39b into main Jun 24, 2026
1 check passed
@zaridan
zaridan deleted the zaridan/fix-orch-shipped-log-scope branch June 24, 2026 16:44
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.

1 participant