Skip to content

feat: widen public archive product surfaces (#378) - #378

Merged
Sinity merged 2 commits into
masterfrom
feature/feat/public-surface-widening
Apr 23, 2026
Merged

Sinity merged 2 commits into
masterfrom
feature/feat/public-surface-widening

Conversation

@Sinity

@Sinity Sinity commented Apr 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

Widen the durable archive product surfaces so archive debt, maintenance rebuilds, and direct conversation export are available consistently through the product registry, async facade, CLI, and MCP server.

Problem

Archive debt and session-product rebuild semantics already existed below the public surfaces, but consumers had to know internal operations or use uneven adapters. The product registry did not expose ArchiveDebtProduct, the facade lacked explicit stats/health/rebuild methods, MCP had only single-conversation export and single-tag mutation, and the CLI lacked a direct single-ID export command.

Solution

Registered archive debt in polylogue.products.registry, which produces polylogue products debt and the registry-backed MCP archive_debt tool. Added ArchiveOperations.rebuild_session_products() plus facade methods get_archive_stats(), health_check(), and rebuild_products(). Added MCP tools for bulk_tag_conversations, rebuild_session_products, and export_query_results, and normalized conversation output formats through the shared formatter. Added root CLI polylogue export --format <format> <conversation-id> and regenerated generated docs, quality projections, verification catalog, and terminal snapshots.

Verification

  • pytest -q tests/unit/cli/test_export.py tests/unit/cli/test_products.py tests/unit/core/test_facade_api.py tests/unit/mcp/test_server_surfaces.py tests/unit/mcp/test_tool_contracts.py -> 160 passed.
  • devtools render-all --check -> all generated surfaces in sync.
  • devtools run-validation-lanes --lane archive-data-products -> 335 passed.
  • pytest -q tests/unit/cli/test_terminal_snapshots.py --snapshot-update -> 10 passed; updated intentional help snapshots.
  • pytest -q tests/unit/cli/test_terminal_snapshots.py tests/unit/cli/test_click_app.py -> 67 passed.
  • devtools verify -> all checks passed.
  • git push pre-push quick baseline -> all checks passed.

Closes #194

Problem: archive debt, maintenance rebuilds, and direct export paths existed below the public surfaces, leaving CLI, facade, and MCP consumers with uneven access to durable archive products.

What changed: register archive debt as a first-class product type, add facade stats/health/rebuild methods, expose MCP batch tagging, query export, and session-product rebuild tools, and add a direct polylogue export command over the shared formatter.

Verification: pytest -q tests/unit/cli/test_export.py tests/unit/cli/test_products.py tests/unit/core/test_facade_api.py tests/unit/mcp/test_server_surfaces.py tests/unit/mcp/test_tool_contracts.py; devtools run-validation-lanes --lane archive-data-products; pytest -q tests/unit/cli/test_terminal_snapshots.py tests/unit/cli/test_click_app.py; devtools verify.

Ref #194
@coderabbitai

coderabbitai Bot commented Apr 23, 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 4 minutes and 51 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 4 minutes and 51 seconds.

⌛ 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: a380e96b-a43a-4e8e-9cda-38603e77172b

📥 Commits

Reviewing files that changed from the base of the PR and between 3bd5a8e and 7f3cbc7.

📒 Files selected for processing (22)
  • docs/cli-reference.md
  • docs/test-quality-workflows.md
  • docs/verification-catalog.md
  • polylogue/cli/click_command_registration.py
  • polylogue/cli/commands/export.py
  • polylogue/facade_archive.py
  • polylogue/mcp/server_maintenance_tools.py
  • polylogue/mcp/server_mutation_tools.py
  • polylogue/operations/archive.py
  • polylogue/products/registry.py
  • polylogue/rendering/formatting.py
  • tests/baselines/showcase/help-export.txt
  • tests/baselines/showcase/help-main.txt
  • tests/baselines/showcase/help-products-debt.txt
  • tests/baselines/showcase/help-products.txt
  • tests/infra/mcp.py
  • tests/unit/cli/__snapshots__/test_terminal_snapshots.ambr
  • tests/unit/cli/test_click_app.py
  • tests/unit/cli/test_export.py
  • tests/unit/cli/test_products.py
  • tests/unit/core/test_facade_api.py
  • tests/unit/mcp/test_tool_contracts.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/feat/public-surface-widening

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 changed the title feat: widen public archive product surfaces feat: widen public archive product surfaces (#378) Apr 23, 2026

@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: 33cf589ab6

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

Comment thread polylogue/operations/archive.py Resolved
Problem: #194 adds archive-debt and export commands that are part of the tier-0 showcase help contract, but their committed baselines still described the older command surface.

What changed: Added the new help baselines and refreshed the parent command help snapshots so CI validates the widened public surface.

Verification: devtools verify-showcase

Ref #194
@Sinity
Sinity merged commit a432de6 into master Apr 23, 2026
10 of 13 checks passed
@Sinity
Sinity deleted the feature/feat/public-surface-widening branch April 23, 2026 04:04
@Sinity

Sinity commented Apr 28, 2026

Copy link
Copy Markdown
Owner Author

🤖 Post-hoc audit note: this PR received bot review feedback verified against current HEAD as part of #544. 1 finding(s) confirmed still present → tracked in #550.

@Sinity
Sinity requested a review from Copilot May 1, 2026 00:44
@Sinity
Sinity requested review from Copilot and removed request for Copilot May 1, 2026 01:05
@Sinity
Sinity removed the request for review from Copilot May 1, 2026 02:15
Sinity added a commit that referenced this pull request May 7, 2026
## Summary

Widen the durable archive product surfaces so archive debt, maintenance rebuilds, and direct conversation export are available consistently through the product registry, async facade, CLI, and MCP server.

## Problem

Archive debt and session-product rebuild semantics already existed below the public surfaces, but consumers had to know internal operations or use uneven adapters. The product registry did not expose `ArchiveDebtProduct`, the facade lacked explicit stats/health/rebuild methods, MCP had only single-conversation export and single-tag mutation, and the CLI lacked a direct single-ID export command.

## Solution

Registered archive debt in `polylogue.products.registry`, which produces `polylogue products debt` and the registry-backed MCP `archive_debt` tool. Added `ArchiveOperations.rebuild_session_products()` plus facade methods `get_archive_stats()`, `health_check()`, and `rebuild_products()`. Added MCP tools for `bulk_tag_conversations`, `rebuild_session_products`, and `export_query_results`, and normalized conversation output formats through the shared formatter. Added root CLI `polylogue export --format <format> <conversation-id>` and regenerated generated docs, quality projections, verification catalog, and terminal snapshots.

## Verification

- `pytest -q tests/unit/cli/test_export.py tests/unit/cli/test_products.py tests/unit/core/test_facade_api.py tests/unit/mcp/test_server_surfaces.py tests/unit/mcp/test_tool_contracts.py` -> 160 passed.
- `devtools render-all --check` -> all generated surfaces in sync.
- `devtools run-validation-lanes --lane archive-data-products` -> 335 passed.
- `pytest -q tests/unit/cli/test_terminal_snapshots.py --snapshot-update` -> 10 passed; updated intentional help snapshots.
- `pytest -q tests/unit/cli/test_terminal_snapshots.py tests/unit/cli/test_click_app.py` -> 67 passed.
- `devtools verify` -> all checks passed.
- `git push` pre-push quick baseline -> all checks passed.

Closes #194
@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.

  • 68.F024 / P1: fixed-already at the checked revision: polylogue/operations/insight_planning.py:101 distinguishes an empty explicit session list from a full sweep. Lines 124-140 create one empty accepted page for that scope, and insight_page_plan builds targets only from that page at line 200; no global derived-table deletion is triggered by an empty explicit list.

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.

feat: widen MCP, facade, and product registry surfaces

1 participant