fix(storage): restore literal_check deleted out from under live call sites - #3467
fix(storage): restore literal_check deleted out from under live call sites#3467Sinity wants to merge 1 commit into
Conversation
…sites Problem: PR #3458 (5798b3d, merged 2026-07-31) deleted `literal_check` from `archive_tiers/common.py` as an "uncalled generator", but `archive_tiers/index.py`'s `delegation_facts` DDL calls it twice (`mapping_state` and `result_status` CHECK clauses, built at module import time). The deletion broke `import polylogue.storage.sqlite.archive_tiers` on master -- and therefore ArchiveStore, the CLI, devtools, and every test that touches storage, i.e. essentially the whole toolchain. `devtools status` and any pytest collection that imports `polylogue.storage` failed outright before this fix. What changed: restored `literal_check` (and its `sql_string_literal` import) verbatim, with a docstring noting the deletion was based on a "zero call sites" audit that was wrong -- both call sites are plain `literal_check(...)` calls in index.py, not aliased or generated. Added back to `__all__`. Verification: `python3 -c "import polylogue.storage.sqlite.archive_tiers. index"` and `from ...archive import ArchiveStore` both succeed (previously ImportError). `devtools status` runs. `devtools test tests/unit/storage/test_archive_tiers_common.py tests/unit/archive/test_session_revision_membership.py` -- 48 passed. Found and fixed as a blocking prerequisite while investigating polylogue-oycw (the set-based revision-membership superset fix landed same-day in #3401/#3405); could not run devtools/tests at all until this regression was fixed. Co-Authored-By: Claude <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
Next review available in: 47 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
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 |
|
Superseded — a parallel lane independently found and fixed this exact regression, merged as #3464 shortly before this PR was opened. No remaining diff to land; closing without merge. |
Summary
Restores
literal_checkinpolylogue/storage/sqlite/archive_tiers/common.py, deleted by #3458 as an "uncalled generator" while it actually had two live call sites inarchive_tiers/index.py'sdelegation_factsDDL, breaking the storage import chain onmaster.Problem
Investigating
polylogue-oycw(verifying the set-based revision-comparison fix landed in #3401/#3405), the very firstdevtools status/ any test import failed with:Root cause: #3458 (merged 2026-07-31 16:11, same day) deleted
literal_check, claiming a zero-call-site audit. That audit was wrong —archive_tiers/index.py:1642and:1657callliteral_check("mapping_state", *get_args(DelegationMappingState))andliteral_check("result_status", *get_args(DelegationResultStatus))in thedelegation_factstable DDL, built at module import time. Sincearchive_tiers/__init__.pyimportsindex.pyeagerly, this brokeimport polylogue.storage.sqlite.archive_tiersentirely — and with itArchiveStore,devtools status, and any pytest collection that touches storage (i.e. nearly the whole toolchain).Solution
Restored
literal_checkverbatim (plus itssql_string_literalimport frompolylogue.core.enums), added back to__all__, with a docstring noting the deletion's justification was incorrect and to re-verify with a real grep before deleting again.No behavior change beyond restoring the previously-working import chain — this is a pure revert of one function's deletion.
Verification
Filed while closing
polylogue-oycwwith full AC verification (already satisfied by #3401/#3405, see that bead's closing notes) — this fix was a blocking prerequisite for running any of that verification, not part ofoycw's own scope.Ref polylogue-oycw