Skip to content

Fix agent SIGINT abort context ordering#4399

Merged
icehaunter merged 2 commits into
mainfrom
fix-agent-sigint-context
May 25, 2026
Merged

Fix agent SIGINT abort context ordering#4399
icehaunter merged 2 commits into
mainfrom
fix-agent-sigint-context

Conversation

@KyleAMathews
Copy link
Copy Markdown
Contributor

Summary

  • let pi-agent-core settle aborted runs instead of immediately unsubscribing on SIGINT
  • add a fallback timeout for providers/tools that ignore AbortSignal
  • reorder model-facing timeline context so aborted run output appears before the SIGINT marker when server-appended signals race ahead of buffered runtime output
  • add regression coverage for interrupted-run timeline ordering

Tests

  • pnpm exec vitest run test/timeline-context.test.ts
  • pnpm exec eslint src/pi-adapter.ts src/timeline-context.ts src/types.ts test/timeline-context.test.ts --quiet

Note: broader agents-runtime typecheck/test runs still fail in this worktree because of existing dependency/linkage issues (missing/mismatched pino, cron-parser, @mariozechner/pi-agent-core, localOnlyCollectionOptions, etc.).

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 22, 2026

Electric Agents Desktop Builds

Build artifacts for commit ef3f50e.

Platform Status Artifact
macOS Apple Silicon Passed DMG
macOS Intel Passed DMG
Windows x64 Passed Installer
Linux x64 Passed AppImage / deb

Workflow run

@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

❌ Patch coverage is 95.18072% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.04%. Comparing base (8803b36) to head (ef3f50e).
⚠️ Report is 5 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/agents-runtime/src/timeline-context.ts 95.71% 3 Missing ⚠️
packages/agents-runtime/src/pi-adapter.ts 92.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4399      +/-   ##
==========================================
- Coverage   59.46%   56.04%   -3.42%     
==========================================
  Files         304      259      -45     
  Lines       30626    26983    -3643     
  Branches     8335     7502     -833     
==========================================
- Hits        18211    15122    -3089     
+ Misses      12397    11846     -551     
+ Partials       18       15       -3     
Flag Coverage Δ
packages/agents 67.78% <ø> (+0.25%) ⬆️
packages/agents-mcp ?
packages/agents-runtime 81.14% <95.18%> (+0.46%) ⬆️
packages/agents-server 74.41% <ø> (-0.04%) ⬇️
packages/agents-server-ui 6.19% <ø> (-0.02%) ⬇️
packages/electric-ax 43.81% <ø> (ø)
packages/experimental ?
packages/react-hooks ?
packages/start ?
packages/typescript-client ?
packages/y-electric ?
typescript 56.04% <95.18%> (-3.42%) ⬇️
unit-tests 56.04% <95.18%> (-3.42%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@samwillis samwillis left a comment

Choose a reason for hiding this comment

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

LGTM
that flake was annoying!

@icehaunter icehaunter merged commit 9c2c3ae into main May 25, 2026
34 checks passed
@icehaunter icehaunter deleted the fix-agent-sigint-context branch May 25, 2026 15:32
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.

3 participants