Repository navigation
refactor(archive): move conversation models out of lib - #655
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (75)
📝 WalkthroughWalkthroughThis PR systematically migrates conversation-related modules from Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related issues
Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
Polylogue Proof PackRefs: Affected Domains
Required Gates
Known Gaps
Oracle / Cost
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dbce10d1a1
ℹ️ 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".
There was a problem hiding this comment.
Pull request overview
Moves the conversation domain package from polylogue.lib into polylogue.archive, updating internal and surface-layer imports while keeping the public polylogue.lib facades aligned with the new archive-domain ownership.
Changes:
- Relocates conversation domain modules to
polylogue/archive/conversation/(branch types, attribution, work-event extraction, neighbor discovery, thread building). - Updates imports across storage/repository, pipeline/materialization, API/MCP/CLI, UI, and tests to reference
polylogue.archive.conversation.*. - Refreshes topology ownership/mappings and updates library API docs to point at the new module paths.
Reviewed changes
Copilot reviewed 70 out of 75 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/storage/test_store_ops.py | Update Conversation import to archive conversation models. |
| tests/unit/storage/test_search_misc.py | Update BranchType import to archive conversation package. |
| tests/unit/storage/test_hybrid.py | Update BranchType import to archive conversation package. |
| tests/unit/storage/test_archive_search_contracts.py | Update Conversation import to archive conversation models. |
| tests/unit/sources/test_parsers_codex.py | Update BranchType import to archive conversation package. |
| tests/unit/pipeline/test_branching.py | Update BranchType import to archive conversation package. |
| tests/unit/mcp/test_tool_contracts.py | Update neighbor-candidate imports to archive conversation package. |
| tests/unit/lib/test_search_hits.py | Update Conversation/ConversationSummary imports to archive conversation models. |
| tests/unit/lib/test_coverage_diagnostics.py | Update ConversationSummary import to archive conversation models. |
| tests/unit/core/test_threads_runtime.py | Update threads import to archive conversation package. |
| tests/unit/core/test_session_summaries.py | Update work-event extraction imports to archive conversation package. |
| tests/unit/core/test_repo_identity.py | Update attribution imports to archive conversation package. |
| tests/unit/core/test_neighbor_candidates.py | Update neighbor discovery imports to archive conversation package. |
| tests/unit/core/test_filters_props.py | Update Conversation import to archive conversation models. |
| tests/unit/cli/test_neighbors_command.py | Update neighbor-candidate imports to archive conversation package. |
| tests/unit/cli/test_command_aux_runtime.py | Update neighbor-candidate imports to archive conversation package. |
| tests/unit/archive/test_query_search_runtime.py | Update ConversationSummary import to archive conversation models. |
| tests/unit/archive/test_query_runtime_matching.py | Update Conversation import to archive conversation models. |
| tests/unit/archive/test_query_runtime_filters.py | Update BranchType/ConversationSummary imports to archive conversation package. |
| tests/infra/storage_records.py | Update BranchType + TYPE_CHECKING Conversation imports to archive conversation package. |
| tests/infra/pipeline_roundtrip.py | Update Conversation import to archive conversation models. |
| polylogue/ui/tui/screens/base.py | Update TYPE_CHECKING Conversation import to archive conversation models. |
| polylogue/surfaces/payloads.py | Update TYPE_CHECKING neighbor-candidate imports to archive conversation package. |
| polylogue/storage/runtime/archive/records.py | Update BranchType import to archive conversation package. |
| polylogue/storage/repository/vectors/repository_vectors.py | Update TYPE_CHECKING Conversation import to archive conversation models. |
| polylogue/storage/repository/product/timeline_reads.py | Update WorkEvent import to archive conversation extraction. |
| polylogue/storage/repository/product/thread_reads.py | Update WorkThread import to archive conversation threads. |
| polylogue/storage/repository/archive/writes/conversations.py | Update Conversation import to archive conversation models. |
| polylogue/storage/repository/archive/tree.py | Update Conversation import to archive conversation models. |
| polylogue/storage/repository/archive/search.py | Update TYPE_CHECKING conversation model imports to archive conversation models. |
| polylogue/storage/repository/archive/repository_writes.py | Update Conversation import to archive conversation models. |
| polylogue/storage/repository/archive/queries.py | Update conversation model imports to archive conversation models. |
| polylogue/storage/repository/archive/conversations.py | Update conversation model imports to archive conversation models. |
| polylogue/storage/products/session/timeline_rows.py | Update WorkEvent import to archive conversation extraction. |
| polylogue/storage/products/session/threads.py | Update thread building imports to archive conversation threads. |
| polylogue/storage/products/session/rebuild.py | Update BranchType/Conversation imports to archive conversation package. |
| polylogue/storage/products/session/profiles.py | Update WorkEvent/WorkEventPayload imports to archive conversation extraction. |
| polylogue/storage/hydrators.py | Update conversation model imports to archive conversation models. |
| polylogue/storage/backends/queries/mappers_archive.py | Update BranchType import to archive conversation package. |
| polylogue/sources/parsers/codex.py | Update BranchType import to archive conversation package. |
| polylogue/sources/parsers/claude/code_parser.py | Update BranchType import to archive conversation package. |
| polylogue/sources/parsers/base_models.py | Update BranchType import to archive conversation package. |
| polylogue/site/models.py | Update TYPE_CHECKING ConversationSummary import to archive conversation models. |
| polylogue/protocols.py | Update TYPE_CHECKING conversation model imports to archive conversation models. |
| polylogue/products/resume.py | Update Conversation import to archive conversation models. |
| polylogue/pipeline/services/ingest_worker.py | Update BranchType import to archive conversation package. |
| polylogue/pipeline/materialization_runtime.py | Update BranchType import to archive conversation package. |
| polylogue/operations/archive.py | Update conversation/neighbor-candidate imports to archive conversation package. |
| polylogue/mcp/server_prompts.py | Update TYPE_CHECKING Conversation import to archive conversation models. |
| polylogue/mcp/payloads.py | Update TYPE_CHECKING neighbor-candidate import to archive conversation package. |
| polylogue/lib/session/runtime.py | Update attribution/work-event extraction imports to archive conversation package. |
| polylogue/lib/session/models.py | Update attribution/work-event type imports to archive conversation package. |
| polylogue/lib/models.py | Re-export conversation models from polylogue.archive.conversation.models. |
| polylogue/lib/init.py | Update lazy exports for BranchType/Conversation to archive conversation package. |
| polylogue/cli/commands/neighbors.py | Update neighbor-candidate imports to archive conversation package. |
| polylogue/archive/semantic/content_projection.py | Update TYPE_CHECKING Conversation import to archive conversation models. |
| polylogue/archive/projection/terminal_mixin.py | Update TYPE_CHECKING Conversation import to archive conversation models. |
| polylogue/archive/projection/projections.py | Update TYPE_CHECKING Conversation import to archive conversation models. |
| polylogue/archive/filter/filters.py | Update TYPE_CHECKING conversation model imports to archive conversation models. |
| polylogue/archive/conversation/threads.py | New archive-owned thread builder + thread payload models. |
| polylogue/archive/conversation/summary_runtime.py | Update BranchType import to archive conversation package. |
| polylogue/archive/conversation/runtime.py | Update BranchType and internal Conversation import to archive conversation package. |
| polylogue/archive/conversation/neighbor_candidates.py | Update TYPE_CHECKING conversation model imports to archive conversation models. |
| polylogue/archive/conversation/models.py | Update imports to reference archive conversation runtime/branch types. |
| polylogue/archive/conversation/extraction.py | New archive-owned work-event extraction implementation. |
| polylogue/archive/conversation/branch_type.py | New archive-owned BranchType enum module. |
| polylogue/archive/conversation/attribution.py | New archive-owned attribution extraction implementation. |
| polylogue/archive/conversation/init.py | Establish archive conversation package root. |
| polylogue/api/sync/conversations.py | Update TYPE_CHECKING conversation model imports to archive conversation models. |
| polylogue/api/archive.py | Update TYPE_CHECKING conversation model imports to archive conversation models. |
| polylogue/init.py | Update root lazy export for Conversation to archive conversation models. |
| docs/topology-status.md | Add archive-conversation cell and update counts. |
| docs/plans/topology-target.yaml | Assign new archive conversation files to archive-conversation; remove old lib conversation entries. |
| docs/library-api.md | Update import example to polylogue.archive.conversation.threads. |
| devtools/build_topology_projection.py | Update topology projection mappings/owners for conversation to archive/conversation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| from polylogue.lib.session.session_profile import build_session_profile, infer_auto_tags | ||
| from polylogue.lib.conversation.threads import build_session_threads | ||
| from polylogue.archive.conversation.threads import build_session_threads | ||
| ``` |
## Summary Move the conversation domain package from `polylogue.lib` into `polylogue.archive`, keeping conversation models, branch types, attribution, work-event extraction, neighbor discovery, and thread building with archive-domain code. ## Problem `polylogue/lib/conversation` owned archive conversation meaning while living under the generic `lib` namespace. After query, filter, message, semantic, projection, and related packages moved into `archive`, conversation remained the largest archive-domain package in the old bucket. ## Solution - Rename `polylogue/lib/conversation` to `polylogue/archive/conversation`. - Update public facades, API/MCP/CLI surfaces, storage hydration/repositories, pipeline materialization, products, parsers, and tests to import the archive package. - Refresh topology ownership from `lib-conversation` to `archive-conversation`. - Update the library API docs import example for session thread building. ## Verification - `ruff check --fix polylogue/ tests/ devtools/` followed by `ruff check polylogue/ tests/ devtools/` - `pytest -q tests/unit/core/test_conversation_semantics.py tests/unit/core/test_threads_runtime.py tests/unit/core/test_session_summaries.py tests/unit/core/test_neighbor_candidates.py tests/unit/core/test_repo_identity.py` — 59 passed - `pytest -q tests/unit/archive/test_query_runtime_filters.py tests/unit/archive/test_query_runtime_matching.py tests/unit/archive/test_query_search_runtime.py tests/unit/storage/test_store_ops.py tests/unit/storage/test_archive_search_contracts.py tests/unit/storage/test_search_misc.py` — 107 passed - `pytest -q tests/unit/cli/test_neighbors_command.py tests/unit/cli/test_command_aux_runtime.py tests/unit/mcp/test_tool_contracts.py tests/unit/pipeline/test_branching.py tests/unit/sources/test_parsers_codex.py` — 116 passed - `devtools build-topology-projection && devtools verify-topology` - `devtools render-all --check` - pre-push `devtools verify --quick` — all checks passed Ref #635
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
Summary
Move the conversation domain package from
polylogue.libintopolylogue.archive, keeping conversation models, branch types, attribution, work-event extraction, neighbor discovery, and thread building with archive-domain code.Problem
polylogue/lib/conversationowned archive conversation meaning while living under the genericlibnamespace. After query, filter, message, semantic, projection, and related packages moved intoarchive, conversation remained the largest archive-domain package in the old bucket.Solution
polylogue/lib/conversationtopolylogue/archive/conversation.lib-conversationtoarchive-conversation.Verification
ruff check --fix polylogue/ tests/ devtools/followed byruff check polylogue/ tests/ devtools/pytest -q tests/unit/core/test_conversation_semantics.py tests/unit/core/test_threads_runtime.py tests/unit/core/test_session_summaries.py tests/unit/core/test_neighbor_candidates.py tests/unit/core/test_repo_identity.py— 59 passedpytest -q tests/unit/archive/test_query_runtime_filters.py tests/unit/archive/test_query_runtime_matching.py tests/unit/archive/test_query_search_runtime.py tests/unit/storage/test_store_ops.py tests/unit/storage/test_archive_search_contracts.py tests/unit/storage/test_search_misc.py— 107 passedpytest -q tests/unit/cli/test_neighbors_command.py tests/unit/cli/test_command_aux_runtime.py tests/unit/mcp/test_tool_contracts.py tests/unit/pipeline/test_branching.py tests/unit/sources/test_parsers_codex.py— 116 passeddevtools build-topology-projection && devtools verify-topologydevtools render-all --checkdevtools verify --quick— all checks passedRef #635
Summary by CodeRabbit
Chores
Documentation