Skip to content

refactor(maintenance): rename session insight target - #686

Merged
Sinity merged 1 commit into
masterfrom
feature/refactor/session-insight-maintenance-target
May 2, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/refactor/session-insight-maintenance-target

Conversation

@Sinity

@Sinity Sinity commented May 2, 2026

Copy link
Copy Markdown
Owner

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

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.
Copilot AI review requested due to automatic review settings May 2, 2026 03:33
@coderabbitai

coderabbitai Bot commented May 2, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@Sinity has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 25 minutes and 5 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: beb8804e-526a-4ff1-9683-350dbd10e6e1

📥 Commits

Reviewing files that changed from the base of the PR and between 0ea52b2 and df28e46.

📒 Files selected for processing (58)
  • devtools/build_topology_projection.py
  • devtools/synthetic_benchmark_runtime.py
  • devtools/validation_lane_catalog_contracts.py
  • docs/architecture.md
  • docs/cli-reference.md
  • docs/internals.md
  • docs/test-quality-workflows.md
  • polylogue/artifacts/__init__.py
  • polylogue/cli/shared/check_workflow.py
  • polylogue/insights/readiness.py
  • polylogue/maintenance/targets.py
  • polylogue/operations/archive.py
  • polylogue/operations/specs.py
  • polylogue/pipeline/run_stages.py
  • polylogue/pipeline/services/ingest_batch.py
  • polylogue/scenarios/operational_surfaces.py
  • polylogue/storage/backends/query_store.py
  • polylogue/storage/derived/derived_status.py
  • polylogue/storage/insights/session/profiles.py
  • polylogue/storage/insights/session/rebuild.py
  • polylogue/storage/insights/session/refresh.py
  • polylogue/storage/repair.py
  • polylogue/storage/repository/archive/writes/conversations.py
  • tests/baselines/showcase/help-doctor.txt
  • tests/integration/test_health.py
  • tests/unit/architecture/test_topology_invariants.py
  • tests/unit/cli/__snapshots__/test_terminal_snapshots.ambr
  • tests/unit/cli/test_check.py
  • tests/unit/cli/test_check_rendering_plain_runtime.py
  • tests/unit/cli/test_check_support_runtime.py
  • tests/unit/cli/test_insights.py
  • tests/unit/cli/test_query_exec.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_maintenance_targets.py
  • tests/unit/core/test_resume.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_validation_lanes.py
  • tests/unit/mcp/test_tool_contracts.py
  • tests/unit/pipeline/test_ingest_batch.py
  • tests/unit/pipeline/test_parsing_service.py
  • tests/unit/pipeline/test_run_sources.py
  • tests/unit/pipeline/test_run_stages_runtime.py
  • tests/unit/scenarios/test_metadata.py
  • tests/unit/scenarios/test_operational_surfaces.py
  • tests/unit/showcase/test_exercise_catalog.py
  • tests/unit/storage/test_backend.py
  • tests/unit/storage/test_insight_materialization_laws.py
  • tests/unit/storage/test_repair.py
  • tests/unit/storage/test_repository_insight_runtime.py
  • tests/unit/storage/test_session_insight_refresh.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/refactor/session-insight-maintenance-target

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
Review rate limit: 0/1 reviews remaining, refill in 25 minutes and 5 seconds.

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

@github-actions

github-actions Bot commented May 2, 2026

Copy link
Copy Markdown
Contributor

Polylogue Proof Pack

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

Affected Domains

  • architecture_discipline — 1 claim(s), maturity growing
  • docs_media — 0 claim(s), maturity seed
  • operational_resilience — 14 claim(s), maturity seed
  • spec_completeness — 1 claim(s), maturity seed
  • unclassified — 7 claim(s), maturity seed

Required Gates

  • devtools verify-manifests — structural manifest changed
  • devtools affected-obligations --path devtools/build_topology_projection.py — refresh structural obligation routing
  • devtools verify-topology — topology projection changed
  • devtools render-all --check — generated surface or renderer changed
  • pytest tests/unit/cli — CLI command surface changed
  • pytest tests/unit/proof/test_evidence_runners.py — CLI proof runners exercise command output
  • devtools render-cli-reference --check — CLI reference is generated from command help
  • pytest tests/unit/operations/test_specs.py — operation spec routing metadata changed
  • devtools artifact-graph --json — operation specs feed artifact graph views
  • 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

  • docs_media: docs_media: No scenario for documentation freshness verification [owner: scenario-coverage; next: Add scenario family or generated projection for this subject], docs_media: README examples and media are not yet generated from executable scenario projections. [owner: docs-media; next: Add executable scenario projection or media integrity gate], docs_media: Screenshots and VHS media have no committed nonblank/readability verification. [owner: docs-media; next: Add executable scenario projection or media integrity gate]

Oracle / Cost

  • oracle mix: {"construction_sanity": 251, "drift_check": 1, "manual_review": 1, "proof": 36, "smoke": 12}
  • cost tier: {"static": 288, "unit": 13}
  • stale evidence: 300
  • manual review cells: 1

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

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_products to session_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_")}
@Sinity
Sinity merged commit c191053 into master May 2, 2026
18 checks passed
@Sinity
Sinity deleted the feature/refactor/session-insight-maintenance-target branch May 2, 2026 04:00
Sinity added a commit that referenced this pull request May 7, 2026
## 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
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