Repository navigation
refactor(cli): move absorbed read views out of commands - #2072
Conversation
Move the context, context-pack, and correlation read-view implementations into their owning context/insight modules instead of keeping behavior under polylogue.cli.commands. The query read dispatcher and viewport profiles now point at those owner modules directly, and tests import/patch the owner modules rather than command adapters.\n\nRef #1849
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (12)
📝 WalkthroughWalkthroughThree read-view functions ( ChangesView logic migration to domain modules
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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. Comment |
Summary
Move the already-absorbed context, context-pack, and correlation read-view implementations out of
polylogue.cli.commandsand into their owning context/insight modules. The read dispatcher and read-view profiles now point at those owner modules directly, and the focused tests import/patch those modules instead of command wrappers.Problem
read --view context,read --view context-pack, andread --view correlationhad been absorbed into the read surface, but their implementations still lived underpolylogue.cli.commands. That kept the old command-module layout as the behavioral owner and made later root-command pruning riskier than it needed to be.Solution
polylogue.context.preamble.polylogue.context.pack.polylogue.insights.correlation_view.polylogue.cli.query_verbsandpolylogue.archive.viewport.profilesto the new owners.This deliberately does not add any old-command absence blacklist test.
Ref #1849
Verification
python -m py_compile polylogue/context/__init__.py polylogue/context/preamble.py polylogue/context/pack.py polylogue/insights/correlation_view.py polylogue/cli/query_verbs.py polylogue/archive/viewport/profiles.pyexited 0.nix develop --command devtools test tests/unit/cli/test_context_view.py tests/unit/cli/test_context_pack_view.py tests/unit/cli/test_correlate_view.py tests/unit/cli/test_query_verbs_runtime.py -k 'context or correlation'selected 9 tests: 9 passed, 23 deselected.nix develop --command devtools verify --quickexited 0.devtools verify --quickon5aad7daexited 0.I also started the default
nix develop --command devtools verify; static/generated checks passed, but the pytest-testmon phase selected a very large affected set and was interrupted after 711s at 69%. I am not counting that as a passing gate.Summary by CodeRabbit
Release Notes
No functional changes to user-facing features or behavior.