Repository navigation
Conversation
Problem: polylogue/storage/ was a flat catch-all of 90+ modules with ownership conveyed only by filename prefix (action_event_*, repository_*, store_*, search_*, etc). #425 declares a domain-grouped target shape; verify-topology lint had been carrying the manifest in soft mode. Solution: 63 moves per docs/plans/topology-target.yaml. action_event_*.py -> storage/action_events/ artifact_*.py -> storage/artifacts/ derived_status*.py -> storage/derived/ embedding_stats*.py -> storage/embeddings/ fts_lifecycle*.py -> storage/fts/ raw_ingest_*.py, raw_state_*.py -> storage/raw/ search.py, search_*.py -> storage/search/ store.py, store_runtime_*, store_constants -> storage/runtime/ store_product_*, session_product_* -> storage/products/{aggregate,session,timeline}/ product_read_support.py -> storage/products/ repository.py, repository_* -> storage/repository/{archive,product,action,raw,vectors}/ Notes: - Fixed build_topology_projection bug where exact-filename keys with full-path values (e.g. `repository.py: storage/repository/__init__.py`) produced concatenated nonsense like `__init__.pyrepository.py`. Refactored shared `_apply_rule` helper for both lib and storage. - Relative imports in moved files were re-anchored to the OLD parent package (polylogue.storage), then mapped through the move table — files like search/runtime.py now use absolute imports for cross- cluster references. - polylogue/storage/index.py stayed at storage/ root but its `from .X` imports referenced moved siblings; rewritten to absolute. - Two #425 xfail-strict invariants flip to normal asserts: test_storage_has_products_session_subpackage, test_no_session_product_at_storage_root. Verification: devtools build-topology-projection # 663 rows; #425 cells absorbed into 'stable' devtools verify-topology # realized=663 declared=663 blocking=False devtools verify-cross-cuts # cross-cut tags: clean devtools verify-cluster-cohesion # 42 cycles (= master baseline 43; no new cycles) devtools render-all --check # sync OK mypy polylogue # Success: no issues found in 663 source files pytest -q --ignore=tests/integration # 5615 passed, 7 xfailed # 1 flake on test_tui::test_search_empty_db # (passes on rerun; unrelated) Closes #425 Co-Authored-By: Claude <[email protected]>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 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. Comment |
## Summary - Regroup `polylogue/storage/` modules by ownership domain (archive/products/sessions/repository) per topology projection (#425). ## Problem `polylogue/storage/` had grown to ~80 flat-laid modules — repository/products/backends/sessions intermingled. Topology projection (`docs/plans/topology-target.yaml`) declares ownership-domain clusters; the realized tree didn't match. ## Solution 63 file moves grouping by domain. Imports rewritten via topology-driven AST renamer. Verified via `verify-topology`, `verify-cluster-cohesion`, `verify-test-ownership`. ## Verification - `devtools verify --quick` — green (format, lint, mypy, render-all, all 5 topology lints). - Local `pytest -q --ignore=tests/integration` — all green prior to push. Stacked on #535 (merged). Replaces closed #536 after `--delete-branch` cascade closed it. Closes #425 Co-authored-by: Claude <[email protected]>
## Summary 64 moves grouping `polylogue/lib/` into domain subpackages (query, session, viewport, conversation, message, raw_payload, artifact_taxonomy, action_event, semantic, filter, projection, phase, provider, attachment) per `docs/plans/topology-target.yaml`, plus two package-init merges. **Stacked on #536 (which is stacked on #535).** Merge that train bottom-up; rebase between if needed. ## Problem Per #424: `polylogue/lib/` was a flat catch-all of 80+ modules with domain logic, infrastructure primitives, model carriers, and runtime adapters all coexisting at one level. The substrate ring rule didn't survive the package; manifest declared targets but moves had not landed. ## Solution ``` query_*.py -> lib/query/ session_profile_*.py -> lib/session/ viewport_*.py -> lib/viewport/ conversation_*.py -> lib/conversation/ message_*.py -> lib/message/ raw_payload_*.py -> lib/raw_payload/{decode,streams,sampling_*}.py artifact_taxonomy_*.py -> lib/artifact_taxonomy/{models,runtime,support}.py action_event_*.py -> lib/action_event/ semantic_fact_*.py -> lib/semantic/{models,support}.py semantic_facts.py -> lib/semantic/facts.py filter_*.py, filters -> lib/filter/ projection_*.py -> lib/projection/ phase_extraction.py -> lib/phase/extraction.py provider_*.py -> lib/provider/ attachment_models.py -> lib/attachment/models.py ``` Notes: - `lib/raw_payload.py` and `lib/artifact_taxonomy.py` were merged into their packages' `__init__.py` so the public API surface stays at `polylogue.lib.<pkg>.X` rather than the awkward `polylogue.lib.<pkg>.<pkg>.X`. - Fixed two `build_topology_projection` bugs: 1. The exact-filename rule now triggers on `prefix == name` OR `prefix == name.removesuffix(".py")`, so rules like `"semantic_facts": "lib/semantic/facts.py"` work. 2. Added explicit `semantic_facts -> lib/semantic/facts.py` rule; the broad `semantic_fact` prefix had been incorrectly catching `semantic_facts.py` and chopping it to `s.py`. - Two `#424` xfail-strict invariants flip to normal asserts. ## Verification ``` devtools build-topology-projection # 675 rows; #424 cells absorbed into 'stable' devtools verify-topology # realized=675 declared=675 blocking=False devtools verify-cross-cuts # cross-cut tags: clean devtools verify-cluster-cohesion # 42 cycles (= master baseline 43; no new cycles) devtools render-all --check # sync OK mypy polylogue # Success: no issues found in 675 source files pytest -q --ignore=tests/integration # 5618 passed, 5 xfailed devtools verify --quick # all checks passed ``` Closes #424 Co-authored-by: Claude <[email protected]>
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
## Summary - Regroup `polylogue/storage/` modules by ownership domain (archive/products/sessions/repository) per topology projection (#425). ## Problem `polylogue/storage/` had grown to ~80 flat-laid modules — repository/products/backends/sessions intermingled. Topology projection (`docs/plans/topology-target.yaml`) declares ownership-domain clusters; the realized tree didn't match. ## Solution 63 file moves grouping by domain. Imports rewritten via topology-driven AST renamer. Verified via `verify-topology`, `verify-cluster-cohesion`, `verify-test-ownership`. ## Verification - `devtools verify --quick` — green (format, lint, mypy, render-all, all 5 topology lints). - Local `pytest -q --ignore=tests/integration` — all green prior to push. Stacked on #535 (merged). Replaces closed #536 after `--delete-branch` cascade closed it. Closes #425 Co-authored-by: Claude <[email protected]>
## Summary 64 moves grouping `polylogue/lib/` into domain subpackages (query, session, viewport, conversation, message, raw_payload, artifact_taxonomy, action_event, semantic, filter, projection, phase, provider, attachment) per `docs/plans/topology-target.yaml`, plus two package-init merges. **Stacked on #536 (which is stacked on #535).** Merge that train bottom-up; rebase between if needed. ## Problem Per #424: `polylogue/lib/` was a flat catch-all of 80+ modules with domain logic, infrastructure primitives, model carriers, and runtime adapters all coexisting at one level. The substrate ring rule didn't survive the package; manifest declared targets but moves had not landed. ## Solution ``` query_*.py -> lib/query/ session_profile_*.py -> lib/session/ viewport_*.py -> lib/viewport/ conversation_*.py -> lib/conversation/ message_*.py -> lib/message/ raw_payload_*.py -> lib/raw_payload/{decode,streams,sampling_*}.py artifact_taxonomy_*.py -> lib/artifact_taxonomy/{models,runtime,support}.py action_event_*.py -> lib/action_event/ semantic_fact_*.py -> lib/semantic/{models,support}.py semantic_facts.py -> lib/semantic/facts.py filter_*.py, filters -> lib/filter/ projection_*.py -> lib/projection/ phase_extraction.py -> lib/phase/extraction.py provider_*.py -> lib/provider/ attachment_models.py -> lib/attachment/models.py ``` Notes: - `lib/raw_payload.py` and `lib/artifact_taxonomy.py` were merged into their packages' `__init__.py` so the public API surface stays at `polylogue.lib.<pkg>.X` rather than the awkward `polylogue.lib.<pkg>.<pkg>.X`. - Fixed two `build_topology_projection` bugs: 1. The exact-filename rule now triggers on `prefix == name` OR `prefix == name.removesuffix(".py")`, so rules like `"semantic_facts": "lib/semantic/facts.py"` work. 2. Added explicit `semantic_facts -> lib/semantic/facts.py` rule; the broad `semantic_fact` prefix had been incorrectly catching `semantic_facts.py` and chopping it to `s.py`. - Two `#424` xfail-strict invariants flip to normal asserts. ## Verification ``` devtools build-topology-projection # 675 rows; #424 cells absorbed into 'stable' devtools verify-topology # realized=675 declared=675 blocking=False devtools verify-cross-cuts # cross-cut tags: clean devtools verify-cluster-cohesion # 42 cycles (= master baseline 43; no new cycles) devtools render-all --check # sync OK mypy polylogue # Success: no issues found in 675 source files pytest -q --ignore=tests/integration # 5618 passed, 5 xfailed devtools verify --quick # all checks passed ``` Closes #424 Co-authored-by: Claude <[email protected]>
Summary
63 moves grouping
polylogue/storage/by ownership domain(action_events, artifacts, derived, embeddings, fts, products,
raw, repository, runtime, search) per
docs/plans/topology-target.yaml.Stacked on #535. Merge that first, then this rebases onto master.
Problem
Per #425: storage was a flat catch-all of 90+ modules with ownership
conveyed only by filename prefix. The
verify-topologylint declaredthe targets but the realized tree had not moved yet.
Solution
Notes:
build_topology_projectionbug where exact-filename keyswith full-path values (e.g.
repository.py: storage/repository/__init__.py)produced concatenated nonsense like
__init__.pyrepository.py.Refactored a shared
_apply_rulehelper for both lib and storage.package (
polylogue.storage), then mapped through the move table —files like
search/runtime.pynow use absolute imports.polylogue/storage/index.pystayed at storage/ root but itsfrom .Ximports referenced moved siblings; rewritten to absolute.
#425xfail-strict invariants flip to normal asserts.Verification
Closes #425