Repository navigation
Type LCM summary inputs and compression policy - #4351
ScriptedAlchemy with Copilot wants to merge 11 commits into
Conversation
|
Co-authored-by: ScriptedAlchemy <[email protected]>
Co-authored-by: ScriptedAlchemy <[email protected]>
abd3ded to
247a385
Compare
ScriptedAlchemy
left a comment
There was a problem hiding this comment.
Cross-referenced #4296, #4297, #4298, #4300 and #4305. The typed input/policy migration has one concrete outcome-preservation regression: the existing forced-overflow producer emits a successful response that the new take_outcome rejects. This needs correction before merging; the precise producer and retained transaction path are described inline. This finding is from source/caller tracing, not a completed native test run.
| reason: self.reason.clone(), | ||
| }) | ||
| } | ||
| (false, None, None) => Ok(LcmCompressionOutcome::Complete), |
There was a problem hiding this comment.
[P2] Preserve the valid critical-pressure completion outcome
This match rejects a response the existing compression producer intentionally emits: persist_and_replay_backlog_compression (compression.rs:948-960) returns status ok/best_effort, summary_request=None and retry_status=Some("critical_pressure_catch_up") after forced overflow recovery. take_outcome now treats that combination as invalid. lcm_compress_retained_page_guarded calls take_outcome before committing its transaction, so a retained request with forced-overflow pressure is refused/rolled back despite successful compression. The default convergence worker currently sets current_tokens=None, so this is specific to pressure-bearing requests. Represent the critical-pressure completed state explicitly or admit its existing retry marker while preserving wire fields, and add coverage for both ok and best_effort forced-overflow results through the typed conversion/retained entry point. This is part of #4298's requirement to preserve all existing outcomes.
There was a problem hiding this comment.
Implemented in e5aae67. The typed conversion accepts the valid critical-pressure completion for both statuses and preserves all wire fields. Added a registered retained-pressure recovery test that reopens the store and checks the committed summaries, plus a full response round-trip assertion. Formatting passes; leaving this thread open until native CI validates the new coverage.
ScriptedAlchemy
left a comment
There was a problem hiding this comment.
Pushed e5aae67 to address the pressure-recovery regression found in review. take_outcome() now accepts completed ok and best_effort responses carrying critical_pressure_catch_up, while malformed authoritative-summary states still fail. Added full wire-response round-trip coverage and a registered retained-pressure recovery regression that reopens the store and verifies summaries were durably committed for both statuses.
Pinned CI rustfmt and git diff --check pass. Native tests have not run locally because this environment exhausted memory on the repository's native dependency build; CI is the execution authority. Marked this PR ready for review because draft PRs explicitly skip the heavy native lane. Relevant coverage is in the LCM unit tests and session-runtime lcm_effects tests. This is an implementation update, not a merge or approval.
Summary
Motivation
The route envelope supported two input grammars and could silently reinterpret malformed extraction data as a route. The coordinated LCM changes remove that ambiguity and consolidate related policy and authority paths.
Changes
Providedcarries a route and optionalLcmExtractionResultdirectly; remove the envelope parser and migrate producers and fixtures.Test plan
releases.bazel.build.bazel build //...passes when the change crosses package boundariesChecklist
CHANGELOG.mdupdated (under[Unreleased]if no version bump).envfiles included