Skip to content

Guard error route-tagging against frozen rejections - #13

Merged
judagent[bot] merged 1 commit into
masterfrom
fix/advisor-error-tag-guard
Sep 23, 2026
Merged

judagent[bot] merged 1 commit into
masterfrom
fix/advisor-error-tag-guard

Conversation

@judagent

@judagent judagent Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

One-line hardening for the PR #12 error tagging: guard the
advisorProvider assignment so a frozen or non-extensible rejection can
never throw a TypeError that replaces the original failure. Worst case
is now an untagged metrics row, never a masked error.

Verified by reading (no change needed): withTimeout rejects with an
Error, so timeout tagging works; switchAdvisorSessionModel failures
propagate uncaught, so a failed pin aborts before generation and the tag
names the attempted route.

Verification

  • bun test: 363 pass, 0 fail; tsc --noEmit clean.

Models: anthropic/claude-opus-5-5:xhigh, meta/muse-spark-1.3:max, anthropic/claude-fable-5-1:xhigh

Guard the advisorProvider assignment: tagging a frozen or non-extensible
rejection would otherwise throw a TypeError that replaces the error the
caller needs to see. Worst case is now an untagged row, never a masked
failure.
@judagent judagent Bot assigned judsd Sep 23, 2026
@judagent
judagent Bot merged commit 4f6c2c0 into master Sep 23, 2026
4 checks passed
@judagent
judagent Bot deleted the fix/advisor-error-tag-guard branch September 23, 2026 01:23
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