Repository navigation
refactor: delete fixed-defect repair scaffolding and unfabricate archive-debt failures - #3457
Conversation
|
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: 57 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 (16)
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 |
… repair Problem: polylogue/maintenance/hook_deinflation.py was the retroactive repair for hook events ingested as standalone sessions (polylogue-31r1). The forward fix (write_source_hook_event) has owned the invariant since PR #3265, the retroactive pass ran on the live archive, and the module has zero production callers — only its own test imported it. Evidence: live source.db count of rows matching the repair predicate (source_path LIKE '%/hooks/pending/%' AND source_path IN raw_hook_events) is 0; grep for repair_hook_session_inflation finds no caller outside the deleted test. Repair scaffolding for a fixed defect is pure surface area; the invariant (hook events are never persisted as raw sessions) is maintained by the write path and covered by its own tests. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KAAzxpu1wNZLmuAb8Wgyso
Problem: the target existed to derive sessions.created_at_ms/updated_at_ms for rows ingested before the write path learned to fall back to message evidence (polylogue-m3p9). That automatic path has owned the invariant since it landed — covered by the writer tests in tests/unit/storage/test_archive_tiers_write.py (derives-from-evidence, does-not-override-provider, leaves-null-without-evidence) — and index.db is a rebuildable tier, so any residual pre-fix row is regenerated by an ordinary rebuild. Evidence the manual surface is dead: on the live archive, sessions missing created_at_ms/updated_at_ms while having any message with occurred_at_ms evidence = 0 (the remaining NULL-timestamp sessions are genuinely evidence-free and the backfill would never touch them). What changed: removed the catalog spec, the storage backfill module, the repair.py preview/repair shims and handler-dict entries, the module's test file, and regenerated the generated surfaces (cli-reference, test-quality-workflows, topology projection, terminal snapshots). Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KAAzxpu1wNZLmuAb8Wgyso
…ors fail Problem: five collectors in polylogue/operations/archive_debt.py wrapped their SQLite reads in 'except sqlite3.Error: return []' (and _table_exists in 'return False'), so a debt-listing surface that could not read a tier reported an empty debt list — indistinguishable from a genuinely clean archive. This is the fabricated-answer class (polylogue-8zzs/polylogue-oitx shape): the one surface whose job is to reveal problems silently hid its own failure. What changed: _assertion_candidate_rows, _raw_materialization_rows, _provider_usage_rows, and _table_exists now let sqlite3.Error propagate; missing-file and missing-table guards remain explicit representable states. _read_user_version keeps returning None on unreadable files because that None is explicitly modeled downstream as a 'blocked' version-debt row with a caveat, not a fabricated clean answer. The daemon status caller already wraps archive_debt_list and reports 'available: false' on failure, so daemon status degrades explicitly instead of showing an empty debt table; the CLI now fails loudly. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KAAzxpu1wNZLmuAb8Wgyso
polylogue-c831: message_type persisted-classification drift (1,919 live candidates) — the manual backfill target has live work, which is evidence the automatic path diverged, so it stays until the automatic path is fixed. Two more beads: fold fts_startup.py into the fts convergence stage (startup-only repair shape, ppkj-adjacent), and resolve the raw-authority break-glass surfaces against the no-break-glass policy once the blocker backlog work (hjpx/lkrc/t93b) lands. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KAAzxpu1wNZLmuAb8Wgyso
4d79fdc to
12bec08
Compare
Summary
Escape-hatch/defensive-scaffolding sweep: deletes two repair surfaces whose defects are fixed and whose invariants the automatic write path now maintains, and converts the archive-debt collectors' silent
except sqlite3.Error: return []swallows into loud failures. Files beads for the cases where a manual surface turned out to have live work (which is evidence of a broken automatic path, not a deletable hatch).Problem
Standing operator policy: once an automatic path maintains an invariant, the redundant manual surface is deleted, not demoted to break-glass; degraded-mode paths must not silently produce a worse answer.
polylogue/maintenance/hook_deinflation.pywas the one-time retroactive repair for hook events ingested as sessions (polylogue-31r1). The forward fix (write_source_hook_event) owns the invariant, the retroactive pass ran on the live archive, and the module has zero production callers (only its own test imported it). Live evidence: rows matching its repair predicate insource.db= 0.session_timestamp_backfillmaintenance target existed for rows ingested before the writer learned to derivesessions.created_at_ms/updated_at_msfrom message evidence (polylogue-m3p9). The writer path owns that invariant (covered bytests/unit/storage/test_archive_tiers_write.pyderives/does-not-override/leaves-null tests) andindex.dbis rebuildable. Live evidence: sessions missing timestamps while having anyoccurred_at_msmessage evidence = 0.polylogue/operations/archive_debt.pyfabricated "no debt" when they could not read a tier (except sqlite3.Error: return []/return False) — the fabricated-answer class (polylogue-8zzs/oitx): the surface whose job is to reveal problems hid its own failure.Solution
hook_deinflation.py+ its test; regenerate the topology projection.session_timestamp_backfillcatalog spec, storage module,storage/repair.pyshims + handler-dict entries, and its test; update catalog-literal tests; regenerate cli-reference, test-quality-workflows, topology, and terminal snapshots.archive_debt.py: letsqlite3.Errorpropagate in_assertion_candidate_rows,_raw_materialization_rows,_provider_usage_rows,_table_exists. Missing-file/missing-table guards remain explicit representable states._read_user_versiondeliberately keeps returningNoneon unreadable files — thatNoneis explicitly modeled downstream as ablockedversion-debt row with a caveat, not a fabricated clean answer. The daemon status caller already wrapsarchive_debt_listand reportsavailable: falseon failure; the CLI now fails loudly.Kept, with beads instead of cuts (a bypass with live work is a bug report, not a deletion):
message_type_backfill: a read-only scan of the live archive found 1,919 rows (of 1,219,627) the current classifier would reclassify — the ingest path diverged from persisted rows without a SEMANTIC_REPARSE delta. Bead polylogue-c831 owns fixing the automatic path first.daemon/fts_startup.py(startup-only FTS repair duplicating the fts convergence stage) — bead filed, ppkj shape.maintenance/raw_authority_reset.py— bead filed; not actioned because the subsystem is live-degraded (4,174 unresolved blockers) and polylogue-hjpx/lkrc/t93b own that convergence work.Verification
devtools verify --quick— exit 0 (format, lint, mypy --strict, render all --check, 96s).devtools test tests/unit/core/test_maintenance_targets.py tests/unit/devtools/test_artifact_graph.py tests/unit/devtools/test_scenario_coverage.py tests/unit/maintenance/test_targets.py— 21 passed.devtools test tests/unit/maintenance/test_registry.py tests/unit/maintenance/test_idempotency.py tests/unit/maintenance/test_failure_routing.py tests/unit/maintenance/test_resume.py— ok.devtools test tests/unit/cli/test_check_support_runtime.py tests/unit/core/test_artifact_graph.py tests/unit/storage/test_repair.py— ok.devtools test tests/unit/cli/test_debt_command.py— ok.devtools test tests/unit/cli/test_terminal_snapshots.py -- --snapshot-update— 4 snapshots updated (target list shrank).sqlite3 "file:...?mode=ro"; not run: full suite (devtools verify --all), integration tests.🤖 Generated with Claude Code
https://claude.ai/code/session_01KAAzxpu1wNZLmuAb8Wgyso