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

推荐订阅源

T
Tailwind CSS Blog
MyScale Blog
MyScale Blog
博客园 - Franky
酷 壳 – CoolShell
酷 壳 – CoolShell
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
雷峰网
雷峰网
罗磊的独立博客
小众软件
小众软件
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
V2EX
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Cloudflare Blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - 【当耐特】
博客园 - 司徒正美
Last Week in AI
Last Week in AI
月光博客
月光博客
阮一峰的网络日志
阮一峰的网络日志
美团技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
量子位
宝玉的分享
宝玉的分享

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(microsoft-foundry): replace unsafe non-null assertion...
oliviareid-s · 2026-05-11 · via Recent Commits to openclaw:main

File tree

  • extensions/microsoft-foundry

Original file line numberDiff line numberDiff line change

@@ -56,6 +56,7 @@ Docs: https://docs.openclaw.ai

5656

- OpenAI Codex: surface browser OAuth and device-code login failures instead of treating failed logins as empty successful auth results. Refs #80363.

5757

- CLI agents: carry runtime-only current-turn sender/reply context into CLI model prompts while keeping prompt-build hook input and transcript text clean.

5858

- Control UI: keep workspace file presence checks from treating `fs-safe` stat helper failures as missing files, restoring Agents file status for existing Windows workspace files. Fixes #79953. Thanks @lovelefeng-glitch.

59+

- Microsoft Foundry: report an explicit error when the Azure subscription prompt returns an id that is not present in the enabled subscription list, instead of continuing from an unsafe subscription assertion. (#62742) Thanks @oliviareid-svg.

5960

- fix(matrix): gate name-based allowlist resolution [AI]. (#79007) Thanks @pgondhi987.

6061

- Slack: include the bot's own root/parent message in new thread sessions so in-thread replies reach the agent with the parent text the user is responding to, instead of only `reply_to_id` metadata. Fixes #79338. Thanks @sxxtony.

6162

- Docker: keep image builds on the source pnpm workspace policy so pnpm 11 can prune production dependencies without a Docker-only workspace rewrite.

Original file line numberDiff line numberDiff line change

@@ -98,7 +98,11 @@ export const entraIdAuthMethod: ProviderAuthMethod = {

9898

label: `${sub.name} (${sub.id})`,

9999

})),

100100

});

101-

selectedSub = subs.find((sub) => sub.id === selectedId)!;

101+

const match = subs.find((sub) => sub.id === selectedId);

102+

if (!match) {

103+

throw new Error(`Selected subscription not found: ${selectedId}`);

104+

}

105+

selectedSub = match;

102106

tenantId ??= selectedSub.tenantId;

103107

}

104108
Original file line numberDiff line numberDiff line change

@@ -306,6 +306,56 @@ describe("microsoft-foundry plugin", () => {

306306

expect(config.auth?.order?.["microsoft-foundry"]).toEqual(["microsoft-foundry:default"]);

307307

});

308308
309+

it("fails clearly when the selected Azure subscription is not in the enabled list", async () => {

310+

const provider = registerProvider();

311+

execFileSyncMock.mockImplementation((_file: string, args: string[]) => {

312+

const command = args.join(" ");

313+

if (command === "version --output none") {

314+

return "";

315+

}

316+

if (command === "account show --output json") {

317+

return JSON.stringify({

318+

id: "sub-one",

319+

name: "Subscription One",

320+

tenantId: "tenant-one",

321+

state: "Enabled",

322+

user: { name: "user@example.com" },

323+

});

324+

}

325+

if (command === "account list --output json --all") {

326+

return JSON.stringify([

327+

{

328+

id: "sub-one",

329+

name: "Subscription One",

330+

tenantId: "tenant-one",

331+

state: "Enabled",

332+

},

333+

{

334+

id: "sub-two",

335+

name: "Subscription Two",

336+

tenantId: "tenant-one",

337+

state: "Enabled",

338+

},

339+

]);

340+

}

341+

throw new Error(`unexpected az command: ${command}`);

342+

});

343+

const entraAuth = provider.auth.find((method: { id: string }) => method.id === "entra-id");

344+
345+

await expect(

346+

entraAuth?.run({

347+

config: {},

348+

agentDir: defaultFoundryAgentDir,

349+

opts: {},

350+

prompter: {

351+

confirm: vi.fn(async () => true),

352+

select: vi.fn(async () => "missing-subscription"),

353+

note: vi.fn(async () => undefined),

354+

},

355+

} as never),

356+

).rejects.toThrow("Selected subscription not found: missing-subscription");

357+

});

358+
309359

it("preserves the model-derived base URL for Entra runtime auth refresh", async () => {

310360

const provider = registerProvider();

311361

const prepareRuntimeAuth = requirePrepareRuntimeAuth(provider);