Skip to content

fix(corpus): read counsel through the optional-column contract - #985

Merged
modelmirror merged 2 commits into
stagingfrom
fix/counsel-optional-read
Aug 2, 2026
Merged

fix(corpus): read counsel through the optional-column contract#985
modelmirror merged 2 commits into
stagingfrom
fix/counsel-optional-read

Conversation

@modelmirror

Copy link
Copy Markdown
Collaborator

What

_from_record read counsel directly 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 — no connect migration runs — and the production index is still written by main's pre-counsel writers, so the direct read raised KeyError: 'counsel' and failed six of the seven promotion freshness scenarios (only mcp-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; counsel was the only violation.

Artifact served

The promotion itself: the freshness gate for #968 cannot pass without it, and post-promotion the first run-seed window 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.

modelmirror and others added 2 commits August 2, 2026 00:25
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>
@modelmirror
modelmirror enabled auto-merge (squash) August 2, 2026 00:31
@modelmirror
modelmirror merged commit df2fd0a into staging Aug 2, 2026
5 checks passed
@modelmirror
modelmirror deleted the fix/counsel-optional-read branch August 2, 2026 00:33
@modelmirror modelmirror mentioned this pull request Aug 2, 2026
11 tasks
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