chore: add lcm lifecycle instrumentation logs#345
Merged
Conversation
debd492 to
c706865
Compare
Add lifecycle timing logs for LCM engine init, migrations, bootstrap, maintain, assemble, and afterTurn so live OpenClaw traces can show where latency is actually spent. Route migration step timing through the same logger and keep the startup-banner test focused on banner deduping now that the lifecycle markers emit at info level. Regeneration-Prompt: | Investigate an LCM latency memo claim about process-global startup work and add instrumentation that can separate one-time engine initialization from per-turn overhead in a live OpenClaw deployment. Use the project's existing logging conventions rather than introducing a new sink. Measure engine initialization, migration steps, queue wait time, bootstrap, reconcileSessionTail outcomes, maintain, assemble, and afterTurn so the logs can bracket the full lifecycle for a real message. Promote the new markers to info level if the gateway's debug path is not reliably visible in production logs, and update the affected registration test so it still verifies startup-banner deduping without assuming the full info log set is limited to the banner lines.
c706865 to
82d6b7a
Compare
Preserve the migration ordering needed to drop a stale summaries_fts_cjk table before standalone FTS probing runs. This keeps malformed legacy CJK shadow tables from poisoning the self-heal probe path during migration. Regeneration-Prompt: | After rebasing the LCM lifecycle instrumentation branch onto a newer main, rerun the focused migration tests. If the test covering stale summaries_fts_cjk cleanup fails again, restore the ordering that removes the stale CJK table before other standalone FTS probing occurs. Keep the newer standalone FTS self-heal helpers and instrumentation intact; only correct the ordering regression so malformed legacy CJK tables cannot break the migration probe path.
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
Add lifecycle instrumentation to
lossless-clawso live OpenClaw traces show where time is spent during engine initialization and per-turn context handling.Why
We were investigating ongoing message latency and needed enough visibility to separate one-time startup work from per-message overhead. The existing logs were not sufficient to tell whether LCM was responsible for the slow path.
Changes
Testing
npx vitest run test/session-operation-queues.test.ts test/plugin-config-registration.test.ts test/migration.test.ts