Repository navigation
fix(cli): show embedding readiness in status fallback - #1548
Conversation
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
|
Warning Review limit reached
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 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (12)
✨ 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. Comment |
## 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
Summary
Show canonical embedding readiness in the daemon-offline
polylogue statusfallback and restore the broadened verification baseline for the recently added read-pull resume candidate surfaces.Problem
polylogue statusalready 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 verifywidened to--testmon-noselectand exposed unrelated baseline drift fromresume-candidatesand 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
polylogue/cli/commands/status.pythat reports status/freshness, retrieval readiness, embedded/pending conversation counts, stale messages, failure count, and latest catch-up summary.resume-candidatesinpolylogue.cli.output_assurance, refreshed CLI snapshots/docs, updated the MCP tool-schema witness, and categorizedfind_resume_candidates/get_logical_sessionin facade contract coverage.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.32sruff 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 passedpython -m mypy polylogue/cli/commands/status.py tests/unit/cli/test_status.py-> successdevtools render-all --check-> OKdevtools verify --quick-> exit 0, total 34.1spytest -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.45spython -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-> successdevtools verify-> exit 0, 9511 passed, 2 xfailed, total 281.95s