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

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Stack Overflow Blog
Stack Overflow Blog
云风的 BLOG
云风的 BLOG
G
Google Developers Blog
J
Java Code Geeks
C
Check Point Blog
Last Week in AI
Last Week in AI
Microsoft Azure Blog
Microsoft Azure Blog
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
Vercel News
Vercel News
The GitHub Blog
The GitHub Blog
L
LangChain Blog
有赞技术团队
有赞技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 司徒正美
IT之家
IT之家
Martin Fowler
Martin Fowler
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tailwind CSS Blog
U
Unit 42
Jina AI
Jina AI
Microsoft Security Blog
Microsoft Security Blog
I
InfoQ

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
test: tighten gateway auth surface assertions · openclaw/...
steipete · 2026-05-10 · via Recent Commits to openclaw:main

@@ -15,6 +15,15 @@ function evaluate(config: OpenClawConfig, env: NodeJS.ProcessEnv = EMPTY_ENV) {

1515

});

1616

}

171718+

function expectGatewayState(

19+

state: { active: boolean; hasSecretRef: boolean; reason: string },

20+

expected: { active: boolean; hasSecretRef: boolean; reason: string },

21+

) {

22+

expect(state.hasSecretRef).toBe(expected.hasSecretRef);

23+

expect(state.active).toBe(expected.active);

24+

expect(state.reason).toBe(expected.reason);

25+

}

26+1827

describe("evaluateGatewayAuthSurfaceStates", () => {

1928

it("marks gateway.auth.token active when token mode is explicit", () => {

2029

const states = evaluate({

@@ -26,7 +35,7 @@ describe("evaluateGatewayAuthSurfaceStates", () => {

2635

},

2736

} as OpenClawConfig);

283729-

expect(states["gateway.auth.token"]).toMatchObject({

38+

expectGatewayState(states["gateway.auth.token"], {

3039

hasSecretRef: true,

3140

active: true,

3241

reason: 'gateway.auth.mode is "token".',

@@ -46,7 +55,7 @@ describe("evaluateGatewayAuthSurfaceStates", () => {

4655

{ OPENCLAW_GATEWAY_TOKEN: "env-token" } as NodeJS.ProcessEnv,

4756

);

485749-

expect(states["gateway.auth.token"]).toMatchObject({

58+

expectGatewayState(states["gateway.auth.token"], {

5059

hasSecretRef: true,

5160

active: false,

5261

reason: "gateway token env var is configured.",

@@ -63,7 +72,7 @@ describe("evaluateGatewayAuthSurfaceStates", () => {

6372

},

6473

} as OpenClawConfig);

657466-

expect(states["gateway.auth.token"]).toMatchObject({

75+

expectGatewayState(states["gateway.auth.token"], {

6776

hasSecretRef: true,

6877

active: false,

6978

reason: 'gateway.auth.mode is "password".',

@@ -80,7 +89,7 @@ describe("evaluateGatewayAuthSurfaceStates", () => {

8089

},

8190

} as OpenClawConfig);

829183-

expect(states["gateway.auth.password"]).toMatchObject({

92+

expectGatewayState(states["gateway.auth.password"], {

8493

hasSecretRef: true,

8594

active: true,

8695

reason: 'gateway.auth.mode is "password".',

@@ -97,7 +106,7 @@ describe("evaluateGatewayAuthSurfaceStates", () => {

97106

},

98107

} as OpenClawConfig);

99108100-

expect(states["gateway.auth.password"]).toMatchObject({

109+

expectGatewayState(states["gateway.auth.password"], {

101110

hasSecretRef: true,

102111

active: true,

103112

reason: "no token source can win, so password auth can win.",

@@ -116,7 +125,7 @@ describe("evaluateGatewayAuthSurfaceStates", () => {

116125

{ OPENCLAW_GATEWAY_TOKEN: "env-token" } as NodeJS.ProcessEnv,

117126

);

118127119-

expect(states["gateway.auth.password"]).toMatchObject({

128+

expectGatewayState(states["gateway.auth.password"], {

120129

hasSecretRef: true,

121130

active: false,

122131

reason: "gateway token env var is configured.",

@@ -133,7 +142,7 @@ describe("evaluateGatewayAuthSurfaceStates", () => {

133142

},

134143

} as OpenClawConfig);

135144136-

expect(states["gateway.remote.token"]).toMatchObject({

145+

expectGatewayState(states["gateway.remote.token"], {

137146

hasSecretRef: true,

138147

active: true,

139148

reason: "local token auth can win and no env/auth token is configured.",

@@ -152,7 +161,7 @@ describe("evaluateGatewayAuthSurfaceStates", () => {

152161

},

153162

} as OpenClawConfig);

154163155-

expect(states["gateway.remote.token"]).toMatchObject({

164+

expectGatewayState(states["gateway.remote.token"], {

156165

hasSecretRef: true,

157166

active: false,

158167

reason: 'token auth cannot win with gateway.auth.mode="password".',

@@ -173,7 +182,7 @@ describe("evaluateGatewayAuthSurfaceStates", () => {

173182

},

174183

} as OpenClawConfig);

175184176-

expect(states["gateway.remote.token"]).toMatchObject({

185+

expectGatewayState(states["gateway.remote.token"], {

177186

hasSecretRef: true,

178187

active: false,

179188

reason: "gateway.auth.token is configured.",

@@ -208,7 +217,7 @@ describe("evaluateGatewayAuthSurfaceStates", () => {

208217

},

209218

} as OpenClawConfig);

210219211-

expect(states["gateway.remote.password"]).toMatchObject({

220+

expectGatewayState(states["gateway.remote.password"], {

212221

hasSecretRef: true,

213222

active: false,

214223

reason: 'password auth cannot win with gateway.auth.mode="token".',

@@ -228,7 +237,7 @@ describe("evaluateGatewayAuthSurfaceStates", () => {

228237

},

229238

} as OpenClawConfig);

230239231-

expect(states["gateway.remote.password"]).toMatchObject({

240+

expectGatewayState(states["gateway.remote.password"], {

232241

hasSecretRef: true,

233242

active: false,

234243

reason: "remote password fallback is not active.",