Repository navigation
fix(microsoft-foundry): bound az subprocess lifetime on exec timeout - #110434
Conversation
|
Codex review: passed. Reviewed August 25, 2026, 10:45 PM ET / August 26, 2026, 02:45 UTC. ClawSweeper reviewWhat this changesThe PR makes the Microsoft Foundry plugin force-kill a synchronous Azure CLI child when its 30-second timeout expires and asserts that option in the plugin test. Regression provenancePossible regression — probable (reviewed change; reproduction). No predecessor PR is attributed. Merge readinessKeep this PR open for its armed automerge path: the one-line owner-boundary repair is coherent and no patch defect was found, but exact-head CI is still in progress. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherMicrosoft Foundry uses Azure CLI during provider setup, account discovery, subscription selection, and synchronous token retrieval. Those probes return provider state to the plugin, while its asynchronous token path uses OpenClaw’s shared process runtime. flowchart LR
A[Provider setup or token request] --> B[Microsoft Foundry plugin]
B --> C[Synchronous Azure CLI probe]
C --> D[Thirty-second timeout]
D --> E[Terminal child stop]
E --> F[Provider result or timeout error]
B --> G[Async Azure CLI probe]
G --> H[Shared process runtime]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +1, Tests +11. Total +12 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the terminal timeout at the Microsoft Foundry CLI wrapper, retain the focused option regression test, and let exact-head CI complete before the existing automerge path lands it. Do we have a high-confidence way to reproduce the issue? Yes, source and the PR’s terminal evidence establish the path: a synchronous Azure CLI child ignores the default termination signal after the existing timeout. The contributor reports an after-fix SIGTERM-immune-child run returning ETIMEDOUT within the configured deadline. Is this the best way to solve the issue? Yes. The repair changes the timeout policy at the sole synchronous Azure CLI owner, while the async sibling already has force-kill escalation through the shared process runtime. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 72adefbca06c. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (14 earlier review cycles; latest 8 shown)
|
ClawSweeper P1 clarification:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Real
|
| Layer | Where | What |
|---|---|---|
| Mock contract | index.test.ts:591 |
execFileSync receives killSignal: "SIGKILL" |
| Node API behavioral | index.test.ts:604 |
Real execFileSync + SIGKILL terminates SIGTERM-immune Node child |
runExec behavioral |
index.test.ts:622 |
Real runExec two-phase kill terminates SIGTERM-immune Node child |
| Changed-helper end-to-end | Terminal above | execAz with fake az stand-in returns after 30s timeout |
|
@clawsweeper re-review |
|
@clawsweeper automerge |
|
🦞🧹
Draft PRs stay fix-only until GitHub marks them ready for review. Pause with Automerge progress:
Re-review progress:
|
|
🦞✅ Source: Why human review is needed: What the maintainer can do as a next step: I added |
|
@clawsweeper approve |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
ee3144c to
6e8de28
Compare
|
Refreshed this contributor fix onto current The existing 30-second synchronous Azure CLI timeout is not a hard deadline: Node waits for the child to exit after sending its default
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
6e8de28 to
762c6af
Compare
|
The unrelated release-validation lint regression is now repaired on All 93 Microsoft Foundry tests pass again, direct lint now passes for both changed provider files and the formerly failing release-validation declaration, and fresh independent structured review reports no actionable findings. The real |
|
Merged via squash.
|
What Problem This Solves
execAz()uses synchronousexecFileSync()with a 30-second timeout. Node sends the configured kill signal when that timeout expires. With the defaultSIGTERM, a child that ignores termination can keep the synchronous gateway path blocked after the intended deadline.Why This Change Was Made
Set
killSignal: "SIGKILL"on the existing synchronous Azure CLI invocation. This preserves the command, timeout, shell, encoding, return value, and error behavior while making the existing deadline terminal.The asynchronous sibling already uses the shared process runtime and its two-phase termination policy, so it does not need the synchronous option.
Evidence Map
execAz()inextensions/microsoft-foundry/cli.tsexecFileSync()honorstimeoutwith the configuredkillSignalexecAzAsync()remains on the shared async process runtimeSIGKILLinside the boundgit diff --checkpassedRepair Shape
User Impact
Timed-out synchronous
azcommands no longer keep the gateway thread blocked because the child ignoredSIGTERM. Successful commands are unchanged.