Repository navigation
Closed
Description
Priority and scope
P2 · medium compatibility risk · small/medium implementation. Source-audited on master 064973de6e32bb2f31475d65bac9d184094fa470 (2026-10-18). This is an input-contract simplification, not a change to summary selection, token accounting, retention, or authorization.
Evidence
LcmSummarizerMode::Providedin hermes.rs carries onlysummary_textandroute: Option<String>.split_summary_routein extraction.rs interprets a brace-delimited route as another JSON document containingrouteandpre_compaction_extraction. If decoding fails, it silently treats the entire document as a route string instead. A syntactically valid empty object takes the successful envelope path and loses the original route text.CompressionSummarizerAdapter::from_modereconstructs the typedPersistedSummaryInvocationafter this second decoding pass. Itsprovided_mode_selects_persisted_summary_and_splits_route_envelopetest explicitly constructs nested JSON as a string.- Real daemon producers in
lcm_effects.rspass actual summary routes through the same field. The persisted metadata behavior is covered incrates/tracedecay/tests/session_suite/lcm_compression/summarizer_modes.rs.
This overload maintains two input grammars and makes malformed extraction data indistinguishable from a successful opaque route. No observed production data loss or exploit is asserted; the ambiguity follows from the decoder branches.
Exact implementation instructions
- Give the provided-summary input explicit typed fields for the route and optional
LcmExtractionResult; reuse the existing type rather than inventing a parallel extraction DTO. Route must have one meaning after boundary decoding. - Pass those fields directly into
PersistedSummaryInvocation. RemoveLcmProvidedSummaryRouteEnvelopeandsplit_summary_routefrom the internal compression path. - Migrate every producer, including
DaemonLcmEffectService, host/bridge producers discovered by the caller audit, and integration fixtures. Search both the Rust symbol and the serializedpre_compaction_extractionkey. Do not assume the comment about a generated Hermes producer proves a current caller exists. - Determine whether the overloaded JSON-string shape actually shipped in a released host bundle or is consumed externally. If it did, contain the minimum required legacy normalization in the existing transport boundary, with explicit decoding failures; never propagate the overloaded string into the LCM domain. If it did not, change the input in place and delete the old grammar. Do not add a V2 contract merely because a type is versioned.
- Keep persisted summary-node metadata readable and preserve
not_requested,not_applicable, and the actual extraction content. This issue does not authorize dropping historical extraction results. - Regenerate any affected generated host/SDK contracts from their owning source; do not hand-edit outputs or introduce a new schema registry.
Required behavioral verification
- Plain route, no route, absent extraction, valid extraction, and Unicode/brace-containing route values round-trip with one meaning.
- Malformed extraction input is rejected or reported explicitly, never silently converted into a successful route.
- Valid supplied summaries persist identical text, route, extraction metadata, source range, and frontier effects.
- Empty-summary authoritative resolution, cancellation before commit, retained-source mismatch, and transaction rollback retain existing behavior.
- Run the affected LCM unit and session-suite targets through Bazel; resolve their exact labels from the existing BUILD files. A compile-only or zero-test result is not completion evidence.
Acceptance
- Internal provided-summary inputs no longer contain JSON serialized inside
route. - The internal heuristic parser and its duplicate envelope type are deleted.
- All real producers and tests use the same typed input.
- Any retained compatibility adapter is justified by shipped-wire evidence and exists only at ingress.
- Existing persisted data and failure/rollback semantics remain intact.
Distinct from #4228 (token budgets) and the completed ownership/copy concern in #1036. Review was static; no Rust tests were executed while filing this issue.
Reacted by Copilot
Metadata
Metadata
Assignees
Labels
No labels
Activity
ScriptedAlchemy commentedon Oct 19, 2026
Full-backlog execution: this is the single LCM implementation workstream for #4296, #4297, #4298, #4300 and #4305. Read all five issues and current callers first; they intentionally share hermes.rs, types.rs, lcm_effects.rs and lcm_authority.rs, so own them together rather than competing edits. Implement in dependency order with focused commits: explicit provided-summary route/extraction; remove independent Fake production policy with real Provided test fixtures; typed internal compression outcomes preserving public wire; concrete registered-store authority without test-invented absence; one shared eleven-field override value preserving flat JSON semantics. Retain public mounted authority ports, canonical storage, cancellation, deadlines, source-range/frontier CAS and persisted metadata. Any wire compatibility retained must be justified by released consumers, not imagined ones. Do not alter token-budget algorithms, broaden authority, reset databases, add generic frameworks or keep duplicate runtimes. Reuse existing Bazel/codegen targets and run affected LCM/session-runtime/session integration tests with nonzero counts; preserve field/null/unknown/duplicate behavior and failed-effect rollback. Coordinate with native runtime #3736 without changing its architectural direction. Inspect active PRs before duplicating work. Deliver real code and behavioral evidence in a reviewable PR linking the covered issues. Headers <=72 characters; no disabled tests, inflated timeouts or unsupported completion claims.