fix(corpus): read counsel through the optional-column contract - #985
Merged
Conversation
The ranged and service backends read the published blob as-is — no connect migration runs — so counsel, like every column an older remote blob can lack, must read through the tolerant path. A direct record read raised KeyError against the production index and failed six of the seven promotion freshness scenarios. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
What
_from_recordreadcounseldirectly while every other column added since the last promotion reads through the_optional_*contract ("read a column an older remote blob lacks"). The ranged and service backends read the published corpus blob as-is — noconnectmigration runs — and the production index is still written bymain's pre-counsel writers, so the direct read raisedKeyError: 'counsel'and failed six of the seven promotion freshness scenarios (onlymcp-sidecar, which touches no corpus read, passed).One-line fix to the tolerant path plus a regression test that drops the column and reads through
_from_record, mirroring the failure exactly. The four interim columns (#980) already honored the contract;counselwas the only violation.Artifact served
The promotion itself: the freshness gate for #968 cannot pass without it, and post-promotion the first
run-seedwindow writes the column for real.Merge lane
Self-merge candidate (src + tests only). Gate: lint / types / test (1625 passed) green locally.
After merge
The seven freshness scenarios must be re-dispatched at staging's new head — per-SHA evidence.