Repository navigation
Description
Draft: D10.
Problem and evidence. Audit §0 reports 385 of 386 subagent.assumed-finished entries were bootstrap history 32-39 days old; these numerical measurements are audit-only. Current session-transitions.js:157 records bootstrap, and :242-:253 emits the same assumed-finished category for historical bootstrap and reversible post-bootstrap assumptions. Readers can miscount history as live false completion. The existing trace call and branch are reverified; no new trace was collected.
Expected behavior. Emit one historical-bootstrap summary per parent/bootstrap scan, including history count and newest historical file age (null if none), rather than one live-sounding assumed-finished record per historical file. Preserve separate events for recent reversible bootstrap candidates, genuine fallback assumptions, rehabilitation, actual spawn/heartbeat, and primary-backed completion; record source and confidence where D4 supplies them. A task retained as explicitly open cannot emit a completion merely because it is silent. Update trace documentation to distinguish history, fallback, and explicit lifecycle events. Keep tracing opt-in and bounded; tracing does not cause UI changes or extra scans.
Acceptance criteria a reviewer can run. Extend test/subagent-settle-tick.test.js or a focused trace test through the shipped transition function with an injected trace sink. Seed many old files and one recent recheck candidate: assert one historical summary with exact count/newest age, a separately attributable candidate event, and zero synthetic live spawns/completions from static history. Advance/grow the recent candidate to assert rehabilitation still reports once. Cover zero historical files, post-bootstrap stale sightings, trace disabled, and D4 explicit completion. Run node --test --test-concurrency=1 test/subagent-settle-tick.test.js plus the focused trace suite. Use fixture timestamps/fake clocks, not a CPU-heavy live tracing session.
Dependencies/order. Separate lane; coordinate/merge after D4's changes to transition semantics and schema. Update docs/activity-trace.md with the implementation. No dependency on layout issues.
Out of scope. Changing lifecycle solely to improve counters; rewriting old logs; interpreting every render-time subagents.prune record as an eviction; renaming unrelated trace categories or collecting full transcripts.
Reviewer execution notes
Acceptance commands are for the future implementation after the named cases are added; they are not a statement that these regressions already exist or have passed. “New suite” means a file the implementer must add. Every filename explicitly present in a command above exists at this HEAD. Follow the project's primary-checkout test guidance with the candidate change actually applied in an authorized checkout; testing unchanged main does not validate a worktree patch. No full suite, native rebuild, live app launch, or CPU-heavy work was run for this specification task.
Before publishing these issues, refresh the four external issue contracts and settle the open choices listed in .work-files/codex-report-indic.md. The maintainer has already settled the one-glyph/static-background/blue-unseen/no-badge decisions and primary-source permission; do not ask those again.
Activity
(trace): summarize historical subagents once per bootstrap scan (#630) (