惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The Cloudflare Blog
小众软件
小众软件
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
Tailwind CSS Blog
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
博客园 - 司徒正美
V
Visual Studio Blog
G
Google Developers Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
月光博客
月光博客
aimingoo的专栏
aimingoo的专栏
博客园_首页
Blog — PlanetScale
Blog — PlanetScale
博客园 - 聂微东
S
SegmentFault 最新的问题
T
The Blog of Author Tim Ferriss
D
Docker
Vercel News
Vercel News
Recent Announcements
Recent Announcements
Last Week in AI
Last Week in AI
爱范儿
爱范儿
J
Java Code Geeks
大猫的无限游戏
大猫的无限游戏

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix: recover stale release-stability stalls and auth loop...
2026-05-18 · via Recent Commits to openclaw:main

@@ -11,6 +11,7 @@ import {

1111

import {

1212

getDiagnosticSessionState,

1313

isDiagnosticSessionStateCurrent,

14+

peekDiagnosticSessionState,

1415

} from "./diagnostic-session-state.js";

15161617

export type RecoverStuckSession = (

@@ -27,7 +28,7 @@ function emitSessionRecoveryRequested(params: {

2728

type: "session.recovery.requested",

2829

sessionId: params.request.sessionId,

2930

sessionKey: params.request.sessionKey,

30-

state: "processing",

31+

state: params.request.expectedState ?? "processing",

3132

stateGeneration: params.request.stateGeneration,

3233

ageMs: params.request.ageMs,

3334

queueDepth: params.request.queueDepth,

@@ -46,7 +47,7 @@ function emitSessionRecoveryCompleted(params: {

4647

type: "session.recovery.completed",

4748

sessionId: params.request.sessionId,

4849

sessionKey: params.request.sessionKey,

49-

state: "processing",

50+

state: params.request.expectedState ?? "processing",

5051

stateGeneration: params.request.stateGeneration,

5152

ageMs: params.request.ageMs,

5253

queueDepth: params.request.queueDepth,

@@ -75,6 +76,10 @@ function isRecoveryPromiseLike(

7576

);

7677

}

777879+

function recoveryOutcomeHasQueuedLaneWork(outcome: StuckSessionRecoveryOutcome): boolean {

80+

return outcome.status === "aborted" && (outcome.queuedCount ?? 0) > 0;

81+

}

82+7883

function applyRecoveryOutcomeToDiagnosticState(params: {

7984

request: StuckSessionRecoveryRequest;

8085

outcome: StuckSessionRecoveryOutcome | undefined;

@@ -86,14 +91,23 @@ function applyRecoveryOutcomeToDiagnosticState(params: {

8691

emitSessionRecoveryCompleted({ request: params.request, outcome: params.outcome });

8792

return;

8893

}

89-

if (

90-

!isDiagnosticSessionStateCurrent({

91-

sessionId: params.request.sessionId,

92-

sessionKey: params.request.sessionKey,

93-

generation: params.request.stateGeneration,

94-

state: "processing",

95-

})

96-

) {

94+

const expectedState = params.request.expectedState ?? "processing";

95+

const currentState = peekDiagnosticSessionState(params.request);

96+

const currentGeneration = currentState?.generation ?? 0;

97+

const requestGeneration = params.request.stateGeneration ?? 0;

98+

const stateIsCurrent =

99+

expectedState === "idle" &&

100+

params.request.stateGeneration !== undefined &&

101+

params.outcome.action === "abort_embedded_run"

102+

? currentState?.state === "idle" &&

103+

(currentGeneration === requestGeneration || currentGeneration === requestGeneration + 1)

104+

: isDiagnosticSessionStateCurrent({

105+

sessionId: params.request.sessionId,

106+

sessionKey: params.request.sessionKey,

107+

generation: params.request.stateGeneration,

108+

state: expectedState,

109+

});

110+

if (!stateIsCurrent) {

97111

emitSessionRecoveryCompleted({

98112

request: params.request,

99113

outcome: params.outcome,

@@ -108,9 +122,13 @@ function applyRecoveryOutcomeToDiagnosticState(params: {

108122

state.generation = (state.generation ?? 0) + 1;

109123

state.lastStuckWarnAgeMs = undefined;

110124

state.lastLongRunningWarnAgeMs = undefined;

125+

const preserveQueuedIdleWork =

126+

params.request.expectedState === "idle" && recoveryOutcomeHasQueuedLaneWork(params.outcome);

111127

state.queueDepth = recoveryOutcomeClearsQueuedSessionState(params.outcome)

112128

? 0

113-

: Math.max(0, state.queueDepth - 1);

129+

: preserveQueuedIdleWork

130+

? Math.max(state.queueDepth, params.request.queueDepth ?? 0)

131+

: Math.max(0, state.queueDepth - 1);

114132

emitDiagnosticEvent({

115133

type: "session.state",

116134

sessionId: state.sessionId,