Repository navigation
fix: keep host-lifecycle summarization failures quiet and isolate test logs - #1245
Merged
Merged
Conversation
…t logs
Host runtime retirement ("Plugin inventory has retired", "Async work
scope is closed") was logged as two error lines per summarizer call. The
summarizer now rethrows it silently and the pending-compaction boundary
logs one warning naming the cause; the existing retained-work behavior is
unchanged. vitest sets LCM_LOG_FILE to a per-run temp file so test runs
never append to the production /tmp/openclaw rolling log.
jalehman
force-pushed
the
fix/stale-runtime-llm
branch
from
October 11, 2026 05:48
55fe011 to
f5b60ac
Compare
This was referenced Oct 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
When a summarizer call fails because the OpenClaw host runtime retired (
Plugin inventory has retired; begin a new plugin operation.orAsync work scope is closed), Lossless now logs one warning instead of two error lines. The pending summaries and compaction debt stay queued for the next drain, as before. The vitest suite also stops writing to the production/tmp/openclaw/lossless-claw-<date>.log.Why
The root cause of the retired-inventory failure is in the host, not in Lossless. The context engine replays a stale async-context snapshot that was captured when its factory resources were created.
api.runtime.llmthen resolves model metadata against the retired plugin cache. openclaw/openclaw#168916 fixes this (it closes openclaw/openclaw#156026). For related background on Lossless's handling of host lifecycle errors, see the closed #1195.On the Lossless side, two things made this failure hard to triage.
First, each interrupted summarization was logged as two
errorlines:[lcm] runtime.llm.complete error: …and the bare message. Neither line said that the work was kept. Live evidence from 2026-10-08 (sanitized):[reload] plugin metadata changed with identical config; applying plugin lifecycle→Plugin replacement applied: knowledge. This was an unrelated plugin.[lcm] runtime.llm.complete error: Plugin inventory has retired; begin a new plugin operation.→maintain: deferred compaction skipped ... reason=Plugin inventory has retired→background deferred compaction done ... changed=false. The debt was retained and then waited underdeferred compaction backoff active.Second, local vitest runs wrote to the same production rolling log. On 2026-10-08 that log held about 700 synthetic errors from tests: 624 "inventory retired", 39 "model override not allowlisted", and 39 "Async work scope is closed". These were mixed in with the real event above.
Changes
runtime.llm.completehost-lifecycle rejections are classified without an error loglifecycleInterruptedLCM_LOG_FILEto a per-run temp file, with a sandbox assertionThe retained-work behavior is unchanged. The pending worker already releases the node claim untouched, and the debt row stays pending under the existing backoff. No retry loops or timers were added.
Testing
npm run typechecknpm run buildnpm test(run twice): 135 files and 2122 tests passed both timestest/index-runtime-llm-complete.test.tscovers both host-lifecycle messages. It checks that a backgroundmaintain()keeps the debt pending, leaves the nodesplannedwithretryCount=0and no lease, writes no summaries, logs exactly one warning, and logs no error. The test fails onmain.vitest, the test session IDs,/tmp/lossless-claw-*DB paths, or the lifecycle and allowlist messages). The test logs land in<vitest HOME>/logs/lossless-claw-test.log.