Commit Graph
16 Commits
Author SHA1 Message Date
abkslm fa4ae7d8c3 Merge nucleic/nimble-ember-gecko-xard into dev 2026-08-01 01:18:59 -07:00
abkslm 9dd12d76f1 Merge nucleic/upbeat-pebble-wren-ocls into dev 2026-07-31 23:17:32 -07:00
abkslm cae7d3aec9 Merge nucleic/upbeat-pebble-wren-ocls into dev 2026-07-31 21:31:27 -07:00
abkslm b67f88adfa Merge nucleic/upbeat-pebble-wren-ocls into dev 2026-07-31 20:13:50 -07:00
abkslm 9e404ca032 Merge nucleic/upbeat-maple-ferret-jov0 into dev 2026-07-31 19:50:06 -07:00
abkslm 373789efc3 Merge nucleic/upbeat-maple-ferret-jov0 into dev 2026-07-31 19:40:51 -07:00
abkslm 84fc9c8cad Merge nucleic/upbeat-maple-ferret-jov0 into dev 2026-07-31 19:31:26 -07:00
abkslm 2959c88318 Merge nucleic/upbeat-maple-ferret-jov0 into dev 2026-07-31 19:12:07 -07:00
abkslm c9f34b0540 Merge nucleic/upbeat-maple-ferret-jov0 into dev 2026-07-31 18:50:14 -07:00
abkslm 1a415c5bbd Merge nucleic/golden-slate-viper-glip into dev 2026-07-31 18:15:46 -07:00
abkslm 8b1e1c0f8c Merge nucleic/brisk-pebble-heron-qndl into dev 2026-07-31 16:58:21 -07:00
abkslm 7487bb5c8b Merge nucleic/warm-velvet-vole-scdb into dev 2026-07-31 16:39:54 -07:00
abkslm d250729d03 Merge nucleic/warm-velvet-vole-scdb into dev 2026-07-31 15:29:32 -07:00
abkslmandClaude Fable 5 b925c29df8 Incrementalize the summary pass and bound per-tick cost of long subagent runs
Two O(N)-per-tick refolds remained on the MainActor after the 0.4s throttle
and structural toolGroupSignature landed:

1. AppStore.regenerateToolGroupSummaries (and its staleness guards +
   open-time history baseline) re-derived summarizable units by refolding
   the ENTIRE open transcript per invocation — 10-100ms+ on 30k-event
   sessions. The store now owns a dedicated IncrementalTranscriptProjection
   and derives units via summarizableUnits(events:), a second lazily-primed
   consumer of the projector's existing seam: every display-valid seal seam
   is units-valid (the units fold breaks tool runs at strictly more rows,
   and seams only ever land after hard separators common to both folds).
   Each consumer folds only when requested, so the view's instance never
   folds units and the store's never folds display items or lock lines.

2. IncrementalTranscriptProjection capped its watermark at an open subagent
   Task span's firstRef, so a long run refolded its whole (unbounded) scope
   on every display tick — O(scope²) across the run. Three additions bound
   the per-read cost to what actually changed:
   - TailCache: the unsealed tail's partition (topLevel/byParent/parentOf)
     is appended to per read instead of rebuilt.
   - ScopeChildProjection: each subagent scope seals its provably closed
     children (result-fenced tools, superseded messages) under the same
     seam rules, recursively for nested scopes; sealed cards' descendant
     scopes are cursor-snapshotted and a late event into a result-fenced
     scope triggers a scope-local self-healing refold.
   - WatermarkHint: when a full scan seals nothing, it records the pinning
     open entities; later reads validate only new events against the pins
     (sealed-id fence and seq monotonicity still checked per event), so a
     pinned seam costs O(new) instead of O(tail) per tick. The fast path
     never seals, so a missed trigger can only delay sealing, never corrupt
     output.

Exact-output preserved: the equivalence suite now also asserts
summarizableUnits(prefix) == TranscriptProjection.summarizableUnits(prefix)
for every prefix on both a shared and a units-only instance, plus new
scenarios (long open scope with sealing/full-scan hooks, fan-out straggler,
open grandchild recursion, late-event self-heal, late units priming, root
flip leaving units intact) and open-scope fuzz. 27/27 projection tests green.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-28 16:55:17 -07:00
abkslm 0d5f2f1cd9 Merge nucleic/humble-glass-heron-hcpq into dev 2026-07-19 18:51:49 -07:00
abkslm da390ba0b4 Merge nucleic/frosty-glass-bison into dev 2026-07-12 00:11:03 -07:00