Repository navigation
fix(hygiene): scan schema-varying scratchpad tables - #1342
wtrlighting-iron wants to merge 1 commit into
Conversation
|
|
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Tip 🎯 Customize your risk assessments
✅ Automatic approvals, with your rules
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. |
|
Reviewed 6835cde. I reproduced the missing-source error on Main with an explicitly selected scratchpad table. The patch fixes that case; all 180 hygiene tests pass locally. Additional read-only/query-only probes returned all three scratchpad IDs with batch sizes 1, 2 and 10, without changing database bytes. Optional source/timestamp/session/importance defaults also worked for an id/content-only table. One boundary worth tightening is the minimum audit contract at hygiene.py:419-420. The new projection also defaults missing id and content to empty strings. A three-row table without id then reports only 1 or 2 scanned rows with batch_size=1 or 2, and emits empty candidate IDs. A table without content produces fabricated empty_content candidates with score 1.0 and suggested deletion. Previously those incompatible schemas failed explicitly. Please default only optional metadata, or report/skip a table missing the required identity/text fields. Those last probes use incompatible synthetic schemas: they are not a failure of the project's normal scratchpad or memory schemas, and scratchpad candidates cannot pass the cleanup table allowlist. The supported-schema fix itself looks sound. One issue-description clarification: CLI --all scans all rows in its default memory tables; it does not itself add scratchpad. The reproduced scratchpad case uses the explicit tables override in the audit API. |
Summary
source.Fixes #1341.
Test plan
git diff --check origin/main...HEADpytest tests/test_hygiene.py(not yet run: pytest is not installed in the current test environment)