Skip to content

fix: harden electric agents cli remote errors#4334

Open
icehaunter wants to merge 2 commits into
mainfrom
codex/fix-electric-ax-remote-errors
Open

fix: harden electric agents cli remote errors#4334
icehaunter wants to merge 2 commits into
mainfrom
codex/fix-electric-ax-remote-errors

Conversation

@icehaunter
Copy link
Copy Markdown
Contributor

Summary

  • Harden electric-ax CLI error rendering so string-shaped server errors and empty status text still produce actionable messages.
  • Add optional ELECTRIC_AGENTS_PRINCIPAL support that sends the Electric-Principal header for CLI, start-builtin, and the built-in agents entrypoint.
  • Document the principal/header env vars and cover the new behavior with focused tests.

Checks

  • pnpm -C packages/electric-ax test -- --runInBand
  • pnpm -C packages/electric-ax typecheck
  • pnpm -C packages/agents test -- entrypoint-lib
  • pnpm --filter electric-ax... -r build
  • Remote smoke test: missing principal now prints Error: Missing electric-principal; setting ELECTRIC_AGENTS_PRINCIPAL lists entities successfully.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

❌ Patch coverage is 73.77049% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.79%. Comparing base (b6d2a2b) to head (2a7be10).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/electric-ax/src/start.ts 9.09% 10 Missing ⚠️
packages/electric-ax/src/index.ts 85.71% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #4334       +/-   ##
===========================================
+ Coverage   36.11%   68.79%   +32.68%     
===========================================
  Files         172       75       -97     
  Lines       12146     7897     -4249     
  Branches     3975     2387     -1588     
===========================================
+ Hits         4386     5433     +1047     
+ Misses       7750     2453     -5297     
- Partials       10       11        +1     
Flag Coverage Δ
packages/agents 70.92% <100.00%> (?)
packages/agents-server 73.46% <ø> (ø)
packages/agents-server-ui ?
packages/electric-ax 42.42% <69.81%> (?)
typescript 68.79% <73.77%> (+32.68%) ⬆️
unit-tests 68.79% <73.77%> (+32.68%) ⬆️

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.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 14, 2026

Deploy Preview for electric-next ready!

Name Link
🔨 Latest commit 951b8c7
🔍 Latest deploy log https://app.netlify.com/projects/electric-next/deploys/6a058d4effe58a0008841c3a
😎 Deploy Preview https://deploy-preview-4334--electric-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

1 participant