Skip to content

fix: stop posting provider errors as failure comments - #82

Merged
EthanThatOneKid merged 1 commit into
mainfrom
quiet-provider-failures
Sep 23, 2026
Merged

EthanThatOneKid merged 1 commit into
mainfrom
quiet-provider-failures

Conversation

@EthanThatOneKid

Copy link
Copy Markdown
Contributor

Closes the noise half of #77.

A revoked model credential fails every dispatch at the first model call, and eve's built-in GitHub failure handlers echoed the provider's own words into the originating thread — Model provider API error: Authentication Fails, Your api key: ****53a6 is .... The failure is an operator problem, not a reply, and it repeated in full on every mention in every conversation.

lib/failure-policy.ts now decides what a channel may say when a turn or session fails:

  • Deployment fault (unusable credential, unpaid gateway account, or a model the account cannot reach): posts nothing; a redacted one-line summary goes to the runtime log instead. The summary is built from code, details.name, details.statusCode, details.upstreamType, and the correlation id — never the raw message.
  • Any other failure: one generic sentence plus eve's correlation id, still never the upstream provider's text.

Both chat channels route turn.failed and session.failed through it. The GitHub channel is where the leak showed, because it had no event overrides at all; turn.started stays eve's own handler, since it owns the repository checkout. The Discord mentions channel already posted fixed prose and now suppresses deployment faults too.

node --test lib/*.test.ts (176 tests), tsc --noEmit, and pnpm build:eve all pass.

A revoked model credential made every dispatch fail at the first model call,
and eve's built-in GitHub handlers echoed the provider's own words back into
the originating thread: "Model provider API error: Authentication Fails, Your
api key: ****53a6...". The failure is an operator problem, not a reply, so it
repeated in full on every mention in every conversation.

`lib/failure-policy.ts` now decides what a channel may say when a turn or
session fails. A deployment fault — an unusable credential, an unpaid gateway
account, or a model the account cannot reach — posts nothing and leaves a
redacted one-line summary in the runtime log. Every other failure posts one
generic sentence plus eve's correlation id, never the upstream provider's text.

Both chat channels route their `turn.failed` and `session.failed` events
through it. The GitHub channel is where the leak showed, because it had no
event overrides at all; `turn.started` stays eve's, since it owns the
repository checkout. The Discord mentions channel already posted fixed prose
and now suppresses deployment faults too, so a dead credential stops
repeating itself there as well.
@vercel

vercel Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
computer Ready Ready Preview Sep 23, 2026 7:23pm UTC

@wazoocomputer

wazoocomputer Bot commented Sep 23, 2026

Copy link
Copy Markdown

This pull request addresses the issue of sensitive provider errors being exposed in GitHub comments. It introduces a new failure-policy.ts to control what information is posted in the event of a turn or session failure, preventing deployment faults from being echoed back to the user.

File Change Type Summary
.github/ARCHITECTURE.md modified Updated architecture documentation to reflect the new failure policy.
agent/channels/discord-mentions.ts modified Modified Discord mention handler to use the new failure policy for session and turn failures.
agent/channels/github.ts modified Modified GitHub channel to use the new failure policy for turn and session failures.
lib/failure-policy.test.ts added Added unit tests for the failure policy.
lib/failure-policy.ts added Implemented the new failure policy to control error messages.

Reviewers should begin by examining lib/failure-policy.ts to understand the new policy logic.

1 similar comment
@wazoocomputer

wazoocomputer Bot commented Sep 23, 2026

Copy link
Copy Markdown

This pull request addresses the issue of sensitive provider errors being exposed in GitHub comments. It introduces a new failure-policy.ts to control what information is posted in the event of a turn or session failure, preventing deployment faults from being echoed back to the user.

File Change Type Summary
.github/ARCHITECTURE.md modified Updated architecture documentation to reflect the new failure policy.
agent/channels/discord-mentions.ts modified Modified Discord mention handler to use the new failure policy for session and turn failures.
agent/channels/github.ts modified Modified GitHub channel to use the new failure policy for turn and session failures.
lib/failure-policy.test.ts added Added unit tests for the failure policy.
lib/failure-policy.ts added Implemented the new failure policy to control error messages.

Reviewers should begin by examining lib/failure-policy.ts to understand the new policy logic.

This branch was successfully deployed

1 active deployment
Preview — e914a2e2 Deployed Sep 23, 2026 by vercel[bot]
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