Skip to content

fix(drive): release interrupted LLM settlement - #137

Open
mikemikimike wants to merge 1 commit into
anomalyco:mainfrom
mikemikimike:fix/settlement-interrupt-race
Open

mikemikimike wants to merge 1 commit into
anomalyco:mainfrom
mikemikimike:fix/settlement-interrupt-race

Conversation

@mikemikimike

Copy link
Copy Markdown

Summary

  • Reconcile active LLM responses against the negotiated llm.pending capability while settlement is waiting.
  • Cancel only responses captured before a successful pending query and confirmed absent; preserve legacy behavior when the capability is unavailable.
  • Cover interrupted streams, requests arriving during a query, query failures, and older backends.

Fixes #135

Issue: #135

Tests

  • bun run --cwd packages/drive --bun vitest run --maxWorkers=1 --no-file-parallelism test/driver/llm-controller.test.ts test/driver/llm-state.test.ts (27 passed)
  • bun run --cwd packages/drive drive check test/manual/tui-regressions/llm-interrupt-settlement.ts (passed)
  • bun run test (279 passed; 10 existing Windows-specific failures also reproduce on the base revision)
  • bun run check (lint and TypeScript checks passed; the catalog public-path test fails on Windows path handling)

@mikemikimike

Copy link
Copy Markdown
Author

Verification note: bun run test produces the same 10 Windows-specific failures on the clean base commit ec9ad8a and on this PR branch; these failures predate this PR. The focused LLM driver tests pass (27/27). bun run check also reports the catalog public-path Windows path-separator failure on both the base and this branch. Drive lint/typecheck and catalog lint/typecheck pass.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

llm settlement waits on a reply whose request an interrupt already aborted

1 participant