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
{{ message }}
Repository navigation
Commit 53aeb02
Browse filesBrowse the repository at this point in the historyBrowse files
fix(metadata-protocol): classify a failed index build from the ERROR, not its message (#6699) (#6845)
`classifyIndexFailure` carried a fifth private unique-violation vocabulary —
the one #6250's inventory missed, because it lives in a package none of the
other four touched — and answered from the message channel only.
The first arm now delegates to `@objectstack/types`' `isUniqueViolationError`,
and `probeThenReplaceIndex` passes it the caught ERROR OBJECT rather than
`err.message`. A string-only swap would have compiled unchanged and kept the
defect: the `code` / `errno` / `cause` channels are the point of the shared
predicate.
A conflict reported on `code`/`errno` with unhelpful prose (SQLite's
`SQLITE_CONSTRAINT_UNIQUE`, MySQL's `ER_DUP_ENTRY`/1062, Postgres' `23505`, or
one step down `cause`) was classified `failed`; it is now `conflict`, which is
the verdict that produces ADR-0120 D4's report. Every message-channel verdict
is unchanged.
Preserved deliberately: the arm order (duplicate wording judged BEFORE dialect
wording, since MySQL's duplicate error mentions the key and some drivers wrap
both facts in one string), and the dialect arm as this module's own
message-based vocabulary — the shared predicate answers the first arm only.
Claude-Session: https://claude.ai/code/session_01W6bLax4KMrSfnE1ydFU8Dw
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments