Skip to content

fix(infer): cancel interrupted image descriptions - #194391

Merged
vincentkoc merged 1 commit into
mainfrom
fix/infer-image-description-cancellation-20261107
Nov 7, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/infer-image-description-cancellation-20261107

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

infer image describe and describe-many leave provider work running after interruption; a failed primary can also start another model after cancellation.

Related: #194251

User Impact

Interrupted image descriptions stop promptly, preserve the interruption exit status, and produce no late output. Normal descriptions and configured fallback behavior are preserved.

Why This Change Was Made

Carry the existing invocation execution context into image understanding and its existing model-fallback owner. The repair adds 19 net production lines. The four regressions reuse existing fixtures at the CLI, fallback and provider boundaries; a separate allocation funds exactly their 64 net test lines.

Evidence

  • Real public CLI, synthetic PNG, and a held loopback OpenAI-compatible request: the base ends in SIGKILL after 2,020.1 ms, with HTTP closing after 2,017.3 ms. The repaired tree exits 130 in 41.3 ms and closes HTTP after 1.0 ms. The harness never forced either process to exit. Uninterrupted controls succeed on both trees.
  • Four regressions are red on base d1be6e243ccd850329d93567cb3ffd71e0ff837d, including an unwanted second fallback call. The complete CLI suite (114 tests) and media-runtime suite pass together in 52.77 s; the final four regressions plus normal fallback replay pass in 18.91 s.
  • Focused TypeScript, targeted type-aware lint, formatting, whitespace and staged test-line checks pass. The final regression allocation is exactly 64 lines, with 19 lines of budget slack. Tested source tree 4d50a52b59d10803d80fedf2663b3f7ba6737367 matches signed head c1e51e7d581717ef1be900c01d5a7a34c8238e82.
  • The base runtime build and repaired CLI build succeed. Fresh independent source review and complete local ClawSweeper review (high reasoning, full range d1be6e243ccd850329d93567cb3ffd71e0ff837d..c1e51e7d581717ef1be900c01d5a7a34c8238e82) found no actionable findings. These were source reviews; execution evidence comes from the separate runs above.

Wire evidence uses actual SIGINT and synthetic local I/O. It does not exercise an external provider. A separate held remote-image input probe still ends in forced exit after about 2.02 s, before any provider request. That unchanged cache/fetch cancellation defect is recorded as the next follow-up; this patch repairs provider work and model fallback.

CI run https://github.com/openclaw/openclaw/actions/runs/42321980326/attempts/1 completed with only the test-budget job and its aggregate gate failing. Source arithmetic at its actual checkout shows main at 6,556,061 test lines / 6,556,060 ceiling and the tested merge at 6,556,125 / 6,556,124: both exceed by one. This PR adds and funds exactly 64 lines; shared checker and scalar inputs are unchanged. Landing uses the native attributed inherited-failure route; failed CI is not reported as green.

Landed as e43ec1e8357b2f2cb71948c20e9f3635e3a3d1b9; exact reviewed head and native inherited-failure qualification are recorded in the completion receipt.

Carry the existing invocation execution context through image description providers and model fallback. Preserve output and request budgets while stopping canceled work.

Fund 64 regression lines across the command, fallback, and provider boundaries. A real SIGINT replay now exits 130 promptly and closes the held provider request.
@vincentkoc vincentkoc self-assigned this Nov 7, 2026
@clawsweeper

clawsweeper Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation cli CLI command changes size: M labels Nov 7, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review November 7, 2026 01:04
@vincentkoc
vincentkoc merged commit e43ec1e into main Nov 7, 2026
214 of 217 checks passed
@vincentkoc
vincentkoc deleted the fix/infer-image-description-cancellation-20261107 branch November 7, 2026 01:21
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 7, 2026
Carry the existing invocation execution context through image description providers and model fallback. Preserve output and request budgets while stopping canceled work.

Fund 64 regression lines across the command, fallback, and provider boundaries. A real SIGINT replay now exits 130 promptly and closes the held provider request.
maplel pushed a commit to maplel/openclaw that referenced this pull request Nov 24, 2026
…94251)

fix(infer): stop video runs on Ctrl+C

`openclaw infer video` dropped its execution context, and with it the cancel signal, so Ctrl+C left the provider request open until the CLI was force-killed about 2 seconds later. The existing execution context is now passed through, as audio already does. Uninterrupted runs are unchanged.

Evidence: built CLI with a real MP4 against a slow local video-provider fixture, twice per ref. Main needed SIGKILL after about 2,090 ms; with this change the CLI exits with 130 in under 100 ms and the HTTP request closes within 1.1 ms. Uninterrupted output and request bodies are identical. Details: openclaw#194251 (comment).

Thanks @Alix-007.

Co-authored-by: Ayaan Zaidi <[email protected]>

(cherry picked from commit 3af1447)

Release adaptation: Forward video execution signal/assertCurrent and move existing guarded fetch/process scope to shared file owner. Retain baseline audio CLI and filesystem resolution: excluded HOLD audio/path migration not imported. Only13-line cancel regression, no fixture refactor.

Follow-up dispositions: 577dd00 fix: send infer audio/video --model files only to the requested model (openclaw#190287); bcb47e8 feat(google): add Nano Banana 2.1 image model as the default (openclaw#200468); 6f5d3b3 fix: local path commands pick a neighboring file when a symlinked folder is followed by `..` (openclaw#200031); 3577724 fix(auth): only the running Gateway refreshes shared OAuth sign-ins (openclaw#198214); 81daea9 fix(cli): run infer model run through the Gateway that owns state (openclaw#198141); 22b1aac fix(media): cancel interrupted attachment downloads (openclaw#194399); e43ec1e fix(infer): cancel interrupted image descriptions (openclaw#194391)

Validation: Baseline canceled-video assertion fails with16controls passing; candidate17/17passes,194251-green.log. Existing audio cancellation and workspace/cleanup behavior retained. Real MP4/CLI interrupt proof remains upstream-attributed, not locally rerun.

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 853a96335df6193815789ebcc02d38af11123fcf)
(cherry picked from commit 2ea2570de7f13823a8174590bfddfbfabdbcd915)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes docs Improvements or additions to documentation size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant