-
Notifications
You must be signed in to change notification settings - Fork 7
fix(feedback): answer the first advisory cycle after a reopen #2228
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 |
|---|---|---|
|
|
@@ -100,6 +100,7 @@ use tracedecay_daemon_service::{ | |
| BoundedHookOrchestratorV1, ConfigurationRuntimeRefreshFuture, ConfigurationRuntimeRefreshPort, | ||
| DaemonAdvisoryCycleInvocationFuture, DaemonAdvisoryCycleInvocationOwner, | ||
| DaemonAdvisoryCycleInvocationPort, DaemonAdvisoryCycleInvocationRequest, | ||
| DaemonAdvisoryCycleMountFuture, DaemonAdvisoryCycleMountV1, | ||
| DaemonFeedbackProximityInvocationFuture, DaemonFeedbackProximityInvocationRequest, | ||
| HookOrchestrationRequestV1, HookOrchestrationTriggerV1, HookOrchestrationWorkOutcomeV1, | ||
| advisory_cycle_invocation_result, daemon_operation_event_authority, | ||
|
|
@@ -2085,6 +2086,28 @@ impl DaemonAdvisoryCycleInvocationPort for ProjectOpenProximityReadOwnerV1 { | |
| }) | ||
| } | ||
|
|
||
| /// With a ready sealed generation the deferred mount is already upgrading | ||
| /// this owner, so a request waits for that publication instead of taking | ||
| /// the retryable warming answer. | ||
| // ponytail: a deferred mount that fails terminally leaves this owner in | ||
| // place, so such a request waits out its own deadline before the warming | ||
| // answer; surfacing the terminal mount failure here would end it early. | ||
| fn mount(&self) -> DaemonAdvisoryCycleMountFuture<'_> { | ||
| Box::pin(async move { | ||
| if code_index_disabled_for_scope(&self.code_index_schedulers, &self.scope) { | ||
| return DaemonAdvisoryCycleMountV1::Answers; | ||
| } | ||
| match self | ||
| .code_index_schedulers | ||
| .latest_feedback_generation_for_scope(&self.project_root, &self.scope) | ||
| .await | ||
| { | ||
| Some(_) => DaemonAdvisoryCycleMountV1::Mounting, | ||
| None => DaemonAdvisoryCycleMountV1::Answers, | ||
|
Comment on lines
+2100
to
+2106
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.
When AGENTS.md reference: AGENTS.md:L189-L190 Useful? React with 👍 / 👎. |
||
| } | ||
| }) | ||
| } | ||
|
|
||
| fn invoke_proximity( | ||
| &self, | ||
| request: DaemonFeedbackProximityInvocationRequest, | ||
|
|
||
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.
When an advisory-cycle payload arrives with an already-cancelled
CancellationContextwhile the owner is mounting or publication is warming, this newly added wait runs beforeexecute_feedback_advisory_cycleperforms its cancellation check. The request can therefore remain in flight until owner publication or its deadline instead of immediately returningcancelled_before_admission; check the payload cancellation before entering this wait or make the wait cancellation-aware.AGENTS.md reference: AGENTS.md:L201-L203
Useful? React with 👍 / 👎.