Repository navigation
perf(runtime): avoid scanning diagnostics for opening progress #1997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,6 +36,13 @@ async fn opened(reports: bool) -> dim_agent_runtime::Result<()> { | |
| gap: Duration::from_millis(60), | ||
| reports, | ||
| }); | ||
| if !reports { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The new sibling case covers filtering for a root-level sibling, and |
||
| root.plugin(Progressing { | ||
| steps: 6, | ||
| gap: Duration::from_millis(60), | ||
| reports: true, | ||
| }); | ||
| } | ||
| let result = wait_active( | ||
| &root, | ||
| std::slice::from_ref(&view), | ||
|
|
@@ -56,9 +63,8 @@ async fn an_opening_that_reports_progress_outlives_its_interval() { | |
| .expect("reported progress renews the interval"); | ||
| } | ||
|
|
||
| /// The same opening without reports ends at the interval. | ||
| #[tokio::test] | ||
| async fn an_opening_that_reports_nothing_times_out() { | ||
| async fn progress_in_a_sibling_does_not_renew_an_opening() { | ||
| let error = opened(false) | ||
| .await | ||
| .expect_err("an inactive opening must time out"); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new
cancellation_token().is_cancelled()guard is a caller-visible behavior change that the///above does not state. A live fiber whose generation was cancelled (rollback, restart, reload) still appears in diagnostics, so before this change itsopening_advancedcall emitted and could renew an inactivity interval; now it reports nothing. I agree with the guard because it matches A3's "Restarting the same row does not renew it", and the no-live-fiber sentence above remains true because a destroyed fiber yields a pre-cancelled token. The missing case is the cancelled generation. Failure scenario: a caller keeps reporting during teardown, when the row is still live, and now silently loses those reports with no hint in the contract that cancellation gates them. Fix: extend the sentence to say that a context whose generation was cancelled reports nothing. Not blocking.