You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix error counter keying on dynamic error messages (#182)
* Fix error counter keying on dynamic error messages
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add tests for label-based error counter keying
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Require at least one label in ErrorCounter API
The previous approach silently dropped the error message from the key
but kept labels optional. This meant callers without labels would share
a single global counter — a worse behaviour change.
Now the interface requires at least one label (label string, extras ...string),
making the contract explicit. All existing callers already pass two labels
(processName, runID) so no call sites change.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Remove unused err parameter from ErrorCounter interface
The error value was accepted but ignored for keying — drop it entirely
to make the label-only keying explicit in the API.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Use null byte separator in makeKey to prevent key collisions
Labels containing hyphens (e.g. "a-b","c" vs "a","b-c") could map to
the same key. Use \x00 as the separator since it cannot appear in
human-readable label strings.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* pause: remove unused originalErr param from maybePause
Now that error counter keys only labels (not err.Error()), the error
value passed into maybePause is never read.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments