fix(tuner): keep a running composition across a report-axis move - #697
Merged
Merged
Conversation
The tuner's field-set composition died a few minutes in, without an error, a summary line or a "stopped" caption: the progress and spinner vanished and the button looked never pressed. The Analytics window's report-axis observer retires every in-flight read identity when the axis changes - and it also invalidated the tuner, which cancelled the running search and reset its state to Idle. The axis moves on events unrelated to the search (a core's feed respawning, a time-offset bucket change, a newly connected core), and each later beam depth takes longer than the last, so the kill almost always landed around step 5-6. The observer now takes an axis-only path: read identities and drafts are still retired, but a live composition is kept, and its finished result is marked "report time axis shifted" in a warning tone. The run stays valid - its rows are snapshotted at start, and the shift is at most a 15-minute offset bucket against a weeks-long fitting window; a report generation advance, a larger change, already does not cancel it. The search never held a read-cancellation token, so keeping it raises no SQLite interrupt and no false read failure. A scope, period or field change still stops the search as before.
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 & why
The tuner's field-set composition ("Подобрать состав") died a few minutes in without an error,
a summary line or a "stopped" caption — the progress and spinner vanished and the button looked
never pressed.
Root cause: the Analytics window's report-axis observer retires every in-flight read identity
when the axis changes, and it also invalidated the tuner — which cancelled the running search
and reset its state to Idle. The axis moves on events unrelated to the search (a core's feed
respawning, a time-offset bucket change, a newly connected core), and each deeper beam step
takes longer, so the kill almost always landed around step 5-6.
Fix: the observer takes an axis-only path. Read identities and drafts are still retired, but a
live composition is kept, and its finished result is marked "report time axis shifted" in a
warning tone. The search never held a read-cancellation token, so keeping it raises no SQLite
interrupt and no false read failure. A scope, period or field change still stops the search.
How to verify
cargo test -p moon-ui-gpui --bin moonterminal analytics::tuner(135 pass) and--test theme_contract(360 pass); the new tests are mutation-proved.