Repository navigation
test(maint): fix three inherited test failures (duplicate assertions, stale column, renamed index) - #1660
Conversation
Three pre-existing test failures discovered during the 2026-05-27 backlog sweep (#1657). Each was a small fix in the test rather than the production code: - tests/unit/storage/test_schema_safety.py — required-index list named the pre-#635 ``idx_conversations_provider`` which was renamed to ``idx_conversations_source_name`` during the provider->source vocabulary transition. - tests/unit/storage/test_repair_blobs.py — seed INSERT into raw_conversations passed seven VALUES against a six-column list. Removed the stale ``'referenced.json'`` literal that pre-dated a column removal. - tests/unit/storage/test_fts5.py — duplicate-and-contradictory assertion on ``hit.source_name`` (asserted both "claude-ai" and "my-source" on the same row). Same shape as the duplicate-column failures fixed in PR #1651/#1652/#1653 — the first assertion is the real contract, the second was a copy-paste of the seed value that was never re-checked when the schema settled. The remaining items in #1657 (order-dependent flake in test_daemon_http_contracts) are not part of this PR. Verification: $ nix develop -c pytest tests/unit/storage/test_repair_blobs.py \\ tests/unit/storage/test_schema_safety.py \\ tests/unit/storage/test_fts5.py 96 passed in 3.01s $ nix develop -c devtools verify --quick exit_code: 0 Ref #1657 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
More reviews will be available in 41 minutes and 38 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 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 |
Three small fixes for pre-existing test failures discovered during
the 2026-05-27 backlog sweep (#1657).
Each was a stale-test issue rather than a production-code bug.
Changes
`tests/unit/storage/test_schema_safety.py` — required-index
list named the pre-refactor(naming): normalize archive, proof, and surface vocabulary #635 `idx_conversations_provider` index, which
was renamed to `idx_conversations_source_name` during the
provider->source storage-column vocabulary transition. Updated
the test, added a one-line comment explaining the rename.
`tests/unit/storage/test_repair_blobs.py` — `_reference_blob`
helper's INSERT into `raw_conversations` passed seven VALUES
against a six-column list, tripping `OperationalError: 7 values
for 6 columns`. The extra `'referenced.json'` literal pre-dated a
schema column removal.
`tests/unit/storage/test_fts5.py` —
`test_search_includes_conversation_metadata` asserted both
`hit.source_name == "claude-ai"` and `hit.source_name == "my-source"`
on the same row (impossible). Same shape as the duplicate-column
failures fixed in PR feat(parsers): wire Claude Code history.jsonl paste evidence into has_paste #1651/perf(daemon): downgrade FTS trigger drift to INFO during fresh bulk catch-up (#1613) #1652/perf(insights): emit progress per table during full session-insight rebuild #1653. Removed the contradictory
second assertion.
Verification
```
$ nix develop -c pytest tests/unit/storage/test_repair_blobs.py \
tests/unit/storage/test_schema_safety.py tests/unit/storage/test_fts5.py
96 passed in 3.01s
$ nix develop -c devtools verify --quick
exit_code: 0
```
Out of scope
The order-dependent flake in `test_daemon_http_contracts.py`
(KeyError 'fts_readiness' / 'component_state' under specific
pytest-randomly seeds) is tracked separately under #1657. It needs
a cross-test mock-state-leak investigation that doesn't fit this
PR's small-cleanup shape.
Ref #1657.