fleetd #339: guard backend error sink #344

Closed
agent wants to merge 0 commits from worker/fleetd-339-5ca0a2-23 into main
Member

Closes #339.

Decision

I split send failure from recording a credential failure. Any matching pane text still fails the send and keeps the complete pane tail. The sink now needs stronger text evidence: the matched pattern must start its pane line. The existing too-fast crash path still notifies the sink for any match. This keeps direct backend error lines and the crash signature flowing to cooling-off.

This is still a heuristic. A member can write prose on a line that starts with API Error: (or a configured pattern), and that can still reach the sink.

Measurement before the fix

I added the regression setup first, with a normal report: I checked the retry path. An API Error: makes it back off. Before the fix, its focused Maven test passed while the sink list had one entry. The log showed the report was classified as a backend error.

Tests

  • mvn -Dtest=CompletionResolverTest#aNormalMemberReportMentioningTheFallbackErrorPatternCurrentlyNotifiesTheSink test before the fix: Tests run: 1, Failures: 0, Errors: 0, Skipped: 0; BUILD SUCCESS.
  • Mutation proof: I restored the unguarded sink calls and ran mvn -Dtest=CompletionResolverTest#aNormalMemberReportMentioningTheFallbackErrorPatternFailsButDoesNotNotifyTheSink test. It failed with: a normal report mentioning the fallback pattern must not record a credential failure ==> expected: <true> but was: <false>. I then restored the guard.
  • mvn clean install: Tests run: 1356, Failures: 0, Errors: 0, Skipped: 0; BUILD SUCCESS.

Other shape found, not changed

CompletionResolver sends a configured exhausted-pattern text match to ExhaustionSink.onExhausted, which can quarantine a credential. This is another text heuristic with a lasting side effect, but it is outside #339.

Closes #339. ## Decision I split send failure from recording a credential failure. Any matching pane text still fails the send and keeps the complete pane tail. The sink now needs stronger text evidence: the matched pattern must start its pane line. The existing too-fast crash path still notifies the sink for any match. This keeps direct backend error lines and the crash signature flowing to cooling-off. This is still a heuristic. A member can write prose on a line that starts with `API Error:` (or a configured pattern), and that can still reach the sink. ## Measurement before the fix I added the regression setup first, with a normal report: `I checked the retry path. An API Error: makes it back off.` Before the fix, its focused Maven test passed while the sink list had one entry. The log showed the report was classified as a backend error. ## Tests - `mvn -Dtest=CompletionResolverTest#aNormalMemberReportMentioningTheFallbackErrorPatternCurrentlyNotifiesTheSink test` before the fix: `Tests run: 1, Failures: 0, Errors: 0, Skipped: 0`; `BUILD SUCCESS`. - Mutation proof: I restored the unguarded sink calls and ran `mvn -Dtest=CompletionResolverTest#aNormalMemberReportMentioningTheFallbackErrorPatternFailsButDoesNotNotifyTheSink test`. It failed with: `a normal report mentioning the fallback pattern must not record a credential failure ==> expected: <true> but was: <false>`. I then restored the guard. - `mvn clean install`: `Tests run: 1356, Failures: 0, Errors: 0, Skipped: 0`; `BUILD SUCCESS`. ## Other shape found, not changed `CompletionResolver` sends a configured exhausted-pattern text match to `ExhaustionSink.onExhausted`, which can quarantine a credential. This is another text heuristic with a lasting side effect, but it is outside #339.
agent added 1 commit 2026-09-04 10:57:42 +02:00
fleetd #339: guard backend error sink
CI / contract (pull_request) Successful in 50s
CI / build (pull_request) Successful in 1m50s
57b8c0b56d
ltms closed this pull request 2026-09-04 11:14:47 +02:00
Some checks are pending
CI / contract (pull_request) Successful in 50s
CI / build (pull_request) Successful in 1m50s

Pull request closed

Sign in to join this conversation.