fix(reindex): align fixtures with runtime authority - #3953
Conversation
Publish raw payload and attachment bytes through the archive publisher before admitting their source-tier references. Reject transient agent paths before repository-root attribution. Co-Authored-By: Codex <noreply@openai.com>
Bootstrap canonical tiers, supply parser-census and raw-lifecycle evidence, and preserve read-only, idless, and attachment-owner failure boundaries. Co-Authored-By: Codex <noreply@openai.com>
Regenerate protocol bytes, retain behavioral FTS coverage, and update runtime fixtures for current CLI, async dispatch, and readiness contracts. Co-Authored-By: Codex <noreply@openai.com>
Problem: the rebased fixture suite retained stale payload mutation and ownership expectations after the current archive contracts changed.\n\nWhat changed: preserve typed blob receipts, widen the mixed status fixture, and assert the explicit ambiguous-owner failure boundary.\n\nCo-Authored-By: Codex <noreply@openai.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughThe PR updates repository attribution, material protocol fixtures, convergence ingestion, FTS freshness recording, archive-tier setup, health contracts, and runtime test expectations. ChangesArchive convergence and validation
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant ConvergenceHarness
participant ArchiveBlobPublisher
participant source_db
participant SessionWriter
participant InsightMaterializer
participant index_db
ConvergenceHarness->>ArchiveBlobPublisher: publish raw and attachment bytes
ArchiveBlobPublisher->>source_db: record publication receipts
ConvergenceHarness->>source_db: consume receipts and validate payload size
ConvergenceHarness->>SessionWriter: ingest payload with precomputed hash
InsightMaterializer->>index_db: rebuild insight rows
InsightMaterializer->>index_db: record exact FTS freshness
ConvergenceHarness->>index_db: verify required readiness surfaces
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5e513c9ca0
ℹ️ 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".
|
Exact-head Codex review completed against Result: no actionable defects identified. The review covered the full base-to-head diff, including source-tier blob publication and receipt consumption, attachment-owner ambiguity, material-protocol fixture IDs, and contract-test coverage. |
|
@codex review Please review exact head |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review Please review exact head |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/infra/convergence_harness.py`:
- Line 238: Capture the raw receipt immediately after
raw_blob_publisher.write_from_bytes(payload) in the convergence harness, before
publishing any attachments. Update the raw reference and corresponding
blob_publication_reservations consumption to use this saved receipt rather than
rereading ArchiveBlobPublisher.receipt_id(), while leaving attachment receipt
handling unchanged.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 3b196252-228f-490c-b36d-327ee008766c
📒 Files selected for processing (26)
polylogue/archive/session/attribution.pytests/benchmarks/test_archive_maintenance.pytests/fixtures/material_protocol/v1/small-session/manifest.jsontests/fixtures/material_protocol/v1/small-session/segments/seg-00000.ndjsontests/fixtures/material_protocol/v1/small-session/segments/seg-00001.ndjsontests/fixtures/material_protocol/v1/small-session/segments/seg-00002.ndjsontests/infra/convergence_harness.pytests/unit/annotations/test_durable_storage.pytests/unit/architecture/test_topology_invariants.pytests/unit/archive/test_repo_identity.pytests/unit/cli/commands/test_status.pytests/unit/cli/test_check_runtime.pytests/unit/cli/test_init.pytests/unit/cli/test_insights_command_runtime.pytests/unit/core/test_artifact_specs.pytests/unit/core/test_claim_guard.pytests/unit/core/test_insight_registry_runtime.pytests/unit/daemon/test_convergence_restart_law.pytests/unit/daemon/test_health_check_paths.pytests/unit/daemon/test_health_contract.pytests/unit/maintenance/test_blob_reference_closure.pytests/unit/operations/test_archive_debt.pytests/unit/sources/parsers/test_origin_regression_pack.pytests/unit/storage/test_archive_readiness.pytests/unit/storage/test_delegations_view.pytests/unit/storage/test_search_text_write_tool_coverage.py
💤 Files with no reviewable changes (1)
- tests/unit/storage/test_search_text_write_tool_coverage.py
|
@codex review Please review exact head |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review Please review exact head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 864f56b987
ℹ️ 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".
|
@codex review Please review exact head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 54e8743f47
ℹ️ 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".
|
@codex review Please review exact head |
|
@codex review Please review exact head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5133d25c8e
ℹ️ 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".
Restrict temporary spool detection to direct temporary roots so nested repository directories remain attributable. Move post-insight work-event FTS freshness publication from the property harness into every production insights route, using a surface-specific exact invariant to avoid rescanning message FTS. Keep the derived-readiness law scoped to derived surfaces while retaining source authority in the compared snapshot.
|
@codex review Please review exact head |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
Align archive and convergence fixtures with current durable authority, preserve legitimate repository attribution, and make production convergence publish the FTS readiness state that its property tests require.
Problem
The retained fixture lane assumed older generated message IDs, ad hoc tier schemas, direct blob references, permissive attachment-owner repair, and a broad temporary-path filter. Its convergence harness also repaired the work-event FTS freshness ledger after the production stages had returned, allowing tests to claim readiness through wiring users did not receive.
Solution
ArchiveBlobPublisher, bind source-tier references to publication receipts, and consume those receipts in the durable write transaction./tmp/project/claude-3remain attributable.session_work_events_ftsinvariant from every production insights execution route. The surface-specific probe avoids rescanning message FTS and removes the test harness's post-convergence repair.MessageOwnerAmbiguityErrorbefore repair can write a guessed reference, and replace stale source-text assertions with behavioral contracts.Verification
devtools verify --quick: all 25 steps passed in 116.30s.Current exact head:
94ab1db874b0e5758f3e7f7fa0b4ebcd1b900ad8.Anti-vacuity: the convergence properties exercise the real parsed-session writer and production FTS/insights stages. Removing production freshness publication leaves the work-event readiness row absent; restoring the harness-only write no longer helps. The attribution regression drives a deleted path under a numeric agent-prefixed directory inside a repository while the direct spool-root regression remains rejected. Publication tests bind and consume real source-tier receipts, and changing ambiguity handling to choose an owner fails the typed-error and no-reference assertions.
Summary by CodeRabbit
Bug Fixes
Tests