gestalt-mobile 0.73.0 → 0.73.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2769,7 +2769,10 @@ export class AutopilotCoordinator {
|
|
|
2769
2769
|
const executor = state && plan
|
|
2770
2770
|
? this.currentExecutor(sessionId, plan.plan, state.consecutiveNoProgress, state.executor)
|
|
2771
2771
|
: undefined;
|
|
2772
|
-
const fence = state &&
|
|
2772
|
+
const fence = state &&
|
|
2773
|
+
plan &&
|
|
2774
|
+
!this.deps.session(sessionId)?.activeTurnId &&
|
|
2775
|
+
!this.deps.pendingTurn?.(sessionId)
|
|
2773
2776
|
? {
|
|
2774
2777
|
generation: state.generation,
|
|
2775
2778
|
identity: plan.identity,
|
|
@@ -2795,11 +2798,6 @@ export class AutopilotCoordinator {
|
|
|
2795
2798
|
this.enqueue(sessionId, async () => {
|
|
2796
2799
|
const current = this.deps.store.find(sessionId);
|
|
2797
2800
|
const currentPlan = this.deps.plan(sessionId);
|
|
2798
|
-
const currentChild = fence.executorThreadId
|
|
2799
|
-
? this.deps
|
|
2800
|
-
.activity(sessionId)
|
|
2801
|
-
?.subagents.find((child) => (child.threadId ?? child.id) === fence.executorThreadId)
|
|
2802
|
-
: null;
|
|
2803
2801
|
if (!current?.requestedEnabled ||
|
|
2804
2802
|
this.deps.pendingInteraction(sessionId) ||
|
|
2805
2803
|
current.generation !== fence.generation ||
|
|
@@ -2810,13 +2808,20 @@ export class AutopilotCoordinator {
|
|
|
2810
2808
|
!currentPlan ||
|
|
2811
2809
|
fingerprint(currentPlan.plan) !== fence.fingerprint ||
|
|
2812
2810
|
Boolean(this.deps.session(sessionId)?.activeTurnId) ||
|
|
2813
|
-
(
|
|
2814
|
-
(currentChild?.canonicalPosition !== fence.canonicalPosition ||
|
|
2815
|
-
(currentChild.continuationGeneration ?? 1) !== fence.executorGeneration))) {
|
|
2811
|
+
this.deps.pendingTurn?.(sessionId)) {
|
|
2816
2812
|
this.audit(sessionId, 'autopilot.executor-refresh-stale', { fence });
|
|
2817
2813
|
return;
|
|
2818
2814
|
}
|
|
2815
|
+
// Refresh restores evidence, not executor authority. A disconnected
|
|
2816
|
+
// roster may omit or replace the armed child; requiring that stale
|
|
2817
|
+
// identity here prevents the read that could recover it. Execution
|
|
2818
|
+
// is fenced independently against the refreshed state below.
|
|
2819
2819
|
await this.deps.executorController?.refresh(sessionId);
|
|
2820
|
+
const refreshed = this.deps.store.find(sessionId);
|
|
2821
|
+
if (refreshed && this.decision(sessionId, refreshed).kind === 'reconcile') {
|
|
2822
|
+
this.evaluate(sessionId);
|
|
2823
|
+
return;
|
|
2824
|
+
}
|
|
2820
2825
|
if (!(await this.enforceSupervisedLifecycle(sessionId, 'processObserved')))
|
|
2821
2826
|
this.evaluate(sessionId);
|
|
2822
2827
|
});
|