Skip to content

fix(cli): show embedding readiness in status fallback - #1548

Merged
Sinity merged 2 commits into
masterfrom
feature/fix/status-embedding-readiness-summary
May 25, 2026
Merged

Sinity merged 2 commits into
masterfrom
feature/fix/status-embedding-readiness-summary

Conversation

@Sinity

@Sinity Sinity commented May 25, 2026

Copy link
Copy Markdown
Owner

Summary

Show canonical embedding readiness in the daemon-offline polylogue status fallback and restore the broadened verification baseline for the recently added read-pull resume candidate surfaces.

Problem

polylogue status already read the canonical embedding status payload when the daemon was unavailable, but rendered it as a raw coverage counter. That hid the operationally important state: stale/not-ready vectors, pending catch-up, failures, and latest catch-up progress. While preparing the PR, devtools verify widened to --testmon-noselect and exposed unrelated baseline drift from resume-candidates and read-pull facade/MCP additions: missing output-assurance metadata, stale API contract categorization, stale CLI snapshots, stale MCP witness data, and two fixture drifts.

Solution

  • Added a bounded direct-status embedding renderer in polylogue/cli/commands/status.py that reports status/freshness, retrieval readiness, embedded/pending conversation counts, stale messages, failure count, and latest catch-up summary.
  • Added unit coverage for daemon-offline status rendering against a fake read-only archive.
  • Declared resume-candidates in polylogue.cli.output_assurance, refreshed CLI snapshots/docs, updated the MCP tool-schema witness, and categorized find_resume_candidates / get_logical_session in facade contract coverage.
  • Updated stale fixtures: session_profiles.logical_conversation_id, canonical embedding payload patching in embed stats tests, and the Drive JSON property health-check suppression that already existed for the adjacent newline-delimited property.

Ref #1503

Verification

  • pytest -q tests/unit/cli/test_status.py --tb=short -> 15 passed in 6.32s
  • ruff format --check polylogue/cli/commands/status.py tests/unit/cli/test_status.py && ruff check polylogue/cli/commands/status.py tests/unit/cli/test_status.py -> all checks passed
  • python -m mypy polylogue/cli/commands/status.py tests/unit/cli/test_status.py -> success
  • devtools render-all --check -> OK
  • devtools verify --quick -> exit 0, total 34.1s
  • pytest -q tests/unit/storage/test_user_state_target_kinds.py tests/unit/cli/test_cli_output_assurance_matrix.py tests/unit/api/test_facade_contracts.py tests/unit/cli/test_embed.py::TestShowEmbeddingStats tests/unit/mcp/test_tool_schema_witness.py tests/unit/sources/test_drive_source_client.py::test_parse_downloaded_json_payload_round_trips_standard_json tests/unit/cli/test_help_snapshots.py tests/unit/cli/test_click_app.py::TestCliMetadata::test_all_subcommands_registered tests/unit/cli/test_terminal_snapshots.py --tb=short -> 253 passed in 6.45s
  • python -m mypy polylogue/cli/commands/status.py polylogue/cli/output_assurance.py tests/unit/cli/test_status.py tests/unit/storage/test_user_state_target_kinds.py tests/unit/cli/test_click_app.py tests/unit/api/test_facade_contracts.py tests/unit/sources/test_drive_source_client.py tests/unit/cli/test_embed.py -> success
  • devtools verify -> exit 0, 9511 passed, 2 xfailed, total 281.95s

Sinity added 2 commits May 25, 2026 07:01
Problem: when the daemon was offline, polylogue status used the canonical embedding payload only as a raw coverage counter, hiding stale/not-ready state, failures, and catch-up progress from the operator path that is most likely to be used during daemon trouble.\n\nWhat changed: render the bounded embedding status payload in the direct SQLite fallback with status/freshness, readiness, pending conversation count, stale message count, failure count, and latest catch-up summary. Add unit coverage against a fake read-only archive so this remains cheap and isolated.\n\nRef #1503
Problem: the default verification baseline had drift after read-pull resume candidate surfaces landed: the command was live but missing output-assurance metadata, API contract categorization, snapshots, and MCP witness data. The widened gate also exposed two stale fixtures.\n\nWhat changed: declare resume-candidates in the output-assurance registry, refresh CLI snapshots and MCP tool-schema witness data, categorize the new facade methods under existing bespoke tests, update the user-state insight fixture for logical_conversation_id, update embedding stats renderer tests to patch the canonical payload boundary, and suppress the expected slow Hypothesis generation health check for the standard JSON round-trip property.\n\nRef #1503
@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Sinity, we couldn't start this review because you've used your available PR reviews for now.

Your plan includes 1 review of capacity. Refill in 21 minutes and 1 second.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more review capacity refills, 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 trial, open-source, and free plans. In all cases, review capacity refills continuously over time.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: f4714afc-61ed-4bbf-b25b-1af6c3bd9ce9

📥 Commits

Reviewing files that changed from the base of the PR and between 17cae99 and a0be571.

📒 Files selected for processing (12)
  • docs/cli-reference.md
  • polylogue/cli/commands/status.py
  • polylogue/cli/output_assurance.py
  • tests/data/witnesses/mcp-tool-schemas.json
  • tests/unit/api/test_facade_contracts.py
  • tests/unit/cli/__snapshots__/test_help_snapshots.ambr
  • tests/unit/cli/__snapshots__/test_terminal_snapshots.ambr
  • tests/unit/cli/test_click_app.py
  • tests/unit/cli/test_embed.py
  • tests/unit/cli/test_status.py
  • tests/unit/sources/test_drive_source_client.py
  • tests/unit/storage/test_user_state_target_kinds.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/fix/status-embedding-readiness-summary

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 merged commit 8c0abd3 into master May 25, 2026
7 checks passed
@Sinity
Sinity deleted the feature/fix/status-embedding-readiness-summary branch May 25, 2026 05:16
Sinity added a commit that referenced this pull request May 25, 2026
## Summary

Make the default `devtools verify` path actually preserve pytest-testmon
affected-test selection instead of silently expanding through
Polylogue's own invalidator or pytest marker selection behavior.

## Problem

While validating #1548, `devtools verify` widened a narrow branch into a
9,513-test run. There were two separate causes:

1. `devtools/verify.py` carried a hand-maintained changed-file
invalidator list that forced `--testmon-noselect` for config and
`tests/infra/` paths.
2. Even after removing that list, the default pytest step still passed
`-m not scale_medium and not scale_large`. Pytest-testmon documents that
ordinary pytest selectors such as `-m` deactivate selection unless
`--testmon-forceselect` is supplied, so the default command still ran
effectively all tests.

## Solution

- Remove the homegrown global invalidator path from `devtools verify`.
- Keep explicit full collection only under `--seed-testmon` and `--all`
/ `--full`.
- Add `--testmon-forceselect` to the default affected-test step because
the command always uses marker filters for scale tiers.
- Run default affected-testmon single-process (`-n 0`) to avoid xdist
collection skew with forced testmon selection; seed/full diagnostics
keep worker pools.
- Update tests and workflow docs to describe the real mechanism.

Closes #1549

## Verification

- `pytest -q tests/unit/devtools/test_verify.py --tb=short` -> 32 passed
in 5.16s
- `ruff format --check devtools/verify.py
tests/unit/devtools/test_verify.py && ruff check devtools/verify.py
tests/unit/devtools/test_verify.py` -> all checks passed
- `python -m mypy devtools/verify.py tests/unit/devtools/test_verify.py`
-> success
- `devtools render-all` -> regenerated AGENTS/docs surfaces
- `devtools verify --json` -> exit 0, pytest step `pytest testmon`,
`pytest_workers: 0`, `pytest_selection: testmon`, `count: 32`, total
42.67s
- pre-push `devtools verify --quick` -> exit 0, total 33.08s
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.

1 participant