Skip to content

fix: Validate schema identity on readable opens - #4626

Merged
Sinity merged 1 commit into
masterfrom
feature/packet/polylogue-6dxfd
Sep 3, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/packet/polylogue-6dxfd

Conversation

@Sinity

@Sinity Sinity commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Summary

Rebase the schema-identity read-open fix onto current master and retain an end-to-end regression test for read-only archive opens.

Problem

Read-only archive initialization must reject stale derived index identity before serving queries. Current master now performs the identity assertion in the readable-layout route; this lane preserves coverage at the ArchiveStore.open_existing(..., read_only=True) boundary.

Solution

Resolved the schema conflict by retaining master’s manifest validation and identity-check ordering. Added a regression test that corrupts the index identity and asserts typed SchemaSkew refusal.

Verification

nix develop --command devtools verify --quick — all quick gates passed.
nix develop --command devtools test tests/unit/storage/test_archive_tiers_archive.py — queued on shared pytest slot during this handoff.

Residual risk

The focused pytest run remains dependent on the shared queue and has not produced a result yet.

@Sinity
Sinity enabled auto-merge (squash) September 3, 2026 20:05
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: 95f22e13-0ed9-4a63-a7d3-cb0b872cef28


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-03T20:08:13.027689Z 0ed8a49 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0ed8a49b3e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Sinity
Sinity merged commit 9173d32 into master Sep 3, 2026
3 of 4 checks passed
@Sinity
Sinity deleted the feature/packet/polylogue-6dxfd branch September 3, 2026 20:12
Sinity added a commit that referenced this pull request Sep 5, 2026
…4692)

## Summary
Fixes seven root causes from the 2026-09-05 master corpus reds (106
failed / 20,455 passed), profile/delegation/storage cluster:

- fix(storage): select the input_row_count the profile record reads (`no
such column: total_input_tokens`)
- fix(storage): insight presence counts views, not only tables
(`threads`/`delegations`/`actions` are views; exports withheld every
row)
- fix(storage): retain an ambiguous-owner attachment as typed unowned
(PR #4644 dropped it before its row was written; bead polylogue-c9qxh)
- fix(maintenance): absent stats for an empty table are not missing
coverage
- test: supply parent-dispatch evidence delegation resolution now
requires; read profile totals and ingest seams at their current
locations; follow embedding reuse and the declared content-hash
partition; classify new index tables and satisfy the threads view
dependency

## Verification
Lane batches: `450 passed` (batch 1620), then `5 failed, 664 passed in
654 s` (batch 1628) on the listed cluster plus touched modules.
`devtools verify --quick` green after one typing fix by the coordinator.

## Residuals (deliberately not fixed, with reasons)
- `test_session_revision_projection_golden_hashes`: message-level hash
drift unexplained by any diff in the identity modules; regenerating
would launder a possible identity regression.
- `assert_readable_archive_layout` still raises the pre-migration
`SchemaVersionMismatchError` on skew (#4626 half-landed); flipping it
changes MCP error codes; needs a caller audit.
- `test_refresh_thread_reorder_only_touches_changed_span`: #4630 made
`_refresh_thread` a no-op; design decision, not a patch.
- `test_insights_status_plain`, two `test_reindex_campaign` tests,
`test_full_reindex_and_incremental_convergence_have_equal_derived_models`:
still red in batch 1628.
- `perf_floors` and `codex_804` timed out under five-lane host
contention.

Beads: polylogue-7r19s, polylogue-xtstx, polylogue-c9qxh

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01DNGJ3awfNrsLaMdHgQZvid

---------

Co-authored-by: Claude Fable 5.1 <[email protected]>
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