Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/probitas-runner/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ export class Runner {
// Create abort controller for outer context
const controller = new AbortController();
const { signal } = controller;
options?.signal?.addEventListener("abort", () => controller.abort());
options?.signal?.addEventListener("abort", () => {
// Pass the reason from external signal to internal controller
controller.abort(options.signal?.reason);
});
Comment on lines +73 to +76

Copilot AI Jan 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change introduces abort reason propagation but lacks test coverage. The PR description mentions tests that should verify timeout error detection and manual cancellation, but these tests haven't been added yet. Consider adding a test that:

  1. Creates an external AbortSignal with AbortSignal.timeout()
  2. Passes it to runner.run() via options.signal
  3. Verifies that when the timeout fires, the internal signal receives the TimeoutError reason
  4. Confirms that isTimeoutError() correctly identifies the error as a timeout

This would ensure the abort reason propagation works as intended and doesn't break in future changes.

Copilot uses AI. Check for mistakes.

// Execute scenarios
const maxConcurrency = options?.maxConcurrency ?? 0;
Expand Down