Updated 1 path from 5db26da

 RUN  v3.2.4 /lossless-claw

(node:3131) ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
 ✓ test/engine.test.ts > LcmContextEngine metadata > reports the registered lossless-claw engine id 52ms
 ✓ test/engine.test.ts > LcmContextEngine metadata > advertises ownsCompaction capability 8ms
 ✓ test/engine.test.ts > LcmContextEngine metadata > requires the full native host lifecycle for agent runs 8ms
 ✓ test/engine.test.ts > LcmContextEngine metadata > requires host thread bootstrap projection for subagent forks 7ms
 ✓ test/engine.test.ts > LcmContextEngine metadata > configures file-backed sqlite connections with WAL and busy_timeout 3ms
 ✓ test/engine.test.ts > LcmContextEngine ignored sessions > skips bootstrap for ignored sessions while bootstrapping included sessions 34ms
 ✓ test/engine.test.ts > LcmContextEngine ignored sessions > skips ingest for ignored sessions while storing included sessions 11ms
 ✓ test/engine.test.ts > LcmContextEngine ignored sessions > skips ingestBatch for ignored sessions while storing included sessions 9ms
 ✓ test/engine.test.ts > LcmContextEngine ignored sessions > skips afterTurn for ignored sessions while persisting included sessions 14ms
 ✓ test/engine.test.ts > LcmContextEngine ignored sessions > passes through assemble for ignored sessions while assembling included sessions from LCM 11ms
 ✓ test/engine.test.ts > LcmContextEngine ignored sessions > skips compact for ignored sessions while compact still evaluates included sessions 10ms
 ✓ test/engine.test.ts > LcmContextEngine ignored sessions > skips prepareSubagentSpawn for ignored sessions while creating grants for included sessions 8ms
 ✓ test/engine.test.ts > LcmContextEngine ignored sessions > skips onSubagentEnded for ignored sessions while cleaning up included child grants 6ms
 ✓ test/engine.test.ts > LcmContextEngine OpenClaw runtime context leak filter > skips leaked assistant runtime context messages through direct ingest 7ms
 ✓ test/engine.test.ts > LcmContextEngine OpenClaw runtime context leak filter > skips leaked assistant runtime context messages without creating a conversation 6ms
 ✓ test/engine.test.ts > LcmContextEngine OpenClaw runtime context leak filter > keeps real assistant replies after skipping leaked runtime context 7ms
 ✓ test/engine.test.ts > LcmContextEngine OpenClaw runtime context leak filter > skips leaked runtime context content blocks during afterTurn 9ms
 ✓ test/engine.test.ts > LcmContextEngine OpenClaw runtime context leak filter > skips leaked runtime context imported from bootstrap transcripts 11ms
 ✓ test/engine.test.ts > LcmContextEngine OpenClaw runtime context leak filter > skips leaked runtime context in append-only bootstrap transcript recovery 20ms
 ✓ test/engine.test.ts > LcmContextEngine OpenClaw runtime context leak filter > keeps user-authored messages even when they quote the runtime context prefix 8ms
 ✓ test/engine.test.ts > LcmContextEngine OpenClaw runtime context leak filter > keeps system and tool messages even when they contain the runtime context sentinel 8ms
 ✓ test/engine.test.ts > LcmContextEngine OpenClaw runtime context leak filter > keeps ordinary assistant messages that mention the runtime context phrase later 20ms
 ✓ test/engine.test.ts > LcmContextEngine OpenClaw runtime context leak filter > keeps assistant messages that start with runtime context wording without the full sentinel 8ms
 ✓ test/engine.test.ts > LcmContextEngine stateless sessions > matches stateless patterns on sessionKey and can be disabled globally 19ms
 ✓ test/engine.test.ts > LcmContextEngine stateless sessions > skips bootstrap persistence for stateless session keys 13ms
 ✓ test/engine.test.ts > LcmContextEngine stateless sessions > skips ingest and ingestBatch writes for stateless session keys 7ms
 ✓ test/engine.test.ts > LcmContextEngine stateless sessions > skips ingest for assistant messages with error/aborted stop reasons and empty content 8ms
 ✓ test/engine.test.ts > LcmContextEngine stateless sessions > allows assemble reads for stateless session keys 10ms
 ✓ test/engine.test.ts > LcmContextEngine stateless sessions > skips afterTurn and compact writes for stateless session keys 8ms
 ✓ test/engine.test.ts > LcmContextEngine stateless sessions > skips delegated grant writes for stateless session keys 7ms
 ✓ test/engine.test.ts > LcmContextEngine stateless sessions > skips subagent cleanup for stateless child session keys 8ms
 ✓ test/engine.test.ts > ConversationStore session reuse > reuses conversation across session resets when sessionKey matches 8ms
 ✓ test/engine.test.ts > ConversationStore session reuse > does not resolve archived conversations through active session lookup 7ms
 ✓ test/engine.test.ts > LcmContextEngine before_reset lifecycle > prunes fresh-tail messages and low-depth summaries on /new 9ms
 ✓ test/engine.test.ts > LcmContextEngine before_reset lifecycle > keeps all context items on /new when retain depth is -1 7ms
 ✓ test/engine.test.ts > LcmContextEngine before_reset lifecycle > drops fresh-tail messages but keeps all summaries on /new when retain depth is 0 8ms
 ✓ test/engine.test.ts > LcmContextEngine before_reset lifecycle > archives the prior active conversation and creates a fresh active row on /reset 8ms
 ✓ test/engine.test.ts > LcmContextEngine before_reset lifecycle > creates a fresh active conversation on /reset when none exists yet 6ms
 ✓ test/engine.test.ts > LcmContextEngine before_reset lifecycle > treats repeated /reset on an already fresh conversation as a no-op 9ms
 ✓ test/engine.test.ts > LcmContextEngine session_end lifecycle > ignores session_end new so /new stays a prune-in-place flow 6ms
 ✓ test/engine.test.ts > LcmContextEngine session_end lifecycle > ignores session_end restart so gateway lifecycle does not orphan conversation history 6ms
 ✓ test/engine.test.ts > LcmContextEngine session_end lifecycle > ignores session_end shutdown so gateway lifecycle does not orphan conversation history 7ms
 ✓ test/engine.test.ts > LcmContextEngine session_end lifecycle > archives the prior active conversation and creates a fresh active row on idle rollover 6ms
 ✓ test/engine.test.ts > LcmContextEngine session_end lifecycle > archives the active conversation without replacement on deleted session_end 6ms
 ✓ test/engine.test.ts > LcmContextEngine session_end lifecycle > treats session_end reset after before_reset as a no-op on the fresh replacement row 8ms
 ✓ test/engine.test.ts > LcmContextEngine delegated session continuity > prepares subagent spawn from an existing conversation found by sessionKey 7ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > stores string content as-is 7ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > flattens text content block arrays to plain text 7ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > extracts only text blocks from mixed content arrays 9ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > stores empty string for empty content arrays 6ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > falls back to JSON.stringify for non-array, non-string content 8ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > roundtrip stores plain text, not JSON content blocks 6ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > intercepts oversized <file> blocks and persists large file metadata 29ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > keeps <file> blocks inline when below the large-file threshold 8ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > externalizes oversized plain user text as a raw payload 10ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > keeps plain user text inline when below the raw-payload threshold 8ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > externalizes oversized non-file non-tool raw payloads 10ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > does not externalize assistant tool or reasoning blocks generically 9ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > stores externalized inline images under largeFilesDir 8ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > externalizes native user image blocks before raw payload fallback 10ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > externalizes native assistant image blocks before raw payload fallback 9ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > externalizes native tool-result image blocks instead of persisting them inline 11ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > externalizes native system image blocks instead of falling through to raw-system-payload 9ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > still externalizes large mixed-content messages that embed an image reference alongside oversized text 10ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > infers extensions for heic, avif, and bmp native image blocks 11ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > externalizes oversized tool-result payloads into large_files 15ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > externalizes oversized plain-text tool-result blocks from live exec-style messages 11ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > externalizes structured tool-result image payloads before text externalization 9ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > externalizes string-content tool-result images without converting them to text files 10ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > lists summarized externalized tool results as transcript GC candidates 10ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > maintain() defers transcript GC until host-approved background maintenance 15ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > maintain() skips transcript GC when transcriptGcEnabled is false 12ms
 ✓ test/engine.test.ts > LcmContextEngine.ingest content extraction > serializes recycled session writes by stable sessionKey 10ms
 ✓ test/engine.test.ts > LcmContextEngine connection lifecycle > keeps shared sqlite handle open while another engine instance is active 9ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > imports only active leaf-path messages from SessionManager context 12ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > is idempotent and does not duplicate already bootstrapped sessions 12ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > does not rewrite prior assistant transcript rows when bootstrap re-instantiates a conversation 15ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > keeps fresh tool-only rows after dropping a replayed assistant prefix 16ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > keeps legitimate repeated assistant text when the ordering does not match a prior replay 15ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > keeps the replay flood guard active for user-leading append-only replay batches 15ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > skips reopening the transcript when checkpoint stats match 10ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > preserves ordinary bootstrap behavior when no checkpoint exists 9ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > preserves existing conversation data when the session file rotates 15ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > preserves conversation history when the session file rotates across a stable sessionKey 12ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > rotates to a fresh conversation when a stable sessionKey resumes on a new transcript after the old file disappears 11ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > rotates before assemble when a stable sessionKey points at a pruned transcript 10ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > preserves the active conversation when the tracked transcript stat fails for a non-missing reason 12ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > does not reapply bootstrapMaxTokens after session file rotation 14ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > rotates the current transcript in place without replacing the conversation 14ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > summarizes raw context outside the fresh tail before rotating the transcript 47ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > records rotate summary auth failures in the compaction circuit breaker 12ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > scopes rotate summarization spend guards per session 17ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > returns rotate unavailable when summarization spend backoff opens 11ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > reconciles unimported transcript messages before rotate summary coverage 23ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > imports checkpoint-missing transcript history before rotate summary coverage 18ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > refuses to rotate when transcript reconciliation has no safe overlap 9ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > takes the rotate backup after covering transcript-only rows and before rewrite 27ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > uses stored compaction telemetry to summarize raw context before automatic rotate 18ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > waits for an in-flight managed transaction before backing up and rotating 48ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > reports rotate as unavailable when the session transcript cannot be read 10ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > defers oversized session-file rewrites from afterTurn runtime hooks 14ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > does not directly auto-rotate session files during background maintenance 10ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > does not rewrite oversized session files from maintain runtime checks 11ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > leaves below-threshold session files alone while logging the decision 9ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > skips ignored, stateless, and untracked runtime sessions 9ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > startup scan rotates oversized active conversations with checkpointed files 16ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > startup scan ignores stale active LCM conversations outside indexed candidates 18ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > startup scan logs one compact summary for quiet skips 19ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > startup batch creates one pre-rotation backup for multiple rotations 30ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > does not repeatedly rewrite oversized transcripts during runtime deferral 12ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > reconciles missing tail messages when JSONL advanced past LCM 10ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > imports appended tail messages without replaying full reconciliation 9ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > falls back to full reconciliation when append-only suffix overlaps persisted history 12ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > blocks bounded no-anchor imports that are mostly already persisted history 11ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > imports the new tail when a same-path shrink keeps an already-persisted prefix 11ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > keeps the append-only fast path after heartbeat pruning changes the DB frontier 15ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > ignores non-message envelopes in appended transcript tails without forcing reconcile 9ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > tolerates custom bootstrap sidecar entries in append-only suffixes 12ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > refreshes the bootstrap checkpoint after afterTurn heartbeat pruning 13ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > refreshes the bootstrap checkpoint after a normal afterTurn before the next append-only bootstrap 13ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > reconciles foreground transcript messages before assistant-only afterTurn deltas 11ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > falls back to full reconciliation when append-only checkpoint validation mismatches 12ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > reconciles missing structured tool-call tail when prior empty tool content exists 13ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > bootstraps a bounded same-path transcript epoch after the file shrinks 10ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > blocks same-path shrink import when raw ids belong to another active conversation 11ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > imports the full bounded same-path shrink epoch instead of trusting a stale externalized frontier 12ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > imports a full same-path shrink epoch when new content repeats an old frontier message 12ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > does not append JSONL when no overlapping anchor exists in LCM 8ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > does not advance the bootstrap checkpoint when reconcile aborts at the import cap 18ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > uses the live ingest path for initial bootstrap 10ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > externalizes oversized file blocks during first-time bootstrap and still reconciles later tail messages 12ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > externalizes inline images during first-time bootstrap 11ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > externalizes oversized tool results during first-time bootstrap 11ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > limits first-time bootstrap imports to the newest messages within bootstrapMaxTokens 10ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > bounds forked child bootstrap and assembly even when the host transcript contains a raw parent branch 17ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > drops an oversized singleton bootstrap tail that exceeds bootstrapMaxTokens 7ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > does not return raw fork history when a forked oversized bootstrap tail imports no messages 9ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > streams JSONL replay and skips malformed lines while keeping later messages 16ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > prepareSubagentSpawn resolves parent conversation by sessionKey before UUID backfill 8ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > skips full read when file is unchanged and conversation is already bootstrapped 13ms
 ✓ test/engine.test.ts > LcmContextEngine.bootstrap > file-level cache guard allows full read when file changes 11ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > strips assistant prefill tails when no DB conversation exists 7ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > falls back when DB context clearly trails live context 8ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > assembles context from DB when coverage exists 8ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > adds raw prompt-recall matches when summary-covered history omits an exact memory key 12ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > adds prompt-recall sentence context before a requested key 10ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > skips prompt-recall matches when the cue would exceed the assembly budget 12ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > drops prompt-recall when volatile live input needs the remaining budget 16ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > does not add prompt-recall when volatile live input already mentions the requested key 10ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > drops prompt-recall before evicting assembled context for volatile live input 12ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > does not add prompt-recall when the active summary already carries the exact fact 10ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > uses summary-backed recall when the fact is outside a realistic fresh tail 16ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > does not add prompt-recall when an active summary already mentions the requested key 12ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > does not add prompt-recall when a newer raw tail already mentions the requested key 11ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > does not recall substring or secret-shaped identifiers 35ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > does not add prompt-recall snippets that include unrelated sensitive material 12ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > does not add prompt-recall snippets that include underscore provider tokens 9ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > continues prompt-recall search past filtered newer matches 12ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > recalls multiple requested identifiers from the same historical message 14ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > changes the projection fingerprint when prompt-recall cue content changes 13ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > bounds prompt-recall searches to four full-text identifier lookups 12ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > continues with assembled DB context when optional prompt recall lookup fails 11ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > logs the emitted context projection epoch 9ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > keeps projection epochs stable across raw tail growth and changes them for summaries 11ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > changes projection epochs when active focus state changes 12ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > respects token budget in assembled output 11ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > falls back to live messages if assembler throws 8ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > falls back to live context when assembled result has no user turns (cold-cache new session) 7ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > does not fall back when assembled result has user turns even if it ends with assistant 10ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > drops orphan tool results during assembled transcript repair 7ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > inserts synthetic tool results when fresh-tail tool calls have no result 9ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > drops older orphaned assistant tool calls instead of surfacing synthetic repair results 12ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > preserves non-tool content and matched tool calls when older assistant turns have stale orphaned calls 12ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > assemble forwards fresh-tail and prompt-aware options 8ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > bounds previous assembled prefix snapshots with LRU eviction 74ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > logs previous and current divergence message summaries when assembled prefixes change 10ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > adds compact overflow diagnostics to stressed assemble debug logs 9ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > repairs OpenAI function_call transcripts without dropping reasoning blocks 11ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > filters assistant messages with blank-text content during assembly 9ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > filters thinking-only assistant messages during assembly 11ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > rebuilds raw function_call blocks from stored columns when raw arguments are objects 8ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > does not emit assembly-specific system prompt guidance when no summaries exist 8ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > does not emit assembly-specific system prompt guidance when summaries are present 9ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble canonical path > escapes summary XML text so persisted content cannot break out of the untrusted wrapper 8ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > normalizes tool_result blocks without inflating stored token accounting 8ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > preserves structured toolResult content via message_parts and assembler 9ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > does not leak OpenAI function tool payloads into stored message content fallbacks 8ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > preserves toolName through ingest-assemble round-trip for Gemini compatibility 8ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > preserves toolResult error state through ingest-assemble round-trip 10ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > preserves top-level tool metadata for string-content tool results 10ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > preserves top-level reasoning_content for assistant tool-call replay 10ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > reconstructs OpenAI reasoning and function call blocks when raw metadata is missing 10ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > skips unknown roles instead of storing them as assistant messages 7ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > uses explicit compact tokenBudget over legacy tokenBudget 9ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > ingests completed turn batches with ingestBatch 10ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > skips heartbeat turn batches in ingestBatch 9ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn ingests auto-compaction summary and new turn messages 11ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn deduplicates replayed history before prepending auto-compaction summary 16ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn skips new-message content already covered by auto-compaction summary 12ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn does not drop short messages just because they appear in auto-compaction summary 12ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn keeps a 24+ char user message that only collides as a substring of the summary narrative (F6) 11ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn drops a user message when the summary ends with that exact content (F6 anchored) 9ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn runs inline threshold compaction only after context threshold is crossed 11ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn runs inline threshold compaction when projected raw backlog crosses threshold 11ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn records deferred threshold debt when projected raw backlog crosses threshold 14ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn ignores raw leaf pressure below the context threshold 9ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn resolves tokenBudget from runtimeContext and forwards it as legacyParams 16ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn keeps the bootstrap checkpoint stale and records retry debt when inline threshold compaction fails 10ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn waits for inline threshold compaction before completing 37ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn falls back to the default token budget when no budget is provided 11ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn falls back to legacyCompactionParams when runtimeContext is missing 11ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn prefers runtimeContext when both runtimeContext and legacyCompactionParams are set 8ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn prefers runtimeContext.currentTokenCount for compaction decisions 10ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn falls back to local message token estimates when runtimeContext.currentTokenCount is absent 8ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn records deferred threshold debt instead of compacting inline by default 9ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn evaluates threshold compaction when ingestBatch is empty 9ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn skips compaction work when ingestBatch is empty AND conversation is below threshold 10ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn schedules a deferred threshold drain even when compactionTelemetry has no provider/model 9ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn caps the transcript-reconcile slow path to one full re-read per session+file (F7) 13ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn treats missing tracked transcripts as a cheap degraded path without full reread 29ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > seeds placeholder bootstrap_state when afterTurn stat-fail fallback runs (#649 follow-up) 14ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > bootstrap imports a bounded path-mismatched transcript with no old anchor as a new epoch 15ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > bootstrap preserves a long-lived checkpoint when a rotated transcript is only delivery audit traffic 13ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > bootstrap imports real path-mismatched user turns that mention config audit 12ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > bootstrap fails closed on ambiguous runtime rollover while the old transcript still exists 12ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > isolates cron runs that reuse a stable sessionKey while preserving prior runs 12ms
 × test/engine.test.ts > LcmContextEngine fidelity and token budget > isolates cron sessionKey rollover during afterTurn transcript reconcile 36ms
   → expected [] to deeply equal [ Array(2) ]
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn fails closed on ambiguous runtime rollover while the old transcript still exists 11ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > assemble falls back to live messages on ambiguous runtime rollover while the old transcript still exists 11ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn reconciles a path-mismatched no-anchor transcript before oversized delta dedup 15ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn preserves continuity when a path-mismatched transcript is only delivery audit traffic 15ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn archives a stale active conversation when the prior keyed transcript was pruned 12ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn skips assistant-only rollover when the replacement transcript is unreadable 13ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn bounds initial transcript imports to the bootstrap budget 9ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn skips persistence when full reread finds no anchor and imports nothing 12ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn imports a bounded same-path transcript epoch after the file shrinks 12ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn imports the full bounded same-path shrink epoch instead of trusting a stale externalized frontier 13ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn imports a full same-path shrink epoch when new content repeats an old frontier message 12ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn keeps the old checkpoint when a path-mismatched no-anchor import is capped 17ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn retries a capped reconcile when the transcript file changed with an append-only-ineligible suffix (F7) 17ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn drains deferred threshold debt in the background without cache telemetry 67ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > background deferred drain leaves threshold debt durable when the session is busy 11ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > maintain() leaves deferred threshold debt pending until the host opts in 10ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > maintain() consumes deferred threshold debt when the host opts in 10ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > maintain() clears stale legacy non-threshold debt when threshold no longer applies 9ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > maintain() revalidates legacy non-threshold debt as threshold work when still over threshold 8ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > maintain() keeps threshold debt pending when compaction fails 8ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > maintain() keeps threshold debt pending when the auth circuit breaker is open 9ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > maintain() backs off deferred threshold debt after non-auth compaction failures 10ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > maintain() keeps threshold debt pending when partial compaction remains over target 10ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > maintain() backs off after partial deferred compaction still exceeds target 11ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > maintain() stops model-backed deferred compaction at the summary call cap 9ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > compact() is not blocked by deferred-maintenance retry backoff 9ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > poor-reduction spend backoff blocks custom summarizers in the same compaction scope 10ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn refreshes threshold debt while retry backoff is active without compacting 12ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > assemble() leaves pending threshold debt for post-turn maintenance while under budget 8ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > assemble() uses bounded live context when pending maintenance is near budget 10ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > assemble() preserves leading system context when degraded live context is bounded 11ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > assemble() degrades to bounded live context if emergency compaction leaves debt pending 9ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > assemble() drains pending threshold debt as an emergency when already over budget 9ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > assemble() drains pending threshold debt when recorded runtime tokens are over budget 9ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > assemble() uses projected deferred pressure for emergency drain without passing it as observed tokens 8ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > assemble() does not wait for the session queue when deferred threshold debt is not urgent 11ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > assemble() waits for the session queue before emergency deferred threshold compaction 10ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > assemble() degrades instead of spending during active deferred retry backoff 9ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > maintain() uses the stricter current token budget for deferred threshold debt 8ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn persists prompt-cache telemetry for hot sessions 13ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn prefers runtime prompt tokens over transcript estimates for compaction decisions 9ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn skips compaction when ingest fails 10ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn prunes heartbeat-shaped ACK turns before compaction even without the heartbeat flag 11ms
 ✓ test/engine.test.ts > LcmContextEngine fidelity and token budget > afterTurn heartbeat flag skips non-empty transcript imports 9ms
 ✓ test/engine.test.ts > LcmContextEngine afterTurn dedup guard > ingests all messages when no prior conversation exists (new session) 9ms
 ✓ test/engine.test.ts > LcmContextEngine afterTurn dedup guard > does not persist custom transcript context as assistant messages 9ms
 ✓ test/engine.test.ts > LcmContextEngine afterTurn dedup guard > ingests all genuinely new messages (normal afterTurn, no restart) 12ms
 ✓ test/engine.test.ts > LcmContextEngine afterTurn dedup guard > skips all duplicates when gateway restart replays full history 11ms
 ✓ test/engine.test.ts > LcmContextEngine afterTurn dedup guard > deduplicates old messages but ingests new ones after restart 11ms
 ✓ test/engine.test.ts > LcmContextEngine afterTurn dedup guard > deduplicates replay when runtime sessionId changes but stable sessionKey continues 10ms
 ✓ test/engine.test.ts > LcmContextEngine afterTurn dedup guard > handles empty batch after slicing 10ms
 ✓ test/engine.test.ts > LcmContextEngine afterTurn dedup guard > handles repeated identical content (e.g. empty tool results) with occurrence counting 12ms
 ✓ test/engine.test.ts > LcmContextEngine afterTurn dedup guard > skips fully replayed suffix batches when the stored prefix is absent 10ms
 ✓ test/engine.test.ts > LcmContextEngine afterTurn dedup guard > uses the actual stored tail for oversized single-message replays 10ms
 ✓ test/engine.test.ts > LcmContextEngine afterTurn dedup guard > does not treat a one-message terminal match as a fully replayed batch 11ms
 ✓ test/engine.test.ts > LcmContextEngine afterTurn dedup guard > ingests single genuinely new message without dedup interference 12ms
 ✓ test/engine.test.ts > LcmContextEngine afterTurn dedup guard > fails closed for oversized no-overlap afterTurn batches 10ms
 ✓ test/engine.test.ts > LcmContextEngine afterTurn dedup guard > preserves a legitimate repeated first new message 11ms
 ✓ test/engine.test.ts > LcmContextEngine compaction telemetry > does not feed engine-ingested reasoning parts into compaction summarizer input 12ms
 ✓ test/engine.test.ts > LcmContextEngine compaction telemetry > does not feed top-level reasoning_content into compaction summarizer input 11ms
 ✓ test/engine.test.ts > LcmContextEngine compaction telemetry > does not feed redacted-thinking-only ingested parts into compaction summarizer input 14ms
 ✓ test/engine.test.ts > LcmContextEngine compaction telemetry > does not append synthetic system messages for compaction passes 13ms
 ✓ test/engine.test.ts > LcmContextEngine compaction telemetry > passes injected-context strip tags into production compaction 14ms
 ✓ test/engine.test.ts > LcmContextEngine.compact token budget plumbing > preserves explicit empty-string customInstructions overrides over config defaults 9ms
 ✓ test/engine.test.ts > LcmContextEngine.compact token budget plumbing > supports openai-codex large-file summarization through runtime-owned auth 9ms
 ✓ test/engine.test.ts > LcmContextEngine.compact token budget plumbing > caps model-backed large-file summarization calls per spend window 9ms
 ✓ test/engine.test.ts > LcmContextEngine.compact token budget plumbing > passes context-engine runtime llm and session identity to compaction summaries 11ms
 ✓ test/engine.test.ts > LcmContextEngine.compact token budget plumbing > forwards config customInstructions to large-file summarization 8ms
 ✓ test/engine.test.ts > LcmContextEngine.compact token budget plumbing > fails when compact token budget is missing 7ms
 ✓ test/engine.test.ts > LcmContextEngine.compact token budget plumbing > reads tokenBudget and currentTokenCount from runtimeContext 10ms
 ✓ test/engine.test.ts > LcmContextEngine.compact token budget plumbing > forces one compaction round for manual compaction requests in runtimeContext 11ms
 ✓ test/engine.test.ts > LcmContextEngine.compact token budget plumbing > prefers runtimeContext over legacyParams when both are provided 9ms
 ✓ test/engine.test.ts > LcmContextEngine.compact token budget plumbing > accepts explicit token budget without falling back to defaults 8ms
 ✓ test/engine.test.ts > LcmContextEngine.compact token budget plumbing > forces one compaction round for manual compaction requests 11ms
 ✓ test/engine.test.ts > LcmContextEngine.compact token budget plumbing > uses threshold target for proactive threshold compaction mode 10ms
 ✓ test/engine.test.ts > LcmContextEngine.compact token budget plumbing > passes currentTokenCount through to compaction evaluation and loop 9ms
 ✓ test/engine.test.ts > LcmContextEngine.compact token budget plumbing > forces threshold sweeps to account for runtime prompt overhead 9ms
 ✓ test/engine.test.ts > LcmContextEngine.compact token budget plumbing > forces threshold sweeps to account for projected raw backlog pressure 9ms
 ✓ test/engine.test.ts > LcmContextEngine.compact token budget plumbing > does not clear threshold pressure when persisted tokens are under target but runtime tokens remain over 8ms
 ✓ test/engine.test.ts > LcmContextEngine.compact token budget plumbing > reports already under target when compaction rounds are zero 10ms
 ✓ test/engine.test.ts > LcmContextEngine.compact token budget plumbing > treats full-sweep compaction as already under target when tokensAfter is below budget 8ms
 ✓ test/engine.test.ts > LcmContextEngine.compact token budget plumbing > reports threshold full-sweep compaction as incomplete when tokensAfter remains over target 9ms
 ✓ test/engine.test.ts > LcmContextEngine.compact token budget plumbing > routes forced budget recovery through compactUntilUnder for the issue #268 overflow shape 8ms
 ✓ test/engine.test.ts > LcmContextEngine.compact token budget plumbing > uses tokenBudget as currentTokens for forced recovery when observed tokens are unavailable 8ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble maxAssemblyTokenBudget cap > caps token budget when maxAssemblyTokenBudget is set and runtime budget exceeds it 17ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble maxAssemblyTokenBudget cap > uses full runtime budget when maxAssemblyTokenBudget is not set 13ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble maxAssemblyTokenBudget cap > caps the 128k fallback when maxAssemblyTokenBudget is set and no runtime budget provided 19ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble maxAssemblyTokenBudget cap > caps token budget in compact when maxAssemblyTokenBudget is set 11ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble maxAssemblyTokenBudget cap > does not consume summary substring as coverage for volatile live inputs 9ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble maxAssemblyTokenBudget cap > matches tool results without tool names against assembled unknown-name results 11ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble maxAssemblyTokenBudget cap > appends suppressed fallback retry prompts that lack internal context markers 10ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble maxAssemblyTokenBudget cap > evicts historical tool-call pairs together when volatile input forces trimming 14ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble maxAssemblyTokenBudget cap > keeps raw and summary context scoped across three isolated cron runtimes 16ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble maxAssemblyTokenBudget cap > does not import an archived cron run when assemble sees the runtime rollover first 11ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble maxAssemblyTokenBudget cap > recognizes only an isolated cron session-key shape: agent:main:cron:job 12ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble maxAssemblyTokenBudget cap > recognizes only an isolated cron session-key shape: agent:main:cron:job:run:123 13ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble maxAssemblyTokenBudget cap > recognizes only an isolated cron session-key shape: agent:main:cron 11ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble maxAssemblyTokenBudget cap > recognizes only an isolated cron session-key shape: agent:main:cronish:job 12ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble maxAssemblyTokenBudget cap > recognizes only an isolated cron session-key shape: agent:main:subagent:cron:job 12ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble maxAssemblyTokenBudget cap > recognizes only an isolated cron session-key shape: agent:main:main 10ms
 ✓ test/engine.test.ts > LcmContextEngine.assemble maxAssemblyTokenBudget cap > compacts each isolated cron run from only that run's transcript 21ms
 ✓ test/lcm-tools.test.ts > LCM tools session scoping > lcm_grep metadata explains focused FTS5 query construction 3ms
 ✓ test/lcm-tools.test.ts > LCM tools session scoping > lcm_grep rejects regex alternation in full-text mode before searching 3ms
 ✓ test/lcm-tools.test.ts > LCM tools session scoping > lcm_grep still forwards regex alternation in regex mode 57ms
 ✓ test/lcm-tools.test.ts > LCM tools session scoping > lcm_expand query mode infers conversationId from delegated grant 4ms
 ✓ test/lcm-tools.test.ts > LCM tools session scoping > lcm_grep forwards since/before and uses the configured timezone in text output 5ms
 ✓ test/lcm-tools.test.ts > LCM tools session scoping > lcm_grep forwards full-text sort mode and reports it in output 1ms
 ✓ test/lcm-tools.test.ts > LCM tools session scoping > lcm_grep resolves conversation scope via sessionKey continuity before sessionId lookup 1ms
 ✓ test/lcm-tools.test.ts > LCM tools session scoping > lcm_grep searches across a resolved session family 1ms
 ✓ test/lcm-tools.test.ts > LCM tools session scoping > supports grep-to-describe recovery for compacted summary matches 3ms
 × test/lcm-tools.test.ts > LCM tools session scoping > lcm_grep keeps isolated cron sessionKey scope on the active run 13ms
   → expected "spy" to be called with arguments: [ ObjectContaining{…} ][90m

Received: 

[1m  1st spy call:

[22m[2m  [[22m
[32m-   ObjectContaining {[90m
[31m+   {[90m
[31m+     "before": undefined,[90m
[2m      "conversationId": 42,[22m
[2m      "conversationIds": [[22m
[2m        42,[22m
[31m+       21,[90m
[31m+       7,[90m
[2m      ],[22m
[31m+     "limit": 50,[90m
[31m+     "mode": "regex",[90m
[31m+     "query": "deployment",[90m
[31m+     "scope": "both",[90m
[31m+     "since": undefined,[90m
[31m+     "sort": "recency",[90m
[2m    },[22m
[2m  ][22m
[39m[90m

Number of calls: [1m1[22m
[39m
 ✓ test/lcm-tools.test.ts > LCM tools session scoping > lcm_grep rejects allConversations from a sub-agent without a delegated grant 1ms
 ✓ test/lcm-tools.test.ts > LCM tools session scoping > lcm_grep rejects allConversations when a sub-agent key is passed as sessionId 0ms
 ✓ test/lcm-tools.test.ts > LCM tools session scoping > lcm_grep scopes delegated allConversations to the granted conversation IDs 1ms
 ✓ test/lcm-tools.test.ts > LCM tools session scoping > lcm_grep rejects explicit foreign conversationId outside a delegated grant 0ms
 ✓ test/lcm-tools.test.ts > LCM tools session scoping > lcm_describe blocks cross-conversation lookup unless allConversations=true 2ms
 ✓ test/lcm-tools.test.ts > LCM tools session scoping > lcm_describe rejects allConversations results outside a delegated grant 0ms

⎯⎯⎯⎯⎯⎯⎯ Failed Tests 2 ⎯⎯⎯⎯⎯⎯⎯

 FAIL  test/engine.test.ts > LcmContextEngine fidelity and token budget > isolates cron sessionKey rollover during afterTurn transcript reconcile
AssertionError: expected [] to deeply equal [ Array(2) ]

[32m- Expected[39m
[31m+ Received[39m

[32m- [[39m
[32m-   "current afterTurn cron input",[39m
[32m-   "current afterTurn cron output",[39m
[32m- ][39m
[31m+ [][39m

 ❯ test/engine.test.ts:11498:62
    11496|       activeConversation!.conversationId,
    11497|     );
    11498|     expect(activeMessages.map((message) => message.content)).toEqual([
       |                                                              ^
    11499|       "current afterTurn cron input",
    11500|       "current afterTurn cron output",

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/2]⎯

 FAIL  test/lcm-tools.test.ts > LCM tools session scoping > lcm_grep keeps isolated cron sessionKey scope on the active run
AssertionError: expected "spy" to be called with arguments: [ ObjectContaining{…} ][90m

Received: 

[1m  1st spy call:

[22m[2m  [[22m
[32m-   ObjectContaining {[90m
[31m+   {[90m
[31m+     "before": undefined,[90m
[2m      "conversationId": 42,[22m
[2m      "conversationIds": [[22m
[2m        42,[22m
[31m+       21,[90m
[31m+       7,[90m
[2m      ],[22m
[31m+     "limit": 50,[90m
[31m+     "mode": "regex",[90m
[31m+     "query": "deployment",[90m
[31m+     "scope": "both",[90m
[31m+     "since": undefined,[90m
[31m+     "sort": "recency",[90m
[2m    },[22m
[2m  ][22m
[39m[90m

Number of calls: [1m1[22m
[39m
 ❯ test/lcm-tools.test.ts:553:28
    551|     const result = await tool.execute("call-cron-family", { pattern: "…
    552| 
    553|     expect(retrieval.grep).toHaveBeenCalledWith(
       |                            ^
    554|       expect.objectContaining({
    555|         conversationId: 42,

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/2]⎯


 Test Files  2 failed (2)
      Tests  2 failed | 342 passed (344)
   Start at  01:10:36
   Duration  8.62s (transform 1.62s, setup 0ms, collect 2.69s, tests 4.01s, environment 0ms, prepare 233ms)

JUNIT report written to /tmp/rebench-test-results.xml
<?xml version="1.0" encoding="UTF-8" ?>
<testsuites name="vitest tests" tests="344" failures="2" errors="0" time="4.010682087">
    <testsuite name="test/engine.test.ts" timestamp="2026-09-04T01:10:45.541Z" hostname="da8877d4efee" tests="328" failures="1" errors="0" skipped="0" time="3.913068238">
        <testcase classname="test/engine.test.ts" name="LcmContextEngine metadata &gt; reports the registered lossless-claw engine id" time="0.052187626">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine metadata &gt; advertises ownsCompaction capability" time="0.007558322">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine metadata &gt; requires the full native host lifecycle for agent runs" time="0.008228658">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine metadata &gt; requires host thread bootstrap projection for subagent forks" time="0.006907652">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine metadata &gt; configures file-backed sqlite connections with WAL and busy_timeout" time="0.003152846">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine ignored sessions &gt; skips bootstrap for ignored sessions while bootstrapping included sessions" time="0.033851302">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine ignored sessions &gt; skips ingest for ignored sessions while storing included sessions" time="0.011124962">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine ignored sessions &gt; skips ingestBatch for ignored sessions while storing included sessions" time="0.008776493">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine ignored sessions &gt; skips afterTurn for ignored sessions while persisting included sessions" time="0.013704805">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine ignored sessions &gt; passes through assemble for ignored sessions while assembling included sessions from LCM" time="0.011397587">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine ignored sessions &gt; skips compact for ignored sessions while compact still evaluates included sessions" time="0.010311124">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine ignored sessions &gt; skips prepareSubagentSpawn for ignored sessions while creating grants for included sessions" time="0.007516363">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine ignored sessions &gt; skips onSubagentEnded for ignored sessions while cleaning up included child grants" time="0.005541689">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine OpenClaw runtime context leak filter &gt; skips leaked assistant runtime context messages through direct ingest" time="0.006585277">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine OpenClaw runtime context leak filter &gt; skips leaked assistant runtime context messages without creating a conversation" time="0.005879731">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine OpenClaw runtime context leak filter &gt; keeps real assistant replies after skipping leaked runtime context" time="0.007007945">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine OpenClaw runtime context leak filter &gt; skips leaked runtime context content blocks during afterTurn" time="0.008624118">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine OpenClaw runtime context leak filter &gt; skips leaked runtime context imported from bootstrap transcripts" time="0.010676334">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine OpenClaw runtime context leak filter &gt; skips leaked runtime context in append-only bootstrap transcript recovery" time="0.020469749">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine OpenClaw runtime context leak filter &gt; keeps user-authored messages even when they quote the runtime context prefix" time="0.008311408">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine OpenClaw runtime context leak filter &gt; keeps system and tool messages even when they contain the runtime context sentinel" time="0.008009616">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine OpenClaw runtime context leak filter &gt; keeps ordinary assistant messages that mention the runtime context phrase later" time="0.019881829">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine OpenClaw runtime context leak filter &gt; keeps assistant messages that start with runtime context wording without the full sentinel" time="0.007531613">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine stateless sessions &gt; matches stateless patterns on sessionKey and can be disabled globally" time="0.018911034">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine stateless sessions &gt; skips bootstrap persistence for stateless session keys" time="0.012910427">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine stateless sessions &gt; skips ingest and ingestBatch writes for stateless session keys" time="0.007070987">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine stateless sessions &gt; skips ingest for assistant messages with error/aborted stop reasons and empty content" time="0.007544447">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine stateless sessions &gt; allows assemble reads for stateless session keys" time="0.010265957">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine stateless sessions &gt; skips afterTurn and compact writes for stateless session keys" time="0.008212491">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine stateless sessions &gt; skips delegated grant writes for stateless session keys" time="0.007158487">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine stateless sessions &gt; skips subagent cleanup for stateless child session keys" time="0.008365117">
        </testcase>
        <testcase classname="test/engine.test.ts" name="ConversationStore session reuse &gt; reuses conversation across session resets when sessionKey matches" time="0.00756378">
        </testcase>
        <testcase classname="test/engine.test.ts" name="ConversationStore session reuse &gt; does not resolve archived conversations through active session lookup" time="0.006989778">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine before_reset lifecycle &gt; prunes fresh-tail messages and low-depth summaries on /new" time="0.008993244">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine before_reset lifecycle &gt; keeps all context items on /new when retain depth is -1" time="0.00673161">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine before_reset lifecycle &gt; drops fresh-tail messages but keeps all summaries on /new when retain depth is 0" time="0.007527655">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine before_reset lifecycle &gt; archives the prior active conversation and creates a fresh active row on /reset" time="0.007653281">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine before_reset lifecycle &gt; creates a fresh active conversation on /reset when none exists yet" time="0.006067691">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine before_reset lifecycle &gt; treats repeated /reset on an already fresh conversation as a no-op" time="0.008706202">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine session_end lifecycle &gt; ignores session_end new so /new stays a prune-in-place flow" time="0.006223275">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine session_end lifecycle &gt; ignores session_end restart so gateway lifecycle does not orphan conversation history" time="0.00578119">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine session_end lifecycle &gt; ignores session_end shutdown so gateway lifecycle does not orphan conversation history" time="0.007308238">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine session_end lifecycle &gt; archives the prior active conversation and creates a fresh active row on idle rollover" time="0.006182317">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine session_end lifecycle &gt; archives the active conversation without replacement on deleted session_end" time="0.006019857">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine session_end lifecycle &gt; treats session_end reset after before_reset as a no-op on the fresh replacement row" time="0.008043407">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine delegated session continuity &gt; prepares subagent spawn from an existing conversation found by sessionKey" time="0.007356863">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; stores string content as-is" time="0.006717236">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; flattens text content block arrays to plain text" time="0.006739652">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; extracts only text blocks from mixed content arrays" time="0.00868866">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; stores empty string for empty content arrays" time="0.006296608">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; falls back to JSON.stringify for non-array, non-string content" time="0.007594947">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; roundtrip stores plain text, not JSON content blocks" time="0.0063959">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; intercepts oversized &lt;file&gt; blocks and persists large file metadata" time="0.029089783">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; keeps &lt;file&gt; blocks inline when below the large-file threshold" time="0.008363534">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; externalizes oversized plain user text as a raw payload" time="0.010053957">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; keeps plain user text inline when below the raw-payload threshold" time="0.007867698">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; externalizes oversized non-file non-tool raw payloads" time="0.009774581">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; does not externalize assistant tool or reasoning blocks generically" time="0.00886166">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; stores externalized inline images under largeFilesDir" time="0.007709447">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; externalizes native user image blocks before raw payload fallback" time="0.010199791">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; externalizes native assistant image blocks before raw payload fallback" time="0.008522451">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; externalizes native tool-result image blocks instead of persisting them inline" time="0.011447796">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; externalizes native system image blocks instead of falling through to raw-system-payload" time="0.00880616">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; still externalizes large mixed-content messages that embed an image reference alongside oversized text" time="0.010477542">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; infers extensions for heic, avif, and bmp native image blocks" time="0.010617792">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; externalizes oversized tool-result payloads into large_files" time="0.015497645">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; externalizes oversized plain-text tool-result blocks from live exec-style messages" time="0.011233545">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; externalizes structured tool-result image payloads before text externalization" time="0.009256079">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; externalizes string-content tool-result images without converting them to text files" time="0.00957108">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; lists summarized externalized tool results as transcript GC candidates" time="0.009782705">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; maintain() defers transcript GC until host-approved background maintenance" time="0.01461135">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; maintain() skips transcript GC when transcriptGcEnabled is false" time="0.012039423">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.ingest content extraction &gt; serializes recycled session writes by stable sessionKey" time="0.010469583">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine connection lifecycle &gt; keeps shared sqlite handle open while another engine instance is active" time="0.008551284">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; imports only active leaf-path messages from SessionManager context" time="0.011603713">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; is idempotent and does not duplicate already bootstrapped sessions" time="0.011980673">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; does not rewrite prior assistant transcript rows when bootstrap re-instantiates a conversation" time="0.015374395">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; keeps fresh tool-only rows after dropping a replayed assistant prefix" time="0.015639938">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; keeps legitimate repeated assistant text when the ordering does not match a prior replay" time="0.015056727">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; keeps the replay flood guard active for user-leading append-only replay batches" time="0.015363478">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; skips reopening the transcript when checkpoint stats match" time="0.010249541">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; preserves ordinary bootstrap behavior when no checkpoint exists" time="0.009248912">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; preserves existing conversation data when the session file rotates" time="0.014663851">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; preserves conversation history when the session file rotates across a stable sessionKey" time="0.01158663">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; rotates to a fresh conversation when a stable sessionKey resumes on a new transcript after the old file disappears" time="0.011286878">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; rotates before assemble when a stable sessionKey points at a pruned transcript" time="0.01039875">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; preserves the active conversation when the tracked transcript stat fails for a non-missing reason" time="0.011624796">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; does not reapply bootstrapMaxTokens after session file rotation" time="0.013632471">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; rotates the current transcript in place without replacing the conversation" time="0.014380141">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; summarizes raw context outside the fresh tail before rotating the transcript" time="0.046622853">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; records rotate summary auth failures in the compaction circuit breaker" time="0.012326549">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; scopes rotate summarization spend guards per session" time="0.017189027">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; returns rotate unavailable when summarization spend backoff opens" time="0.01079371">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; reconciles unimported transcript messages before rotate summary coverage" time="0.02268609">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; imports checkpoint-missing transcript history before rotate summary coverage" time="0.017949739">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; refuses to rotate when transcript reconciliation has no safe overlap" time="0.008763244">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; takes the rotate backup after covering transcript-only rows and before rewrite" time="0.026938858">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; uses stored compaction telemetry to summarize raw context before automatic rotate" time="0.017767154">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; waits for an in-flight managed transaction before backing up and rotating" time="0.048017984">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; reports rotate as unavailable when the session transcript cannot be read" time="0.010479625">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; defers oversized session-file rewrites from afterTurn runtime hooks" time="0.013613472">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; does not directly auto-rotate session files during background maintenance" time="0.010142457">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; does not rewrite oversized session files from maintain runtime checks" time="0.011162753">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; leaves below-threshold session files alone while logging the decision" time="0.009374537">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; skips ignored, stateless, and untracked runtime sessions" time="0.008863952">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; startup scan rotates oversized active conversations with checkpointed files" time="0.015779979">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; startup scan ignores stale active LCM conversations outside indexed candidates" time="0.017925738">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; startup scan logs one compact summary for quiet skips" time="0.01901266">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; startup batch creates one pre-rotation backup for multiple rotations" time="0.030320872">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; does not repeatedly rewrite oversized transcripts during runtime deferral" time="0.011904381">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; reconciles missing tail messages when JSONL advanced past LCM" time="0.010182832">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; imports appended tail messages without replaying full reconciliation" time="0.008975535">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; falls back to full reconciliation when append-only suffix overlaps persisted history" time="0.012465425">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; blocks bounded no-anchor imports that are mostly already persisted history" time="0.011279171">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; imports the new tail when a same-path shrink keeps an already-persisted prefix" time="0.011082711">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; keeps the append-only fast path after heartbeat pruning changes the DB frontier" time="0.014935435">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; ignores non-message envelopes in appended transcript tails without forcing reconcile" time="0.009338163">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; tolerates custom bootstrap sidecar entries in append-only suffixes" time="0.012107507">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; refreshes the bootstrap checkpoint after afterTurn heartbeat pruning" time="0.012954761">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; refreshes the bootstrap checkpoint after a normal afterTurn before the next append-only bootstrap" time="0.013153969">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; reconciles foreground transcript messages before assistant-only afterTurn deltas" time="0.010915918">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; falls back to full reconciliation when append-only checkpoint validation mismatches" time="0.011949131">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; reconciles missing structured tool-call tail when prior empty tool content exists" time="0.012588801">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; bootstraps a bounded same-path transcript epoch after the file shrinks" time="0.010050998">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; blocks same-path shrink import when raw ids belong to another active conversation" time="0.01134942">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; imports the full bounded same-path shrink epoch instead of trusting a stale externalized frontier" time="0.012093007">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; imports a full same-path shrink epoch when new content repeats an old frontier message" time="0.011546213">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; does not append JSONL when no overlapping anchor exists in LCM" time="0.008144408">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; does not advance the bootstrap checkpoint when reconcile aborts at the import cap" time="0.017650571">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; uses the live ingest path for initial bootstrap" time="0.010166499">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; externalizes oversized file blocks during first-time bootstrap and still reconciles later tail messages" time="0.011882798">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; externalizes inline images during first-time bootstrap" time="0.011004961">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; externalizes oversized tool results during first-time bootstrap" time="0.01118292">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; limits first-time bootstrap imports to the newest messages within bootstrapMaxTokens" time="0.009852206">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; bounds forked child bootstrap and assembly even when the host transcript contains a raw parent branch" time="0.01671215">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; drops an oversized singleton bootstrap tail that exceeds bootstrapMaxTokens" time="0.007299529">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; does not return raw fork history when a forked oversized bootstrap tail imports no messages" time="0.009157204">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; streams JSONL replay and skips malformed lines while keeping later messages" time="0.016163565">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; prepareSubagentSpawn resolves parent conversation by sessionKey before UUID backfill" time="0.007965157">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; skips full read when file is unchanged and conversation is already bootstrapped" time="0.012545133">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.bootstrap &gt; file-level cache guard allows full read when file changes" time="0.010585292">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; strips assistant prefill tails when no DB conversation exists" time="0.00674786">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; falls back when DB context clearly trails live context" time="0.00839645">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; assembles context from DB when coverage exists" time="0.007956324">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; adds raw prompt-recall matches when summary-covered history omits an exact memory key" time="0.011904672">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; adds prompt-recall sentence context before a requested key" time="0.009710497">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; skips prompt-recall matches when the cue would exceed the assembly budget" time="0.011890548">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; drops prompt-recall when volatile live input needs the remaining budget" time="0.016136648">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; does not add prompt-recall when volatile live input already mentions the requested key" time="0.0103865">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; drops prompt-recall before evicting assembled context for volatile live input" time="0.011964256">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; does not add prompt-recall when the active summary already carries the exact fact" time="0.010224291">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; uses summary-backed recall when the fact is outside a realistic fresh tail" time="0.016233689">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; does not add prompt-recall when an active summary already mentions the requested key" time="0.012385633">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; does not add prompt-recall when a newer raw tail already mentions the requested key" time="0.011102586">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; does not recall substring or secret-shaped identifiers" time="0.035163766">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; does not add prompt-recall snippets that include unrelated sensitive material" time="0.011753131">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; does not add prompt-recall snippets that include underscore provider tokens" time="0.009145954">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; continues prompt-recall search past filtered newer matches" time="0.012345883">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; recalls multiple requested identifiers from the same historical message" time="0.014150848">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; changes the projection fingerprint when prompt-recall cue content changes" time="0.013376304">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; bounds prompt-recall searches to four full-text identifier lookups" time="0.011685338">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; continues with assembled DB context when optional prompt recall lookup fails" time="0.010889502">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; logs the emitted context projection epoch" time="0.008835119">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; keeps projection epochs stable across raw tail growth and changes them for summaries" time="0.011390462">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; changes projection epochs when active focus state changes" time="0.011874423">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; respects token budget in assembled output" time="0.011369713">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; falls back to live messages if assembler throws" time="0.008374867">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; falls back to live context when assembled result has no user turns (cold-cache new session)" time="0.007494446">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; does not fall back when assembled result has user turns even if it ends with assistant" time="0.00992704">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; drops orphan tool results during assembled transcript repair" time="0.007365487">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; inserts synthetic tool results when fresh-tail tool calls have no result" time="0.008979536">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; drops older orphaned assistant tool calls instead of surfacing synthetic repair results" time="0.012223715">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; preserves non-tool content and matched tool calls when older assistant turns have stale orphaned calls" time="0.01153338">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; assemble forwards fresh-tail and prompt-aware options" time="0.00849145">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; bounds previous assembled prefix snapshots with LRU eviction" time="0.073793837">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; logs previous and current divergence message summaries when assembled prefixes change" time="0.00968233">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; adds compact overflow diagnostics to stressed assemble debug logs" time="0.008748702">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; repairs OpenAI function_call transcripts without dropping reasoning blocks" time="0.011198044">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; filters assistant messages with blank-text content during assembly" time="0.00881666">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; filters thinking-only assistant messages during assembly" time="0.011291004">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; rebuilds raw function_call blocks from stored columns when raw arguments are objects" time="0.007800073">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; does not emit assembly-specific system prompt guidance when no summaries exist" time="0.008023574">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; does not emit assembly-specific system prompt guidance when summaries are present" time="0.00892941">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble canonical path &gt; escapes summary XML text so persisted content cannot break out of the untrusted wrapper" time="0.008254075">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; normalizes tool_result blocks without inflating stored token accounting" time="0.00789899">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; preserves structured toolResult content via message_parts and assembler" time="0.008871994">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; does not leak OpenAI function tool payloads into stored message content fallbacks" time="0.007862823">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; preserves toolName through ingest-assemble round-trip for Gemini compatibility" time="0.007698739">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; preserves toolResult error state through ingest-assemble round-trip" time="0.009984165">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; preserves top-level tool metadata for string-content tool results" time="0.009711747">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; preserves top-level reasoning_content for assistant tool-call replay" time="0.010234999">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; reconstructs OpenAI reasoning and function call blocks when raw metadata is missing" time="0.010376375">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; skips unknown roles instead of storing them as assistant messages" time="0.006822735">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; uses explicit compact tokenBudget over legacy tokenBudget" time="0.008719451">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; ingests completed turn batches with ingestBatch" time="0.00959233">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; skips heartbeat turn batches in ingestBatch" time="0.009277995">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn ingests auto-compaction summary and new turn messages" time="0.011177504">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn deduplicates replayed history before prepending auto-compaction summary" time="0.016420858">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn skips new-message content already covered by auto-compaction summary" time="0.011730172">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn does not drop short messages just because they appear in auto-compaction summary" time="0.012069715">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn keeps a 24+ char user message that only collides as a substring of the summary narrative (F6)" time="0.010613334">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn drops a user message when the summary ends with that exact content (F6 anchored)" time="0.009145078">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn runs inline threshold compaction only after context threshold is crossed" time="0.010722001">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn runs inline threshold compaction when projected raw backlog crosses threshold" time="0.011094961">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn records deferred threshold debt when projected raw backlog crosses threshold" time="0.014106765">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn ignores raw leaf pressure below the context threshold" time="0.009074828">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn resolves tokenBudget from runtimeContext and forwards it as legacyParams" time="0.016119148">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn keeps the bootstrap checkpoint stale and records retry debt when inline threshold compaction fails" time="0.010153999">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn waits for inline threshold compaction before completing" time="0.03717319">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn falls back to the default token budget when no budget is provided" time="0.010877336">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn falls back to legacyCompactionParams when runtimeContext is missing" time="0.010949377">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn prefers runtimeContext when both runtimeContext and legacyCompactionParams are set" time="0.008345826">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn prefers runtimeContext.currentTokenCount for compaction decisions" time="0.009699705">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn falls back to local message token estimates when runtimeContext.currentTokenCount is absent" time="0.008110033">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn records deferred threshold debt instead of compacting inline by default" time="0.008506909">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn evaluates threshold compaction when ingestBatch is empty" time="0.008600826">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn skips compaction work when ingestBatch is empty AND conversation is below threshold" time="0.010083499">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn schedules a deferred threshold drain even when compactionTelemetry has no provider/model" time="0.009072745">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn caps the transcript-reconcile slow path to one full re-read per session+file (F7)" time="0.012695842">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn treats missing tracked transcripts as a cheap degraded path without full reread" time="0.028674573">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; seeds placeholder bootstrap_state when afterTurn stat-fail fallback runs (#649 follow-up)" time="0.014040347">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; bootstrap imports a bounded path-mismatched transcript with no old anchor as a new epoch" time="0.014748476">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; bootstrap preserves a long-lived checkpoint when a rotated transcript is only delivery audit traffic" time="0.0126413">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; bootstrap imports real path-mismatched user turns that mention config audit" time="0.011690922">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; bootstrap fails closed on ambiguous runtime rollover while the old transcript still exists" time="0.011518712">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; isolates cron runs that reuse a stable sessionKey while preserving prior runs" time="0.012426883">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; isolates cron sessionKey rollover during afterTurn transcript reconcile" time="0.036110853">
            <failure message="expected [] to deeply equal [ Array(2) ]" type="AssertionError">
AssertionError: expected [] to deeply equal [ Array(2) ]

- Expected
+ Received

- [
-   &quot;current afterTurn cron input&quot;,
-   &quot;current afterTurn cron output&quot;,
- ]
+ []

 ❯ test/engine.test.ts:11498:62
            </failure>
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn fails closed on ambiguous runtime rollover while the old transcript still exists" time="0.011450171">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; assemble falls back to live messages on ambiguous runtime rollover while the old transcript still exists" time="0.011238795">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn reconciles a path-mismatched no-anchor transcript before oversized delta dedup" time="0.015399811">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn preserves continuity when a path-mismatched transcript is only delivery audit traffic" time="0.015423437">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn archives a stale active conversation when the prior keyed transcript was pruned" time="0.012076632">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn skips assistant-only rollover when the replacement transcript is unreadable" time="0.012599884">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn bounds initial transcript imports to the bootstrap budget" time="0.009021369">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn skips persistence when full reread finds no anchor and imports nothing" time="0.012161882">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn imports a bounded same-path transcript epoch after the file shrinks" time="0.011855839">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn imports the full bounded same-path shrink epoch instead of trusting a stale externalized frontier" time="0.013026427">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn imports a full same-path shrink epoch when new content repeats an old frontier message" time="0.0124343">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn keeps the old checkpoint when a path-mismatched no-anchor import is capped" time="0.017036693">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn retries a capped reconcile when the transcript file changed with an append-only-ineligible suffix (F7)" time="0.01671565">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn drains deferred threshold debt in the background without cache telemetry" time="0.067267228">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; background deferred drain leaves threshold debt durable when the session is busy" time="0.010529459">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; maintain() leaves deferred threshold debt pending until the host opts in" time="0.010294541">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; maintain() consumes deferred threshold debt when the host opts in" time="0.009855581">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; maintain() clears stale legacy non-threshold debt when threshold no longer applies" time="0.008834369">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; maintain() revalidates legacy non-threshold debt as threshold work when still over threshold" time="0.008271408">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; maintain() keeps threshold debt pending when compaction fails" time="0.007642197">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; maintain() keeps threshold debt pending when the auth circuit breaker is open" time="0.009014078">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; maintain() backs off deferred threshold debt after non-auth compaction failures" time="0.010217416">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; maintain() keeps threshold debt pending when partial compaction remains over target" time="0.009905082">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; maintain() backs off after partial deferred compaction still exceeds target" time="0.010546667">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; maintain() stops model-backed deferred compaction at the summary call cap" time="0.009440038">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; compact() is not blocked by deferred-maintenance retry backoff" time="0.008526867">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; poor-reduction spend backoff blocks custom summarizers in the same compaction scope" time="0.01009229">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn refreshes threshold debt while retry backoff is active without compacting" time="0.012380216">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; assemble() leaves pending threshold debt for post-turn maintenance while under budget" time="0.00794724">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; assemble() uses bounded live context when pending maintenance is near budget" time="0.009548705">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; assemble() preserves leading system context when degraded live context is bounded" time="0.010987627">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; assemble() degrades to bounded live context if emergency compaction leaves debt pending" time="0.008779952">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; assemble() drains pending threshold debt as an emergency when already over budget" time="0.008855535">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; assemble() drains pending threshold debt when recorded runtime tokens are over budget" time="0.008761244">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; assemble() uses projected deferred pressure for emergency drain without passing it as observed tokens" time="0.007609781">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; assemble() does not wait for the session queue when deferred threshold debt is not urgent" time="0.010636334">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; assemble() waits for the session queue before emergency deferred threshold compaction" time="0.01003579">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; assemble() degrades instead of spending during active deferred retry backoff" time="0.009229204">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; maintain() uses the stricter current token budget for deferred threshold debt" time="0.00825345">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn persists prompt-cache telemetry for hot sessions" time="0.012673759">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn prefers runtime prompt tokens over transcript estimates for compaction decisions" time="0.00897962">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn skips compaction when ingest fails" time="0.009649331">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn prunes heartbeat-shaped ACK turns before compaction even without the heartbeat flag" time="0.010568042">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine fidelity and token budget &gt; afterTurn heartbeat flag skips non-empty transcript imports" time="0.009076245">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine afterTurn dedup guard &gt; ingests all messages when no prior conversation exists (new session)" time="0.008690744">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine afterTurn dedup guard &gt; does not persist custom transcript context as assistant messages" time="0.009200287">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine afterTurn dedup guard &gt; ingests all genuinely new messages (normal afterTurn, no restart)" time="0.012300424">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine afterTurn dedup guard &gt; skips all duplicates when gateway restart replays full history" time="0.010594543">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine afterTurn dedup guard &gt; deduplicates old messages but ingests new ones after restart" time="0.010847418">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine afterTurn dedup guard &gt; deduplicates replay when runtime sessionId changes but stable sessionKey continues" time="0.010015831">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine afterTurn dedup guard &gt; handles empty batch after slicing" time="0.01002954">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine afterTurn dedup guard &gt; handles repeated identical content (e.g. empty tool results) with occurrence counting" time="0.012108173">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine afterTurn dedup guard &gt; skips fully replayed suffix batches when the stored prefix is absent" time="0.010182832">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine afterTurn dedup guard &gt; uses the actual stored tail for oversized single-message replays" time="0.009502663">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine afterTurn dedup guard &gt; does not treat a one-message terminal match as a fully replayed batch" time="0.011472337">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine afterTurn dedup guard &gt; ingests single genuinely new message without dedup interference" time="0.011826339">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine afterTurn dedup guard &gt; fails closed for oversized no-overlap afterTurn batches" time="0.01002129">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine afterTurn dedup guard &gt; preserves a legitimate repeated first new message" time="0.011273212">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine compaction telemetry &gt; does not feed engine-ingested reasoning parts into compaction summarizer input" time="0.012363299">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine compaction telemetry &gt; does not feed top-level reasoning_content into compaction summarizer input" time="0.010718626">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine compaction telemetry &gt; does not feed redacted-thinking-only ingested parts into compaction summarizer input" time="0.013588304">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine compaction telemetry &gt; does not append synthetic system messages for compaction passes" time="0.013265511">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine compaction telemetry &gt; passes injected-context strip tags into production compaction" time="0.013649221">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.compact token budget plumbing &gt; preserves explicit empty-string customInstructions overrides over config defaults" time="0.00925012">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.compact token budget plumbing &gt; supports openai-codex large-file summarization through runtime-owned auth" time="0.008686743">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.compact token budget plumbing &gt; caps model-backed large-file summarization calls per spend window" time="0.009344579">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.compact token budget plumbing &gt; passes context-engine runtime llm and session identity to compaction summaries" time="0.0105565">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.compact token budget plumbing &gt; forwards config customInstructions to large-file summarization" time="0.007657406">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.compact token budget plumbing &gt; fails when compact token budget is missing" time="0.007348113">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.compact token budget plumbing &gt; reads tokenBudget and currentTokenCount from runtimeContext" time="0.009613997">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.compact token budget plumbing &gt; forces one compaction round for manual compaction requests in runtimeContext" time="0.010991836">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.compact token budget plumbing &gt; prefers runtimeContext over legacyParams when both are provided" time="0.009236037">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.compact token budget plumbing &gt; accepts explicit token budget without falling back to defaults" time="0.007549572">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.compact token budget plumbing &gt; forces one compaction round for manual compaction requests" time="0.011066169">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.compact token budget plumbing &gt; uses threshold target for proactive threshold compaction mode" time="0.010220999">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.compact token budget plumbing &gt; passes currentTokenCount through to compaction evaluation and loop" time="0.008623243">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.compact token budget plumbing &gt; forces threshold sweeps to account for runtime prompt overhead" time="0.008801911">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.compact token budget plumbing &gt; forces threshold sweeps to account for projected raw backlog pressure" time="0.009250954">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.compact token budget plumbing &gt; does not clear threshold pressure when persisted tokens are under target but runtime tokens remain over" time="0.008327534">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.compact token budget plumbing &gt; reports already under target when compaction rounds are zero" time="0.00956158">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.compact token budget plumbing &gt; treats full-sweep compaction as already under target when tokensAfter is below budget" time="0.007780531">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.compact token budget plumbing &gt; reports threshold full-sweep compaction as incomplete when tokensAfter remains over target" time="0.00920187">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.compact token budget plumbing &gt; routes forced budget recovery through compactUntilUnder for the issue #268 overflow shape" time="0.008305367">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.compact token budget plumbing &gt; uses tokenBudget as currentTokens for forced recovery when observed tokens are unavailable" time="0.008273866">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble maxAssemblyTokenBudget cap &gt; caps token budget when maxAssemblyTokenBudget is set and runtime budget exceeds it" time="0.016703483">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble maxAssemblyTokenBudget cap &gt; uses full runtime budget when maxAssemblyTokenBudget is not set" time="0.013139719">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble maxAssemblyTokenBudget cap &gt; caps the 128k fallback when maxAssemblyTokenBudget is set and no runtime budget provided" time="0.019321536">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble maxAssemblyTokenBudget cap &gt; caps token budget in compact when maxAssemblyTokenBudget is set" time="0.010564792">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble maxAssemblyTokenBudget cap &gt; does not consume summary substring as coverage for volatile live inputs" time="0.008693493">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble maxAssemblyTokenBudget cap &gt; matches tool results without tool names against assembled unknown-name results" time="0.010900085">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble maxAssemblyTokenBudget cap &gt; appends suppressed fallback retry prompts that lack internal context markers" time="0.00988154">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble maxAssemblyTokenBudget cap &gt; evicts historical tool-call pairs together when volatile input forces trimming" time="0.014242474">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble maxAssemblyTokenBudget cap &gt; keeps raw and summary context scoped across three isolated cron runtimes" time="0.016491732">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble maxAssemblyTokenBudget cap &gt; does not import an archived cron run when assemble sees the runtime rollover first" time="0.011405795">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble maxAssemblyTokenBudget cap &gt; recognizes only an isolated cron session-key shape: agent:main:cron:job" time="0.012162132">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble maxAssemblyTokenBudget cap &gt; recognizes only an isolated cron session-key shape: agent:main:cron:job:run:123" time="0.013274262">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble maxAssemblyTokenBudget cap &gt; recognizes only an isolated cron session-key shape: agent:main:cron" time="0.011086419">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble maxAssemblyTokenBudget cap &gt; recognizes only an isolated cron session-key shape: agent:main:cronish:job" time="0.012292882">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble maxAssemblyTokenBudget cap &gt; recognizes only an isolated cron session-key shape: agent:main:subagent:cron:job" time="0.011583463">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble maxAssemblyTokenBudget cap &gt; recognizes only an isolated cron session-key shape: agent:main:main" time="0.010138832">
        </testcase>
        <testcase classname="test/engine.test.ts" name="LcmContextEngine.assemble maxAssemblyTokenBudget cap &gt; compacts each isolated cron run from only that run&apos;s transcript" time="0.020708541">
        </testcase>
    </testsuite>
    <testsuite name="test/lcm-tools.test.ts" timestamp="2026-09-04T01:10:45.627Z" hostname="da8877d4efee" tests="16" failures="1" errors="0" skipped="0" time="0.097613849">
        <testcase classname="test/lcm-tools.test.ts" name="LCM tools session scoping &gt; lcm_grep metadata explains focused FTS5 query construction" time="0.002751511">
        </testcase>
        <testcase classname="test/lcm-tools.test.ts" name="LCM tools session scoping &gt; lcm_grep rejects regex alternation in full-text mode before searching" time="0.002648469">
        </testcase>
        <testcase classname="test/lcm-tools.test.ts" name="LCM tools session scoping &gt; lcm_grep still forwards regex alternation in regex mode" time="0.056977687">
        </testcase>
        <testcase classname="test/lcm-tools.test.ts" name="LCM tools session scoping &gt; lcm_expand query mode infers conversationId from delegated grant" time="0.004071558">
        </testcase>
        <testcase classname="test/lcm-tools.test.ts" name="LCM tools session scoping &gt; lcm_grep forwards since/before and uses the configured timezone in text output" time="0.005013686">
        </testcase>
        <testcase classname="test/lcm-tools.test.ts" name="LCM tools session scoping &gt; lcm_grep forwards full-text sort mode and reports it in output" time="0.001403089">
        </testcase>
        <testcase classname="test/lcm-tools.test.ts" name="LCM tools session scoping &gt; lcm_grep resolves conversation scope via sessionKey continuity before sessionId lookup" time="0.000830878">
        </testcase>
        <testcase classname="test/lcm-tools.test.ts" name="LCM tools session scoping &gt; lcm_grep searches across a resolved session family" time="0.000887379">
        </testcase>
        <testcase classname="test/lcm-tools.test.ts" name="LCM tools session scoping &gt; supports grep-to-describe recovery for compacted summary matches" time="0.002664302">
        </testcase>
        <testcase classname="test/lcm-tools.test.ts" name="LCM tools session scoping &gt; lcm_grep keeps isolated cron sessionKey scope on the active run" time="0.013380803">
            <failure message="expected &quot;spy&quot; to be called with arguments: [ ObjectContaining{…} ][90m

Received: 

[1m  1st spy call:

[22m[2m  [[22m
[32m-   ObjectContaining {[90m
[31m+   {[90m
[31m+     &quot;before&quot;: undefined,[90m
[2m      &quot;conversationId&quot;: 42,[22m
[2m      &quot;conversationIds&quot;: [[22m
[2m        42,[22m
[31m+       21,[90m
[31m+       7,[90m
[2m      ],[22m
[31m+     &quot;limit&quot;: 50,[90m
[31m+     &quot;mode&quot;: &quot;regex&quot;,[90m
[31m+     &quot;query&quot;: &quot;deployment&quot;,[90m
[31m+     &quot;scope&quot;: &quot;both&quot;,[90m
[31m+     &quot;since&quot;: undefined,[90m
[31m+     &quot;sort&quot;: &quot;recency&quot;,[90m
[2m    },[22m
[2m  ][22m
[39m[90m

Number of calls: [1m1[22m
[39m" type="AssertionError">
AssertionError: expected &quot;spy&quot; to be called with arguments: [ ObjectContaining{…} ]

Received: 

  1st spy call:

  [
-   ObjectContaining {
+   {
+     &quot;before&quot;: undefined,
      &quot;conversationId&quot;: 42,
      &quot;conversationIds&quot;: [
        42,
+       21,
+       7,
      ],
+     &quot;limit&quot;: 50,
+     &quot;mode&quot;: &quot;regex&quot;,
+     &quot;query&quot;: &quot;deployment&quot;,
+     &quot;scope&quot;: &quot;both&quot;,
+     &quot;since&quot;: undefined,
+     &quot;sort&quot;: &quot;recency&quot;,
    },
  ]


Number of calls: 1

 ❯ test/lcm-tools.test.ts:553:28
            </failure>
        </testcase>
        <testcase classname="test/lcm-tools.test.ts" name="LCM tools session scoping &gt; lcm_grep rejects allConversations from a sub-agent without a delegated grant" time="0.000596252">
        </testcase>
        <testcase classname="test/lcm-tools.test.ts" name="LCM tools session scoping &gt; lcm_grep rejects allConversations when a sub-agent key is passed as sessionId" time="0.000328918">
        </testcase>
        <testcase classname="test/lcm-tools.test.ts" name="LCM tools session scoping &gt; lcm_grep scopes delegated allConversations to the granted conversation IDs" time="0.001445214">
        </testcase>
        <testcase classname="test/lcm-tools.test.ts" name="LCM tools session scoping &gt; lcm_grep rejects explicit foreign conversationId outside a delegated grant" time="0.000439418">
        </testcase>
        <testcase classname="test/lcm-tools.test.ts" name="LCM tools session scoping &gt; lcm_describe blocks cross-conversation lookup unless allConversations=true" time="0.002237801">
        </testcase>
        <testcase classname="test/lcm-tools.test.ts" name="LCM tools session scoping &gt; lcm_describe rejects allConversations results outside a delegated grant" time="0.000294626">
        </testcase>
    </testsuite>
</testsuites>
Updated 2 paths from 5db26da
SWE-rebench parser: parse_log_js_4
SWE-rebench results:
FAILED
