Repository navigation
refactor(maintenance): rename session insight target - #686
Conversation
Problem: after the public insights vocabulary cleanup, the maintenance target and storage refresh/rebuild helpers still used session_products naming even though they operate on durable session insights and no matching SQLite table exists. What changed: renamed the maintenance target to session_insights, renamed rebuild/refresh/delete helper functions to session_insight vocabulary, updated operation/artifact/scenario references, refreshed generated docs and CLI/help baselines, and updated tests. Verification: devtools verify --quick; pytest -q --ignore=tests/integration.
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (58)
✨ 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. Review rate limit: 0/1 reviews remaining, refill in 25 minutes and 5 seconds.Comment |
Polylogue Proof PackRefs: Affected Domains
Required Gates
Known Gaps
Oracle / Cost
|
There was a problem hiding this comment.
Pull request overview
This PR completes the remaining session_products → session_insights vocabulary migration across Polylogue’s maintenance, storage-materialization, pipeline, artifact/spec, and documentation surfaces so the durable session-read-model naming matches the rest of the codebase.
Changes:
- Renames session-insight rebuild/refresh/delete helpers and rewires their callers in storage, pipeline, repair, and archive operations.
- Renames the maintenance target and related scenario/artifact/spec references from
session_productstosession_insights. - Updates docs, baselines, benchmarks, and broad unit/integration coverage to reflect the new terminology.
Reviewed changes
Copilot reviewed 58 out of 58 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
tests/unit/storage/test_session_insight_refresh.py |
Updates refresh tests to the renamed bulk-update helper. |
tests/unit/storage/test_repository_insight_runtime.py |
Renames repository-runtime test cases to insight vocabulary. |
tests/unit/storage/test_repair.py |
Updates repair-preview expectations to the renamed maintenance target. |
tests/unit/storage/test_insight_materialization_laws.py |
Uses renamed sync rebuild helper in materialization-law tests. |
tests/unit/storage/test_backend.py |
Updates backend delete-contract test to renamed rebuild helper. |
tests/unit/showcase/test_exercise_catalog.py |
Renames doctor exercise target in showcase catalog expectations. |
tests/unit/scenarios/test_operational_surfaces.py |
Updates operational surface expectations for new target name. |
tests/unit/scenarios/test_metadata.py |
Renames maintenance-target metadata expectations. |
tests/unit/pipeline/test_run_stages_runtime.py |
Updates pipeline stage patches to renamed rebuild/refresh helpers. |
tests/unit/pipeline/test_run_sources.py |
Renames materialize-stage rebuild patch target. |
tests/unit/pipeline/test_parsing_service.py |
Renames emitted diagnostics key expectation. |
tests/unit/pipeline/test_ingest_batch.py |
Updates ingest-batch tests to renamed bulk refresh helper. |
tests/unit/mcp/test_tool_contracts.py |
Renames archive-debt MCP payload expectations. |
tests/unit/devtools/test_validation_lanes.py |
Updates validation-lane doctor target expectation. |
tests/unit/devtools/test_scenario_coverage.py |
Renames scenario-coverage maintenance target expectation. |
tests/unit/devtools/test_quality_registry.py |
Updates quality-registry expectations and local names. |
tests/unit/devtools/test_execution_specs.py |
Renames maintenance target in execution-spec expectations. |
tests/unit/devtools/test_benchmark_campaigns.py |
Updates benchmark runner/helper names to insight vocabulary. |
tests/unit/devtools/test_artifact_graph.py |
Renames artifact-graph maintenance target expectations. |
tests/unit/core/test_resume.py |
Uses renamed rebuild helper and updated uncertainty text. |
tests/unit/core/test_maintenance_targets.py |
Updates maintenance-catalog expectations and repair hints. |
tests/unit/core/test_insight_readiness.py |
Uses renamed rebuild helper in readiness tests. |
tests/unit/core/test_insight_export_bundles.py |
Uses renamed rebuild helper for export-bundle seeding. |
tests/unit/core/test_facade_api.py |
Updates facade seeding path to renamed rebuild helper. |
tests/unit/core/test_artifact_graph.py |
Renames repair target expectations in core artifact graph tests. |
tests/unit/cli/test_resume.py |
Uses renamed rebuild helper in CLI resume tests. |
tests/unit/cli/test_query_exec.py |
Aligns query-exec test naming with insight terminology. |
tests/unit/cli/test_insights.py |
Renames CLI insight rebuild/status tests and expectations. |
tests/unit/cli/test_check_support_runtime.py |
Updates check-workflow maintenance target expectations. |
tests/unit/cli/test_check_rendering_plain_runtime.py |
Renames plain rendering maintenance target expectation. |
tests/unit/cli/test_check.py |
Updates doctor/check target names and JSON expectations. |
tests/unit/cli/__snapshots__/test_terminal_snapshots.ambr |
Refreshes terminal help snapshot for renamed target. |
tests/unit/architecture/test_topology_invariants.py |
Adjusts topology-invariant wording and storage-root checks. |
tests/integration/test_health.py |
Renames integration maintenance expectations to session_insights. |
tests/baselines/showcase/help-doctor.txt |
Refreshes showcase help baseline for renamed target. |
polylogue/storage/repository/archive/writes/conversations.py |
Updates delete flow to call renamed session-insight cleanup helper. |
polylogue/storage/repair.py |
Renames repair/preview helpers and maintenance status key. |
polylogue/storage/insights/session/refresh.py |
Renames refresh/delete helper functions and record-builder calls. |
polylogue/storage/insights/session/rebuild.py |
Renames rebuild and record-bundle helper functions. |
polylogue/storage/insights/session/profiles.py |
Updates internal comment references to insight naming. |
polylogue/storage/derived/derived_status.py |
Renames private session-insight metrics helper. |
polylogue/storage/backends/query_store.py |
Renames summary-query import alias to insight vocabulary. |
polylogue/scenarios/operational_surfaces.py |
Renames doctor scenario command arguments. |
polylogue/pipeline/services/ingest_batch.py |
Renames bulk refresh helper, docstring, and log event key. |
polylogue/pipeline/run_stages.py |
Rewires materialize stage to renamed rebuild/refresh helpers. |
polylogue/operations/specs.py |
Updates operation code refs to renamed session-insight helpers. |
polylogue/operations/archive.py |
Renames repair hint target and rebuild entrypoint import. |
polylogue/maintenance/targets.py |
Renames canonical maintenance target to session_insights. |
polylogue/insights/readiness.py |
Updates readiness repair hint to new target name. |
polylogue/cli/shared/check_workflow.py |
Renames progress-callback target gating logic. |
polylogue/artifacts/__init__.py |
Renames artifact repair targets and code references. |
docs/test-quality-workflows.md |
Updates workflow prose from product to insight vocabulary. |
docs/internals.md |
Updates internal contributor guidance and storage paths. |
docs/cli-reference.md |
Refreshes CLI reference for renamed doctor target. |
docs/architecture.md |
Updates architecture docs to current insight/storage paths. |
devtools/validation_lane_catalog_contracts.py |
Renames validation-lane descriptions to insight wording. |
devtools/synthetic_benchmark_runtime.py |
Renames session-insight benchmark helpers and runner mapping. |
devtools/build_topology_projection.py |
Removes stale product move rules and updates insight prefix mapping. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "session_insights": _archive_debt_status( | ||
| "session_insights", | ||
| issue_count=session_insights, | ||
| detail="Session-product read models ready" |
| files = {p.name for p in (ROOT / "polylogue" / "storage").glob("*.py")} | ||
| legacy = {f for f in files if f.startswith("session_product_") or f.startswith("store_product_")} | ||
| assert not legacy, f"product-storage modules still at storage/ root: {sorted(legacy)}" | ||
| legacy = {f for f in files if f.startswith("session_insight_") or f.startswith("store_insight_")} |
## Summary Renames the remaining session-products maintenance and storage-helper vocabulary to session insights. ## Problem PR #685 moved public APIs, MCP, payloads, proof/reporting, and docs to insight vocabulary, but the repair target, rebuild/refresh helper names, and CLI doctor target still exposed `session_products`. The scan confirmed there is no SQLite `session_products` table; this was vocabulary around durable session insight materialization, not a schema table migration. ## Solution - Renamed the maintenance target from `session_products` to `session_insights`. - Renamed storage/pipeline helpers such as `rebuild_session_products_sync`, `refresh_session_products_bulk`, and `delete_session_products_for_conversation_async` to session-insight equivalents. - Updated repair status, artifact graph, operation specs, scenarios, validation lanes, benchmark catalog/runtime, generated docs, CLI help baselines, and tests. - Removed stale topology move rules for old `repository_product_` / `store_product_` root-file names and corrected docs to point at `storage/insights/session/` and `storage/repository/insight/`. ## Verification - `pytest -q tests/unit/architecture/test_topology_invariants.py tests/unit/storage/test_repository_insight_runtime.py tests/unit/core/test_maintenance_targets.py tests/unit/storage/test_repair.py tests/unit/cli/test_check.py tests/unit/cli/test_check_support_runtime.py tests/unit/cli/test_insights.py tests/unit/devtools/test_validation_lanes.py tests/unit/devtools/test_benchmark_campaigns.py` → 281 passed in 11.97s - `devtools verify --quick` → all checks passed - `pytest -q --ignore=tests/integration` → 5784 passed in 162.83s Ref #635
Summary
Renames the remaining session-products maintenance and storage-helper vocabulary to session insights.
Problem
PR #685 moved public APIs, MCP, payloads, proof/reporting, and docs to insight vocabulary, but the repair target, rebuild/refresh helper names, and CLI doctor target still exposed
session_products. The scan confirmed there is no SQLitesession_productstable; this was vocabulary around durable session insight materialization, not a schema table migration.Solution
session_productstosession_insights.rebuild_session_products_sync,refresh_session_products_bulk, anddelete_session_products_for_conversation_asyncto session-insight equivalents.repository_product_/store_product_root-file names and corrected docs to point atstorage/insights/session/andstorage/repository/insight/.Verification
pytest -q tests/unit/architecture/test_topology_invariants.py tests/unit/storage/test_repository_insight_runtime.py tests/unit/core/test_maintenance_targets.py tests/unit/storage/test_repair.py tests/unit/cli/test_check.py tests/unit/cli/test_check_support_runtime.py tests/unit/cli/test_insights.py tests/unit/devtools/test_validation_lanes.py tests/unit/devtools/test_benchmark_campaigns.py→ 281 passed in 11.97sdevtools verify --quick→ all checks passedpytest -q --ignore=tests/integration→ 5784 passed in 162.83sRef #635