feat: attachment indexing, cache, queue, exporters, CLI, and ops runbooks#77
Merged
feat: attachment indexing, cache, queue, exporters, CLI, and ops runbooks#77
Conversation
Closes #35 — promotion review queue with approve/reject/defer/correct/rollback Closes #36 — dry-run exporters for memory, wiki, and reminder surfaces Closes #37 — operations runbooks for sync and extraction job lifecycle Closes #38 — fixture-based evaluation and regression harness Closes #69 — selected-text cache store with TTL and class-filter enforcement Closes #72 — operator CLI (mpi) with search/thread/queue/export/doctor subcommands Closes #73 — attachment metadata indexing (filename, MIME type, size, content-id, inline flag) New modules: cache.py, queue.py, exporters.py, index_writer.py, cli.py New migrations: 002 (attachment metadata), 003 (text_cache + promotion_queue) New scripts: scripts/evaluate.py New docs: docs/ops-runbooks.md New tests: test_attachment_metadata, test_cache, test_queue, test_exporters, test_index_writer, test_cli, test_evaluate https://claude.ai/code/session_01REVqza82cZP43JoVMgu6jw
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 50ef9f1672
ℹ️ 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".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
$(cat <<'EOF'
Summary
Closes #35, #36, #37, #38, #69, #72, #73 — seven issues addressed in one PR.
What's implemented
filename,content_type,size_bytes,content_id,inline_flagstored and queryable; migration 002; fixture extended with multi-attachment + inline-image test messagetext_cachetable with class filter (vip/project/admin/financial/travel/legal only), configurable TTL, eviction, and audit events; migration 003promotion_queuetable;enqueue_candidate,decide(approve/reject/defer/correct/rollback_needed),get_queue,get_item; migration 003export_approved_candidates()writes inspectable markdown/JSON artifacts with provenance + rollback notes; manifest; live mode blocked by guardmpi) —search,thread,queue list/inspect/approve/reject/defer/correct,export,doctorsubcommands;--jsonoutput on all commands; registered asmpientry pointscripts/evaluate.pyruns classification, semantic contract, and noise-suppression checks against fixture corpus; exits non-zero on regressiondocs/ops-runbooks.mdcovers dry-run, incremental sync, backfill, checkpoint resume, live-MailPlus gate, extraction, queue review, export, rollback, audit log, and evaluationNew modules
src/mailplus_intelligence/index_writer.py— writesIndexRecords to SQLite;search_messages()with sender/keyword/folder/date/thread/attachment filterssrc/mailplus_intelligence/cache.py— text cache with class gate, TTL, evictionsrc/mailplus_intelligence/queue.py— promotion review queue CRUDsrc/mailplus_intelligence/exporters.py— dry-run artifact generationsrc/mailplus_intelligence/cli.py— operator CLI (mpi)src/mailplus_intelligence/migrations/002_attachment_metadata.sqlsrc/mailplus_intelligence/migrations/003_cache_and_queue.sqlscripts/evaluate.py— offline evaluation harnessdocs/ops-runbooks.mdSchema changes
apply_all_migrations()added toschema.py— version-aware, idempotentcontent_id TEXT,inline_flag INTEGERonattachments; indexes oncontent_typeandfilenametext_cachetable;promotion_queuetableTests
90 tests pass (2 pre-existing failures are Python 3.11 vs ≥3.12 version check in
test_doctor.py— unrelated to this PR).New test files:
test_attachment_metadata,test_cache,test_queue,test_exporters,test_index_writer,test_cli,test_evaluate.Test plan
https://claude.ai/code/session_01REVqza82cZP43JoVMgu6jw
EOF
)
Generated by Claude Code