Repository navigation
fix(merge): gate error-code emission and never let a code outrank 401/403 - #347
Merged
beinan merged 1 commit intoOct 8, 2026
Merged
Conversation
…/403 Review of lance-format#338 found two defects. Mixed-version regression: tagging the message changed the exact string an old master matches on, so a stale preparation completed by a new executor and classified by an old master went back to a one-hour cooldown - the production failure lance-format#338 set out to fix. Emission is now off by default and enabled with MAINTENANCE_ERROR_CODES=1 once every master and executor runs a code-aware reader. The code moves to a suffix, and the legacy exact-text matcher tolerates that suffix, so even a reader with only the text path is not fooled once emission is on. Classification priority: the code was checked before HTTP status, so "HTTP 403: ... [LC_STALE_PREPARATION]" classified Retryable. The PR description claimed a test for this; there was none. Order is now ownership, then explicit 401/403, then code, then text. corrected() reuses classify() instead of its own rule, and only ever softens a stored DataOrConfiguration record. Tests: 401/403 wrapping the code in either position classify DataOrConfiguration and are not softened by corrected(); emission is off by default; the exact legacy string is still matched byte-for-byte; a tagged string is recognised by the text path alone. api, merge (7 unit) and core prepared/stale suites pass; clippy -D warnings, fmt, typos clean. Refs lance-format#333. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
17 of 18 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #333. Fixes two defects in #338 found in review (credit: production review).
Problems
DataOrConfiguration, one-hour cooldown — the bug fix(merge): classify stale preparations by a stable error code #338 set out to fix. Reproduced with old vs new classifier.classifychecked the code before HTTP status, soHTTP 403: … [LC_STALE_PREPARATION]→Retryable. The fix(merge): classify stale preparations by a stable error code #338 description claimed a test for this; there was none.corrected()also had its own rule instead of sharingclassify's.Fixes
MAINTENANCE_ERROR_CODES=1enables it after every master/executor runs a code-aware reader.tag()returns the exact legacy string when off;tag_forced()for tests.classifyorder: ownership → explicit 401/403 → code → text.corrected()delegates toclassifyand only softens a storedDataOrConfiguration.docs/concurrent-indexing.mddocuments the rollout order.Validation
DataOrConfiguration, andcorrected()leaves it; emission off by default; byte-exact legacy string still matched; tagged string recognised by text path alone.lance-context-api1/1,lance-context-mergefailure 7/7,lance-context-coreprepared/stale 9/9; clippy-D warnings, fmt, typos clean.🤖 Generated with Claude Code