You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0e99ca0
Browse filesBrowse the repository at this point in the historyBrowse files
Second blind audit round (1 council + 4 Oracles) on the round-1 Pi fixes.
Caught a regression in my own round-1 change plus several deeper bugs;
verified every finding against source and dismissed the false positives.
REGRESSION fix (round-1 introduced):
- findFirstKeptEntryId advanced past a folded-toolResult synthetic boundary,
dropping that un-summarized tool-result run (neither summarized nor kept).
Now DEFERS (returns null) when the kept-start ordinal is synthetic — nothing
trims until a real entry heads the kept tail (Pi never cuts at a toolResult).
HIGH/BLOCKER:
- Synthetic-user compaction-trim failure (council UNANIMOUS #1): a compartment
ending on `synth-user-<id>` never matched a live message, so the summarized
prefix never trimmed -> duplicate content + overflow in tool-heavy sessions.
trimPiMessagesToBoundary now resolves a synth-user cutoff to the underlying
real toolResult entry id.
- Publish/drain race: onPublished fired (deferred-materialization signal) before
queueDropsForCompartmentalizedMessages, with an `await ensureProjectRegistered`
between them — a concurrent context pass could materialize with empty
pendingOps and strand the drops. queueDrops now runs before onPublished.
- Reasoning replay/clear mutated args.messages while the transcript flushes a
separate `working` copy at commit() — tagging/drops reassign working[idx] to
fresh objects, so commit() discarded the reasoning mutation while the cleared-
reasoning watermark advanced (defer-pass replay divergence -> cache bust).
Reasoning now mutates the transcript working array (single flush channel).
- No-cache contention fallback derived markers.maxMemoryId from a separate read
than the rendered set -> possible duplicate memory across m[0]/m[1]. Watermark
now derived from the frozen fallback set (parity with materializeM0Pi).
- /ctx-recomp + /ctx-session-upgrade omitted ensureProjectRegistered (rebuilt
compartments kept NULL p1_embedding) and the runner fallback chain
(fallbackModels + session-model last resort). Both threaded through.
- createPiHistorianClient ignored body.model, so every recomp fallback attempt
re-ran the primary; now honors the per-attempt override.
- /ctx-session-upgrade never advanced the Pi native compaction marker after a
successful recomp -> branch grew unbounded post-upgrade. Extracted the marker
advance into shared queueAndApplyPiRecompMarker, now called by both commands.
- --no-session children (sidekick/dreamer) exposed session-scoped ctx_note /
ctx_expand resolving the ephemeral child session (orphaned notes / empty
expand). Dropped both for those children; kept project-scoped ctx_search /
ctx_memory.
Dismissed (verified false positives): council SOLO-HIGH "heuristics self-enable
on defer passes" — Pi's shouldRunHeuristics gating is signal-equivalent to
OpenCode's materializationRequested model; the pending/deferred-materialization
signal IS a legitimate cache-bust trigger.
Tests: plugin 1663, Pi 348 (+8 regression), 0 fail. tsc + biome clean.
0 commit comments