You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
context_flow: product-summary compaction fails with 'unknown session' under load #2265
context_flow::product_summary::compaction_chunks_images_as_markers_and_legacy_screenshots_as_text fails with
panicked at crates/dim-agent-capabilities/tests/context_flow/product_summary.rs:67:66:
called `Result::unwrap()` on an `Err` value: Storage("unknown session e03eebd0-…")
compact_now asks the branch to compact and polls chain_events for the command's fact for ten seconds; the session it polls is reported unknown before the fact appears.
Evidence
main push 4a98a5a9, verify (macos) (run 45952299852): this test failed and took ci-ok with it.
Both platforms, different heads, same message: not platform-specific.
Where to look
The test polls outside any subscription it holds; a Session that is closed, unloaded or re-registered while the command is pending turns the lookup into unknown session instead of the fact. The ten-second wait and the 10 ms poll also mean a loaded runner shifts when the lookup happens relative to whatever ends the session.
Related: #2216 and #2219 audit poll-based waits in this suite.
Acceptance
The flow passes on a loaded runner on both platforms.
If the session can legitimately end before the command settles, the test asserts that outcome instead of polling into unknown session.
Same run, second symptom, possibly the same root: compaction::configured_compaction_uses_the_window_declared_in_the_model_file (crates/dim-app-server/tests/transport_flow.rs:556) failed on the same verify (macos) job with
{"jsonrpc":"2.0","id":18,"error":{"code":-32000,"message":"Service reloaded; the operation may already have committed. Read the current state before retrying","data":{"appError":"operation_interrupted"}}}
Both are a compaction request racing the instance/service lifecycle — one loses its session, the other its row — on a loaded macOS runner. run 45955339899.
Diagnostics merged in #2267 (verified green: verify (linux) passed, no fault reproduced on that run).
The next failure of compaction_chunks_images_as_markers_and_legacy_screenshots_as_text will now carry close: Ok/Err(...) from Session::closed instead of only unknown session, which names the fault that closed the session. The transport half no longer treats the documented operation_interrupted answer as a failure: history re-reads it up to five times.
The Session-close diagnostic added in #2267 captured the same History fault in both Linux attempts on #2289 at 832293268.
component: History
message: Compaction cut is outside the fixed context history.
The test requests compaction and polls for its completion event. When that poll reports unknown session, the Session close result contains the History error above. The remaining question is how the selected retention point fell outside the history available to the projection. First Linux run · Linux rerun
I also ran context_flow::product_summary::compaction_chunks_images_as_markers_and_legacy_screenshots_as_text 128 times per checkout, with eight isolated test processes in parallel. Both checkouts produced the same History error.
Closed by #2292 (merged 05:31Z). Materialized replay now resolves a compaction cut omitted by context filters before replaying it, so the context_flow Session no longer closes with the History fault.
Activity
eric8810 commentedon Nov 27, 2026
Same run, second symptom, possibly the same root:
compaction::configured_compaction_uses_the_window_declared_in_the_model_file(crates/dim-app-server/tests/transport_flow.rs:556) failed on the sameverify (macos)job withBoth are a compaction request racing the instance/service lifecycle — one loses its session, the other its row — on a loaded macOS runner. run 45955339899.
eric8810 commentedon Nov 27, 2026
Diagnostics merged in #2267 (verified green:
verify (linux)passed, no fault reproduced on that run).The next failure of
compaction_chunks_images_as_markers_and_legacy_screenshots_as_textwill now carryclose: Ok/Err(...)fromSession::closedinstead of onlyunknown session, which names the fault that closed the session. The transport half no longer treats the documentedoperation_interruptedanswer as a failure:historyre-reads it up to five times.test(app-server,runtime): retry an interrupted read and name a closed…
eric8810 commentedon Nov 28, 2026
The Session-close diagnostic added in #2267 captured the same History fault in both Linux attempts on #2289 at
832293268.The test requests compaction and polls for its completion event. When that poll reports
unknown session, the Session close result contains the History error above. The remaining question is how the selected retention point fell outside the history available to the projection. First Linux run · Linux rerunI also ran
context_flow::product_summary::compaction_chunks_images_as_markers_and_legacy_screenshots_as_text128 times per checkout, with eight isolated test processes in parallel. Both checkouts produced the same History error.74b610501832293268eric8810 commentedon Nov 28, 2026
Closed by #2292 (merged 05:31Z). Materialized replay now resolves a compaction cut omitted by context filters before replaying it, so the context_flow Session no longer closes with the History fault.