Skip to content

refactor(insights): rename product surface - #676

Merged
Sinity merged 1 commit into
masterfrom
feature/refactor/insights-surface-rename
May 1, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/refactor/insights-surface-rename

Conversation

@Sinity

@Sinity Sinity commented May 1, 2026

Copy link
Copy Markdown
Owner

Summary

Renames the durable derived read-model surface from products to insights across the public CLI, Python packages, MCP helper registration, scenario surfaces, storage ownership packages, tests, generated docs, and topology metadata.

Problem

The naming audit selected insights as the clearer concept for these derived read models. Keeping products in package paths, command names, generated surfaces, and tests preserved the old conceptual mismatch and made new work choose between two vocabularies.

Solution

  • Moves polylogue/products to polylogue/insights and updates the registry, readiness, export bundle, resume, and archive contracts around insight terminology.
  • Replaces the public polylogue products command with polylogue insights, with no compatibility alias.
  • Renames MCP/CLI/storage/scenario helper modules from product ownership to insight ownership.
  • Regenerates CLI references, topology, verification catalog, scenario/quality docs, and showcase/help baselines.
  • Updates tests and snapshots to assert the insights surface.

This intentionally leaves persisted SQLite table names and maintenance target identifiers such as session_products alone; changing persisted schema identifiers is a separate migration decision, not part of this surface/package rename.

Verification

  • ruff format --check polylogue tests devtools && ruff check polylogue tests devtools
  • mypy polylogue/
  • devtools render-all --check
  • devtools verify-topology && devtools verify-layering && devtools verify-test-ownership
  • pytest -q --ignore=tests/integration -> 5774 passed in 182.83s (0:03:02)
  • pre-push devtools verify --quick -> all checks passed

Ref #624
Ref #635

Problem: the derived read-model layer still used product terminology in package names, CLI commands, MCP registration, scenarios, and tests after the naming audit selected insights as the clearer concept. Keeping the old names would preserve exactly the drift the audit called out.

What changed: moved the public derived read-model surface from products to insights across the Python packages, CLI command group, MCP tool registration helpers, scenario surfaces, storage ownership packages, generated docs, topology manifests, and tests. The old products command/package paths are removed instead of aliased.

Verification:
- ruff format --check polylogue tests devtools && ruff check polylogue tests devtools
- mypy polylogue/
- devtools render-all --check
- devtools verify-topology && devtools verify-layering && devtools verify-test-ownership
- pytest -q --ignore=tests/integration

Ref #624
Ref #635
Copilot AI review requested due to automatic review settings May 1, 2026 22:22
@Sinity
Sinity merged commit 690e2c3 into master May 1, 2026
11 of 13 checks passed
@coderabbitai

coderabbitai Bot commented May 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 207 files, which is 57 over the limit of 150.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1569637d-417b-45eb-a309-4feb19f0f4dc

📥 Commits

Reviewing files that changed from the base of the PR and between 01cbb36 and debc484.

📒 Files selected for processing (207)
  • devtools/build_topology_projection.py
  • devtools/render_cli_reference.py
  • devtools/synthetic_benchmark_catalog.py
  • devtools/synthetic_benchmark_runtime.py
  • devtools/validation_lane_catalog_composites.py
  • devtools/validation_lane_catalog_contracts.py
  • devtools/validation_lane_catalog_live.py
  • devtools/verify_test_ownership.py
  • docs/architecture.md
  • docs/cli-reference.md
  • docs/internals.md
  • docs/library-api.md
  • docs/plans/assurance-domains.yaml
  • docs/plans/layering.yaml
  • docs/plans/scenario-coverage.yaml
  • docs/plans/topology-target.yaml
  • docs/test-quality-workflows.md
  • docs/verification-catalog.md
  • polylogue/api/__init__.py
  • polylogue/api/archive.py
  • polylogue/api/insights.py
  • polylogue/api/sync/__init__.py
  • polylogue/api/sync/insights.py
  • polylogue/archive/__init__.py
  • polylogue/archive/conversation/threads.py
  • polylogue/artifacts/__init__.py
  • polylogue/cli/click_command_registration.py
  • polylogue/cli/commands/insights.py
  • polylogue/cli/commands/resume.py
  • polylogue/cli/insights_rendering.py
  • polylogue/cli/query.py
  • polylogue/cli/shared/check_support.py
  • polylogue/cli/shared/helper_summary.py
  • polylogue/cli/shared/insight_command_contracts.py
  • polylogue/cli/shared/resume_rendering.py
  • polylogue/insights/__init__.py
  • polylogue/insights/archive.py
  • polylogue/insights/archive_models.py
  • polylogue/insights/archive_rollups.py
  • polylogue/insights/archive_summaries.py
  • polylogue/insights/authored_payloads.py
  • polylogue/insights/export_bundles.py
  • polylogue/insights/readiness.py
  • polylogue/insights/registry.py
  • polylogue/insights/resume.py
  • polylogue/maintenance/targets.py
  • polylogue/mcp/insight_tool_contracts.py
  • polylogue/mcp/server_insight_tools.py
  • polylogue/mcp/server_tools.py
  • polylogue/operations/__init__.py
  • polylogue/operations/archive.py
  • polylogue/operations/specs.py
  • polylogue/pipeline/payload_types.py
  • polylogue/pipeline/run_stages.py
  • polylogue/pipeline/services/ingest_batch.py
  • polylogue/products/__init__.py
  • polylogue/proof/catalog.py
  • polylogue/proof/subjects.py
  • polylogue/scenarios/__init__.py
  • polylogue/scenarios/assertions.py
  • polylogue/scenarios/cli_surfaces.py
  • polylogue/scenarios/corpus.py
  • polylogue/scenarios/executable.py
  • polylogue/scenarios/execution.py
  • polylogue/scenarios/insight_surfaces.py
  • polylogue/scenarios/metadata.py
  • polylogue/scenarios/operational_surfaces.py
  • polylogue/scenarios/product_surfaces.py
  • polylogue/scenarios/projections.py
  • polylogue/scenarios/specs.py
  • polylogue/showcase/catalog_loader.py
  • polylogue/showcase/generators.py
  • polylogue/showcase/qa_markdown.py
  • polylogue/showcase/qa_session_payload.py
  • polylogue/showcase/qa_summary.py
  • polylogue/showcase/report_models.py
  • polylogue/showcase/showcase_report_payloads.py
  • polylogue/showcase/showcase_runner_support.py
  • polylogue/site/models.py
  • polylogue/storage/backends/async_sqlite.py
  • polylogue/storage/backends/async_sqlite_archive.py
  • polylogue/storage/backends/queries/__init__.py
  • polylogue/storage/backends/queries/mappers.py
  • polylogue/storage/backends/queries/mappers_insight_aggregates.py
  • polylogue/storage/backends/queries/mappers_insight_legacy.py
  • polylogue/storage/backends/queries/mappers_insight_profiles.py
  • polylogue/storage/backends/queries/mappers_insight_timelines.py
  • polylogue/storage/backends/queries/session_insight_profile_reads.py
  • polylogue/storage/backends/queries/session_insight_profile_writes.py
  • polylogue/storage/backends/queries/session_insight_summary_queries.py
  • polylogue/storage/backends/queries/session_insight_thread_queries.py
  • polylogue/storage/backends/queries/session_insight_timeline_reads.py
  • polylogue/storage/backends/queries/session_insight_timeline_writes.py
  • polylogue/storage/backends/query_store.py
  • polylogue/storage/backends/query_store_insight_profiles.py
  • polylogue/storage/backends/query_store_insight_timelines.py
  • polylogue/storage/backends/schema_bootstrap.py
  • polylogue/storage/backends/schema_ddl.py
  • polylogue/storage/backends/schema_ddl_insight_aggregates.py
  • polylogue/storage/backends/schema_ddl_insight_profiles.py
  • polylogue/storage/backends/schema_ddl_insight_timelines.py
  • polylogue/storage/derived/derived_status.py
  • polylogue/storage/derived/insights.py
  • polylogue/storage/embeddings/embedding_stats.py
  • polylogue/storage/embeddings/support.py
  • polylogue/storage/insights/__init__.py
  • polylogue/storage/insights/aggregate/__init__.py
  • polylogue/storage/insights/aggregate/records.py
  • polylogue/storage/insights/insight_read_support.py
  • polylogue/storage/insights/session/__init__.py
  • polylogue/storage/insights/session/aggregates.py
  • polylogue/storage/insights/session/profiles.py
  • polylogue/storage/insights/session/rebuild.py
  • polylogue/storage/insights/session/records.py
  • polylogue/storage/insights/session/refresh.py
  • polylogue/storage/insights/session/runtime.py
  • polylogue/storage/insights/session/status.py
  • polylogue/storage/insights/session/storage.py
  • polylogue/storage/insights/session/threads.py
  • polylogue/storage/insights/session/timeline_rows.py
  • polylogue/storage/insights/timeline/__init__.py
  • polylogue/storage/insights/timeline/records.py
  • polylogue/storage/repair.py
  • polylogue/storage/repository/__init__.py
  • polylogue/storage/repository/archive/writes/conversations.py
  • polylogue/storage/repository/insight/__init__.py
  • polylogue/storage/repository/insight/profile_reads.py
  • polylogue/storage/repository/insight/summary_reads.py
  • polylogue/storage/repository/insight/thread_reads.py
  • polylogue/storage/repository/insight/timeline_reads.py
  • polylogue/storage/runtime/__init__.py
  • polylogue/storage/runtime/store_constants.py
  • tests/baselines/showcase/help-insights-analytics.txt
  • tests/baselines/showcase/help-insights-cost-rollups.txt
  • tests/baselines/showcase/help-insights-costs.txt
  • tests/baselines/showcase/help-insights-day-summaries.txt
  • tests/baselines/showcase/help-insights-debt.txt
  • tests/baselines/showcase/help-insights-enrichments.txt
  • tests/baselines/showcase/help-insights-export.txt
  • tests/baselines/showcase/help-insights-phases.txt
  • tests/baselines/showcase/help-insights-profiles.txt
  • tests/baselines/showcase/help-insights-status.txt
  • tests/baselines/showcase/help-insights-tags.txt
  • tests/baselines/showcase/help-insights-threads.txt
  • tests/baselines/showcase/help-insights-week-summaries.txt
  • tests/baselines/showcase/help-insights-work-events.txt
  • tests/baselines/showcase/help-insights.txt
  • tests/baselines/showcase/help-main.txt
  • tests/baselines/showcase/help-products.txt
  • tests/infra/semantic_facts.py
  • tests/infra/tables.py
  • tests/integration/test_health.py
  • tests/unit/architecture/test_topology_invariants.py
  • tests/unit/archive/test_filter_executor.py
  • tests/unit/archive/test_repo_identity.py
  • tests/unit/cli/__snapshots__/test_terminal_snapshots.ambr
  • tests/unit/cli/test_analytics.py
  • tests/unit/cli/test_check.py
  • tests/unit/cli/test_click_app.py
  • tests/unit/cli/test_insights.py
  • tests/unit/cli/test_insights_command_runtime.py
  • tests/unit/cli/test_insights_helper_runtime.py
  • tests/unit/cli/test_json_envelope_contract.py
  • tests/unit/cli/test_resume.py
  • tests/unit/core/test_artifact_graph.py
  • tests/unit/core/test_facade_api.py
  • tests/unit/core/test_insight_export_bundles.py
  • tests/unit/core/test_insight_readiness.py
  • tests/unit/core/test_insight_registry_runtime.py
  • tests/unit/core/test_resume.py
  • tests/unit/core/test_sync_surface_runtime.py
  • tests/unit/devtools/test_artifact_graph.py
  • tests/unit/devtools/test_benchmark_campaigns.py
  • tests/unit/devtools/test_execution_specs.py
  • tests/unit/devtools/test_quality_registry.py
  • tests/unit/devtools/test_scenario_coverage.py
  • tests/unit/devtools/test_scenario_projections.py
  • tests/unit/devtools/test_validation_family_models.py
  • tests/unit/devtools/test_validation_lanes.py
  • tests/unit/devtools/test_verify_cross_cuts.py
  • tests/unit/mcp/test_tool_contracts.py
  • tests/unit/operations/test_archive_helpers.py
  • tests/unit/operations/test_specs.py
  • tests/unit/pipeline/test_ingest_batch.py
  • tests/unit/pipeline/test_run_sources.py
  • tests/unit/pipeline/test_run_stages_runtime.py
  • tests/unit/scenarios/test_authored_payloads.py
  • tests/unit/scenarios/test_insight_surfaces.py
  • tests/unit/scenarios/test_metadata.py
  • tests/unit/scenarios/test_operational_surfaces.py
  • tests/unit/scenarios/test_product_surfaces.py
  • tests/unit/showcase/test_exercise_catalog.py
  • tests/unit/showcase/test_report.py
  • tests/unit/sources/test_compaction.py
  • tests/unit/sources/test_decoders.py
  • tests/unit/storage/test_action_event_artifacts.py
  • tests/unit/storage/test_backend.py
  • tests/unit/storage/test_derived_status.py
  • tests/unit/storage/test_embedding_stats.py
  • tests/unit/storage/test_insight_materialization_laws.py
  • tests/unit/storage/test_query_mappers.py
  • tests/unit/storage/test_repository_insight_runtime.py
  • tests/unit/storage/test_session_insight_mapper_fallbacks.py
  • tests/unit/storage/test_session_insight_profiles.py
  • tests/unit/storage/test_session_insight_refresh.py
  • tests/unit/storage/test_session_insight_status_descriptors.py
  • tests/unit/storage/test_session_insight_timeline_rows.py

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/refactor/insights-surface-rename

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Sinity
Sinity deleted the feature/refactor/insights-surface-rename branch May 1, 2026 22:22
@github-actions

github-actions Bot commented May 1, 2026

Copy link
Copy Markdown
Contributor

Polylogue Proof Pack

Refs: origin/master..HEAD
Changed paths: 0

Affected Domains

  • none

Required Gates

  • devtools verify --quick — full PR gate remains explicit
  • devtools verify — full PR gate remains explicit
  • devtools build-package — deployment readiness gate; run when packaging or release confidence matters
  • nix flake check — deployment readiness gate; run when packaging or release confidence matters

Known Gaps

  • none for affected domains

Oracle / Cost

  • oracle mix: {}
  • cost tier: {}
  • stale evidence: 0
  • manual review cells: 0

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: debc484a4d

ℹ️ 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".

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Renames the durable derived read-model “products” surface to “insights” across CLI/API/MCP/scenarios/storage, including regenerated docs and updated tests/snapshots.

Changes:

  • Replaces polylogue products surface vocabulary with polylogue insights in CLI commands, MCP tool registration, scenario surfaces, and docs.
  • Moves/renames storage read-model modules from storage/products/... to storage/insights/..., including query-store mixins and record mappers.
  • Updates tests, baselines, and topology/verification metadata to assert the new insights surface.

Reviewed changes

Copilot reviewed 197 out of 207 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
tests/unit/storage/test_session_insight_timeline_rows.py Updates imports to new storage.insights timeline row builders.
tests/unit/storage/test_session_insight_status_descriptors.py Renames session status descriptor types to SessionInsight*.
tests/unit/storage/test_session_insight_refresh.py Updates refresh/materialization imports to storage.insights.
tests/unit/storage/test_session_insight_profiles.py Updates profile helpers imports to storage.insights.
tests/unit/storage/test_session_insight_mapper_fallbacks.py Switches mapper imports to mappers_insight_*.
tests/unit/storage/test_repository_insight_runtime.py Renames repository read mixins and hydration support to insight equivalents.
tests/unit/storage/test_query_mappers.py Updates doc header (now contains a typo) while keeping mapper tests.
tests/unit/storage/test_insight_materialization_laws.py Renames materialization law test terminology and rebuild import.
tests/unit/storage/test_embedding_stats.py Switches session status snapshot type to SessionInsightStatusSnapshot.
tests/unit/storage/test_derived_status.py Switches derived-status session status snapshot type to insight variant.
tests/unit/storage/test_backend.py Updates rebuild import to storage.insights.
tests/unit/storage/test_action_event_artifacts.py Updates derived-status import path from derived.products → derived.insights.
tests/unit/sources/test_decoders.py Updates doc header (now contains a typo) without behavior change.
tests/unit/sources/test_compaction.py Moves SessionEvidencePayload import to polylogue.insights.archive.
tests/unit/showcase/test_report.py Uses polylogue.insights.authored_payloads instead of products module.
tests/unit/showcase/test_exercise_catalog.py Renames inventory expectations from products to insights.
tests/unit/scenarios/test_product_surfaces.py Removes legacy product surface tests.
tests/unit/scenarios/test_operational_surfaces.py Updates operational surface names to session-insights in generated scenario IDs.
tests/unit/scenarios/test_metadata.py Updates scenario captions/demonstrations and operation name expectation.
tests/unit/scenarios/test_insight_surfaces.py Adds new insight surface tests mirroring old product surface behavior.
tests/unit/scenarios/test_authored_payloads.py Switches authored payload imports to polylogue.insights.
tests/unit/pipeline/test_run_stages_runtime.py Updates patch paths to storage.insights.session.rebuild.
tests/unit/pipeline/test_run_sources.py Switches counts type to SessionInsightCounts and rebuild patch path.
tests/unit/pipeline/test_ingest_batch.py Switches refresh observation type and refresh patch paths to storage.insights.
tests/unit/operations/test_specs.py Renames operation from materialize-session-products → materialize-session-insights.
tests/unit/operations/test_archive_helpers.py Renames archive product models/provenance types to insight equivalents.
tests/unit/devtools/test_verify_cross_cuts.py Updates expected file naming for insights surface modules.
tests/unit/devtools/test_validation_family_models.py Updates validation-lane members from live-products-* → live-insights-*.
tests/unit/devtools/test_scenario_projections.py Updates expected rendered scenario IDs to insight variants.
tests/unit/devtools/test_scenario_coverage.py Updates expected operations coverage to insight operation name.
tests/unit/devtools/test_quality_registry.py Updates quality registry expectations for insight surface names/tags/ops.
tests/unit/devtools/test_execution_specs.py Updates expected maintenance execution metadata operation target.
tests/unit/devtools/test_benchmark_campaigns.py Switches benchmark counts type to SessionInsightCounts and rebuild patch path.
tests/unit/devtools/test_artifact_graph.py Updates expected rendered artifact graph references for insights.
tests/unit/core/test_sync_surface_runtime.py Switches sync mixins from product to insight equivalents.
tests/unit/core/test_resume.py Updates rebuild import to storage.insights.
tests/unit/core/test_insight_registry_runtime.py Renames registry API from Product* to Insight*.
tests/unit/core/test_insight_readiness.py Switches readiness types/constants from product to insight equivalents.
tests/unit/core/test_insight_export_bundles.py Switches export bundle request/error types to insight equivalents.
tests/unit/core/test_facade_api.py Updates archive durable surface tests to use insight query models.
tests/unit/core/test_artifact_graph.py Renames operation name expectations to materialize-session-insights.
tests/unit/cli/test_resume.py Updates rebuild import to storage.insights.
tests/unit/cli/test_json_envelope_contract.py Updates CLI contract args from products status → insights status.
tests/unit/cli/test_insights_helper_runtime.py Renames rendering helper module import to insights_rendering.
tests/unit/cli/test_click_app.py Updates help and command-registration expectations to insights.
tests/unit/cli/test_check.py Updates rebuild imports and test conversation IDs/text to insights wording.
tests/unit/cli/test_analytics.py Switches analytics model type from ProviderAnalyticsProduct → ProviderAnalyticsInsight.
tests/unit/cli/snapshots/test_terminal_snapshots.ambr Updates CLI snapshot expectations to include insights and remove products.
tests/unit/archive/test_repo_identity.py Switches archive summaries models import to polylogue.insights.
tests/unit/archive/test_filter_executor.py Updates doc header (now contains a typo) without behavior change.
tests/unit/architecture/test_topology_invariants.py Updates topology invariant to require storage/insights/session package.
tests/integration/test_health.py Updates integration test strings/IDs from products to insights wording.
tests/infra/tables.py Updates comment headers (now contain a typo) in canonical test tables.
tests/infra/semantic_facts.py Updates docstring to refer to insights instead of products.
tests/baselines/showcase/help-products.txt Removes legacy products help baseline.
tests/baselines/showcase/help-main.txt Updates CLI main help baseline to show insights.
tests/baselines/showcase/help-insights.txt Adds insights help baseline (currently inconsistent with CLI help).
tests/baselines/showcase/help-insights-work-events.txt Renames help baseline path/wording for work-events under insights.
tests/baselines/showcase/help-insights-week-summaries.txt Renames help baseline path/wording for week-summaries under insights.
tests/baselines/showcase/help-insights-threads.txt Renames help baseline path/wording for threads under insights.
tests/baselines/showcase/help-insights-tags.txt Renames help baseline path/wording for tags under insights.
tests/baselines/showcase/help-insights-status.txt Renames help baseline path/wording for status under insights (currently inconsistent with CLI help).
tests/baselines/showcase/help-insights-profiles.txt Renames help baseline path/wording for profiles under insights.
tests/baselines/showcase/help-insights-phases.txt Renames help baseline path/wording for phases under insights.
tests/baselines/showcase/help-insights-export.txt Renames help baseline path/wording for export under insights (currently inconsistent with CLI help).
tests/baselines/showcase/help-insights-enrichments.txt Renames help baseline path/wording for enrichments under insights.
tests/baselines/showcase/help-insights-debt.txt Renames help baseline path/wording for debt under insights.
tests/baselines/showcase/help-insights-day-summaries.txt Renames help baseline path/wording for day-summaries under insights.
tests/baselines/showcase/help-insights-costs.txt Renames help baseline path/wording for costs under insights.
tests/baselines/showcase/help-insights-cost-rollups.txt Renames help baseline path/wording for cost-rollups under insights.
tests/baselines/showcase/help-insights-analytics.txt Renames help baseline path/wording for analytics under insights.
polylogue/storage/runtime/store_constants.py Renames session materializer constant to SESSION_INSIGHT_MATERIALIZER_VERSION.
polylogue/storage/runtime/init.py Updates storage runtime re-exports to point at storage.insights records and renamed constant.
polylogue/storage/repository/insight/timeline_reads.py Renames repository timeline mixin to RepositoryInsightTimelineReadMixin and switches hydration imports.
polylogue/storage/repository/insight/thread_reads.py Renames repository thread mixin to RepositoryInsightThreadReadMixin and switches hydration imports.
polylogue/storage/repository/insight/summary_reads.py Renames repository summary mixin to RepositoryInsightSummaryReadMixin.
polylogue/storage/repository/insight/profile_reads.py Renames repository profile mixin to RepositoryInsightProfileReadMixin and switches hydration imports.
polylogue/storage/repository/insight/init.py New insight repository package init.
polylogue/storage/repository/archive/writes/conversations.py Routes delete/refresh thread hooks through storage.insights modules.
polylogue/storage/repository/init.py Switches ConversationRepository mixins from product reads to insight reads.
polylogue/storage/repair.py Updates repair flow types/messages to insights terminology.
polylogue/storage/insights/timeline/records.py Switches archive models import and materializer constant to insights.
polylogue/storage/insights/timeline/init.py New insights timeline package init.
polylogue/storage/insights/session/timeline_rows.py Updates payload imports and materializer constant to insights.
polylogue/storage/insights/session/threads.py Updates docstring/imports/materializer constant to insights.
polylogue/storage/insights/session/runtime.py Renames runtime types to SessionInsight* variants.
polylogue/storage/insights/session/records.py Switches archive models import and materializer constant to insights.
polylogue/storage/insights/session/rebuild.py Migrates rebuild pipeline to insights package paths and insight count types.
polylogue/storage/insights/session/profiles.py Switches archive models import and materializer constant to insights.
polylogue/storage/insights/session/aggregates.py Switches rollups/summaries dependencies to polylogue.insights and insight query modules.
polylogue/storage/insights/session/init.py New insights session package init.
polylogue/storage/insights/insight_read_support.py Adds hydration helpers (docstring currently says “product reads”).
polylogue/storage/insights/aggregate/records.py Switches archive models import and materializer constant to insights.
polylogue/storage/insights/aggregate/init.py New insights aggregate package init.
polylogue/storage/insights/init.py New insights storage package init.
polylogue/storage/embeddings/support.py Switches session status snapshot type to insight variant.
polylogue/storage/embeddings/embedding_stats.py Switches session status import to storage.insights.session.status.
polylogue/storage/derived/insights.py Updates derived model status computation to use insight materializer version constant.
polylogue/storage/derived/derived_status.py Routes derived status builder import through derived.insights and insight session status snapshot.
polylogue/storage/backends/schema_ddl_insight_timelines.py Renames timeline DDL constant to SESSION_INSIGHT_TIMELINE_DDL.
polylogue/storage/backends/schema_ddl_insight_profiles.py Renames profile DDL constant to SESSION_INSIGHT_PROFILE_DDL.
polylogue/storage/backends/schema_ddl_insight_aggregates.py Renames aggregate DDL constant to SESSION_INSIGHT_AGGREGATE_DDL.
polylogue/storage/backends/schema_ddl.py Switches schema DDL concatenation variable to _SESSION_INSIGHT_DDL.
polylogue/storage/backends/schema_bootstrap.py Updates bootstrap extensions to apply _SESSION_INSIGHT_DDL.
polylogue/storage/backends/query_store_insight_timelines.py Renames mixin to SQLiteQueryStoreInsightTimelinesMixin and routes to insight reads module.
polylogue/storage/backends/query_store_insight_profiles.py Renames mixin to SQLiteQueryStoreInsightProfilesMixin and routes to insight reads module.
polylogue/storage/backends/query_store.py Switches query store composition to insight mixins; includes confusing import alias needing cleanup.
polylogue/storage/backends/queries/session_insight_timeline_writes.py Routes write helpers through storage.insights.session.storage.
polylogue/storage/backends/queries/session_insight_timeline_reads.py Adds new insight timeline read queries (docstring still says “session-product”).
polylogue/storage/backends/queries/session_insight_thread_queries.py Routes insert-values import through storage.insights.session.storage.
polylogue/storage/backends/queries/session_insight_summary_queries.py Routes insert-values import through storage.insights.session.storage.
polylogue/storage/backends/queries/session_insight_profile_writes.py Routes write helpers through storage.insights.session.storage.
polylogue/storage/backends/queries/session_insight_profile_reads.py Adds new insight profile read queries (docstring still says “session-product”).
polylogue/storage/backends/queries/mappers_insight_timelines.py Switches archive models and legacy mapper module to insight equivalents.
polylogue/storage/backends/queries/mappers_insight_profiles.py Switches archive models and legacy mapper module to insight equivalents.
polylogue/storage/backends/queries/mappers_insight_legacy.py Switches archive models import to insight equivalents.
polylogue/storage/backends/queries/mappers_insight_aggregates.py Switches day summary payload import to insight equivalents.
polylogue/storage/backends/queries/mappers.py Switches mapper module imports from product to insight variants.
polylogue/storage/backends/queries/init.py Exposes session_insight_* query modules instead of session_product_*.
polylogue/storage/backends/async_sqlite_archive.py Switches session status snapshot type to insight variant.
polylogue/storage/backends/async_sqlite.py Routes derived writes through session_insight_* query modules.
polylogue/site/models.py Switches payload typing import to polylogue.insights.authored_payloads.
polylogue/showcase/showcase_runner_support.py Switches canonical payload JSON import to polylogue.insights.
polylogue/showcase/showcase_report_payloads.py Switches payload typing import to polylogue.insights.
polylogue/showcase/report_models.py Switches payload typing and serialization helpers import to polylogue.insights.
polylogue/showcase/qa_summary.py Switches payload mapping helpers import to polylogue.insights.
polylogue/showcase/qa_session_payload.py Switches payload typing import to polylogue.insights.
polylogue/showcase/qa_markdown.py Switches payload requirement helper import to polylogue.insights.
polylogue/showcase/generators.py Switches generated JSON contract surfaces from product to insight families.
polylogue/showcase/catalog_loader.py Switches payload helpers import to polylogue.insights.
polylogue/scenarios/specs.py Switches payload typing import to polylogue.insights.
polylogue/scenarios/projections.py Switches payload typing import to polylogue.insights.
polylogue/scenarios/product_surfaces.py Removes legacy product surfaces definition module.
polylogue/scenarios/operational_surfaces.py Renames doctor session surface IDs/tags to session-insights while keeping target session_products.
polylogue/scenarios/metadata.py Switches payload helpers import to polylogue.insights.
polylogue/scenarios/insight_surfaces.py Adds insight surface families module replacing removed product surfaces.
polylogue/scenarios/execution.py Renames product probe mode/dispatch maps to insights equivalents.
polylogue/scenarios/executable.py Switches payload typing import to polylogue.insights.
polylogue/scenarios/corpus.py Switches payload helpers import to polylogue.insights.
polylogue/scenarios/cli_surfaces.py Switches tuple merge helper import to polylogue.insights.
polylogue/scenarios/assertions.py Switches payload assertion helpers import to polylogue.insights.
polylogue/scenarios/init.py Exports insight surface builders and removes product surface exports.
polylogue/proof/subjects.py Switches registry subject enumeration from PRODUCT_REGISTRY to INSIGHT_REGISTRY.
polylogue/proof/catalog.py Updates claim staleness wording to “Insight registry entries…”.
polylogue/products/init.py Removes legacy products package init facade.
polylogue/pipeline/services/ingest_batch.py Routes session refresh through storage.insights.session.refresh.
polylogue/pipeline/run_stages.py Switches rebuild import and counts type to insight variants.
polylogue/pipeline/payload_types.py Switches refresh chunk payload type to SessionInsightRefreshChunkPayload.
polylogue/operations/init.py Renames ArchiveDebtProduct export to ArchiveDebtInsight.
polylogue/mcp/server_tools.py Switches MCP registration from product tools to insight tools.
polylogue/mcp/server_insight_tools.py Renames registry-driven MCP tool registration entrypoint to insights.
polylogue/mcp/insight_tool_contracts.py Renames MCP tool contract types from product to insight variants.
polylogue/maintenance/targets.py Points session-products maintenance repair operation to materialize-session-insights.
polylogue/insights/authored_payloads.py Adds new shared payload helper module under polylogue.insights.
polylogue/insights/archive_summaries.py Switches archive summary products to insights terminology and types.
polylogue/insights/archive_rollups.py Switches tag rollups products to insights terminology and types.
polylogue/insights/archive_models.py Renames archive product contract model base/provenance to insight equivalents.
polylogue/insights/init.py Adds new polylogue.insights package facade exporting registry helpers.
polylogue/cli/shared/resume_rendering.py Switches resume brief import to polylogue.insights.resume.
polylogue/cli/shared/insight_command_contracts.py Renames product command parsing contracts to insight equivalents.
polylogue/cli/shared/helper_summary.py Switches provider analytics model type to insight variant and protocol typing.
polylogue/cli/shared/check_support.py Updates progress label from “session products” to “session insights”.
polylogue/cli/query.py Updates comment to reflect “insights” subcommand.
polylogue/cli/insights_rendering.py Renamed rendering module; docstring still references “archive-product” and “product registry”.
polylogue/cli/commands/resume.py Switches root param finder import to insight_command_contracts.
polylogue/cli/click_command_registration.py Registers insights_command instead of products_command.
polylogue/archive/conversation/threads.py Updates module docstring from “products” to “insights”.
polylogue/archive/init.py Updates archive package docstring to refer to insights.
polylogue/api/sync/insights.py Adds insight-oriented sync facade mixin replacing products version.
polylogue/api/sync/init.py Switches SyncPolylogue composition to insight sync mixin.
polylogue/api/archive.py Switches archive mixin types to insights equivalents in annotations and protocol.
polylogue/api/init.py Switches Polylogue facade mixin from products to insights.
docs/verification-catalog.md Regenerates verification catalog to list polylogue insights ... commands.
docs/plans/scenario-coverage.yaml Renames product surface family to insight surface family.
docs/plans/layering.yaml Updates layering docs from products to insights.
docs/plans/assurance-domains.yaml Updates assurance domain docs for MCP/api to refer to insights.
docs/library-api.md Updates some headings to “insights” but still contains outdated product imports/names.
docs/internals.md Updates internal docs to reference insights/ (still mentions “Adding a session product”).
docs/cli-reference.md Updates CLI reference section from Products to Insights.
docs/architecture.md Updates architecture docs to describe derived read models as insights.
devtools/verify_test_ownership.py Renames production prefix constant to a typo’d INSIGHTION_PREFIXES.
devtools/validation_lane_catalog_live.py Switches live lane generation from product to insight surface builders.
devtools/validation_lane_catalog_contracts.py Updates lane catalog to use test_insights.py and rename lane keys.
devtools/validation_lane_catalog_composites.py Renames composite lane membership from products to insights.
devtools/synthetic_benchmark_runtime.py Switches rebuild import to storage.insights.
devtools/synthetic_benchmark_catalog.py Updates benchmark operation target/tag to materialize-session-insights/session-insights.
devtools/render_cli_reference.py Updates CLI reference generator section label to “Insights”.
devtools/build_topology_projection.py Updates topology projection mappings/owners from products to insights.
Comments suppressed due to low confidence (4)

docs/library-api.md:55

  • This example still imports from polylogue.archive_products and uses *ProductQuery types, which no longer match the products→insights rename in this PR. Update the snippet to import the query models from the new polylogue.insights.archive module (and use the *InsightQuery names) so the documentation is runnable.
from polylogue import Polylogue
from polylogue.archive_products import (
    ArchiveDebtProductQuery,
    DaySessionSummaryProductQuery,
    ProviderAnalyticsProductQuery,
    SessionEnrichmentProductQuery,
    SessionPhaseProductQuery,
    SessionProfileProductQuery,
    SessionTagRollupQuery,
)

tests/baselines/showcase/help-insights-export.txt:12

  • The insights export --help baseline shows --product and "archive-product bundles", but the CLI code registers --insight and describes "archive-insight bundles". Update/regenerate this baseline so it matches the actual Click command options and help text.
    tests/baselines/showcase/help-insights-status.txt:7
  • The insights status --help baseline still uses product terminology and the --product flag. The CLI code defines --insight and describes "insight materialization". Regenerate/update this baseline to match the actual command.
    polylogue/cli/insights_rendering.py:5
  • This module docstring still refers to "archive-product" commands and a "product registry", but the module now wires render_insight_items from polylogue.insights.registry. Updating the wording will prevent confusion during the products→insights rename.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"""Tests for source decoding, JSON stream iteration, and ZIP processing.

Production code under test: polylogue/sources/decoders.py
Insightion code under test: polylogue/sources/decoders.py
Comment on lines +15 to +19
export Export versioned archive-product bundles.
phases List durable session-phase insights.
profiles List durable session-profile insights.
status Report product materialization coverage and readiness.
tags List durable session-tag rollup insights.
Comment thread docs/library-api.md
Comment on lines 114 to 115
- `ProviderAnalyticsProduct`: provider-level conversation/message/tool/thinking metrics
- `ArchiveDebtProduct`: governed cleanup/repair debt with maintenance targets plus preview/apply/validation lineage
"""Tests for storage record mapping functions.

Production code under test: polylogue/storage/runtime/__init__.py
Insightion code under test: polylogue/storage/runtime/__init__.py
"""Tests for ConversationFilter SQL pushdown and execution plan logic.

Production code under test: polylogue/archive/filter/filters.py
Insightion code under test: polylogue/archive/filter/filters.py
Comment thread tests/infra/tables.py
Comment on lines +21 to 22
# Insightion code: ClaudeCodeRecord.role property
# Bug reference: a1c085e — 328K messages had wrong role
Comment thread tests/infra/tables.py
Comment on lines +47 to 49
# Insightion code: ClaudeCodeRecord.parsed_timestamp property
# Bug reference: Claude Code uses Unix milliseconds, not seconds
# =============================================================================
Comment thread tests/infra/tables.py
Comment on lines +69 to 70
# Insightion code: is_actual_message, is_context_compaction, is_tool_progress
# =============================================================================
Comment thread tests/infra/tables.py
Comment on lines +133 to 134
# Insightion code: polylogue.archive.message.roles.normalize_role
# (re-exported as polylogue.sources.parsers.base.normalize_role)
Comment thread tests/infra/tables.py
Comment on lines +161 to 162
# Insightion code: polylogue.core.timestamps.parse_timestamp
# Tuples: (input_value, expected_year, expected_month, expected_day, expected_microsecond_or_None, description)
Sinity added a commit that referenced this pull request May 7, 2026
## Summary

Renames the durable derived read-model surface from `products` to
`insights` across the public CLI, Python packages, MCP helper
registration, scenario surfaces, storage ownership packages, tests,
generated docs, and topology metadata.

## Problem

The naming audit selected `insights` as the clearer concept for these
derived read models. Keeping `products` in package paths, command names,
generated surfaces, and tests preserved the old conceptual mismatch and
made new work choose between two vocabularies.

## Solution

- Moves `polylogue/products` to `polylogue/insights` and updates the
registry, readiness, export bundle, resume, and archive contracts around
insight terminology.
- Replaces the public `polylogue products` command with `polylogue
insights`, with no compatibility alias.
- Renames MCP/CLI/storage/scenario helper modules from product ownership
to insight ownership.
- Regenerates CLI references, topology, verification catalog,
scenario/quality docs, and showcase/help baselines.
- Updates tests and snapshots to assert the `insights` surface.

This intentionally leaves persisted SQLite table names and maintenance
target identifiers such as `session_products` alone; changing persisted
schema identifiers is a separate migration decision, not part of this
surface/package rename.

## Verification

- `ruff format --check polylogue tests devtools && ruff check polylogue
tests devtools`
- `mypy polylogue/`
- `devtools render-all --check`
- `devtools verify-topology && devtools verify-layering && devtools
verify-test-ownership`
- `pytest -q --ignore=tests/integration` -> `5774 passed in 182.83s
(0:03:02)`
- pre-push `devtools verify --quick` -> all checks passed

Ref #624
Ref #635
@Sinity

Sinity commented Oct 1, 2026

Copy link
Copy Markdown
Owner Author

Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.

  • 61.F006 / P2: fixed-already at the checked revision: polylogue/cli/query_group.py:380 rejects an unsignalled bare root with UsageError before executing the query callback. The removed products status spelling now fails explicitly instead of silently searching, without adding a compatibility command.

Only the rows listed above are dispositioned. Held findings remain open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants