From 8873896432daea38634c01fd24b193d13509e008 Mon Sep 17 00:00:00 2001 From: um1ng Date: Thu, 5 Feb 2026 23:15:05 +0900 Subject: [PATCH] fix(runtime-fallback): use precise regex patterns for status code matching Replace word-boundary regex with stricter patterns that match status codes only at start/end of string or surrounded by whitespace. Prevents false matches like '1429' or '4290'. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus --- src/hooks/runtime-fallback/constants.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hooks/runtime-fallback/constants.ts b/src/hooks/runtime-fallback/constants.ts index 87d03be5..f3f25956 100644 --- a/src/hooks/runtime-fallback/constants.ts +++ b/src/hooks/runtime-fallback/constants.ts @@ -29,9 +29,9 @@ export const RETRYABLE_ERROR_PATTERNS = [ /overloaded/i, /temporarily.?unavailable/i, /try.?again/i, - /\b429\b/, - /\b503\b/, - /\b529\b/, + /(?:^|\s)429(?:\s|$)/, + /(?:^|\s)503(?:\s|$)/, + /(?:^|\s)529(?:\s|$)/, ] /**