Skip to content

feat(status): expose assertion and transform readiness (#1832) - #1976

Merged
Sinity merged 2 commits into
masterfrom
feature/feat/status-transform-assertion-readiness-1832
Jun 16, 2026
Merged

Sinity merged 2 commits into
masterfrom
feature/feat/status-transform-assertion-readiness-1832

Conversation

@Sinity

@Sinity Sinity commented Jun 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds direct polylogue status --format json component-readiness entries for the assertion substrate and deterministic recovery transforms. The new entries are additive under component_readiness.assertions and component_readiness.transforms; existing archive_readiness, embedding readiness, and archive-surface components remain unchanged.

Problem

#1832 is converging status/readiness onto one vocabulary. After #1880 and #1883 settled concrete transform and assertion surfaces, status JSON still could not answer whether those capability families were usable, missing, or degraded.

Solution

Add typed readiness adapters in polylogue.readiness.capability for the user-tier assertion substrate and transform registry. Direct status JSON now reads bounded user.db.assertions counts and maps the transform registry plus existing archive session count into canonical ComponentReadiness DTOs. This intentionally stays in direct CLI status for now: daemon/web surfaces do not yet carry truthful user-tier assertion counts or transform availability details.

Verification

  • nix develop --command devtools test tests/unit/core/test_readiness_capability.py tests/unit/cli/test_status.py -k 'readiness or component or assertion or transform' -> 15 passed, 24 deselected
  • nix develop --command devtools verify --quick -> exit_code 0
  • Rebased onto current origin/master after feat(demo): seed deterministic user overlays (#1843) #1975 merged; pre-push quick gate -> exit_code 0

PR handoff checklist

Issue slice: #1832 transform/assertion readiness entries after #1880/#1883 surfaces settled.
Files inspected: polylogue/readiness/capability.py, polylogue/readiness/__init__.py, polylogue/cli/commands/status.py, tests/unit/core/test_readiness_capability.py, tests/unit/cli/test_status.py, polylogue/daemon/status.py.
Files changed: polylogue/readiness/capability.py, polylogue/readiness/__init__.py, polylogue/cli/commands/status.py, tests/unit/core/test_readiness_capability.py, tests/unit/cli/test_status.py.
Old surface removed or retained: retained existing status/archive readiness surfaces; added canonical component entries only.
Contracts/tests added: adapter tests for assertion/transform readiness; direct status JSON tests for ready and missing states.
Generated artifacts updated: none; render/topology checks stayed clean.
Verification commands and results: listed above.
Known caveats / SPEC_MISMATCH: daemon/web readiness is not changed because those payloads do not currently include bounded assertion counts or transform registry/session capability details.
Follow-up intentionally not included: daemon/web/MCP projection for assertion/transform readiness once their payload seams carry the same bounded counts.

Ref #1832

Summary by CodeRabbit

  • New Features

    • Enhanced status reporting to include assertions and transforms readiness information.
    • Status command now provides detailed diagnostics for assertions and transform registry availability.
  • Tests

    • Added comprehensive test coverage for new assertions and transforms readiness checks.

Problem: the shared component-readiness map did not yet expose the newly settled assertion substrate or deterministic recovery transform surface, leaving #1832 unable to answer whether those capabilities are usable from status JSON.\n\nWhat changed: add typed readiness adapters for the user-tier assertion substrate and transform registry, then include bounded direct-status JSON components for assertions and transforms. The assertion component reads only user.db assertion counts; the transform component uses the existing archive session count and transform registry metadata.\n\nVerification: nix develop --command devtools test tests/unit/core/test_readiness_capability.py tests/unit/cli/test_status.py -k 'readiness or component or assertion or transform' -> 15 passed, 24 deselected; nix develop --command devtools verify --quick -> exit_code 0.\n\nRef #1832
@coderabbitai

coderabbitai Bot commented Jun 16, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2d35d25e-0a5e-4a40-a4c7-a70c71ee7995

📥 Commits

Reviewing files that changed from the base of the PR and between b61bb63 and 6f7c912.

📒 Files selected for processing (5)
  • polylogue/cli/commands/status.py
  • polylogue/readiness/__init__.py
  • polylogue/readiness/capability.py
  • tests/unit/cli/test_status.py
  • tests/unit/core/test_readiness_capability.py

📝 Walkthrough

Walkthrough

Two new readiness adapter functions (component_from_assertion_substrate, component_from_transform_registry) are added to polylogue/readiness/capability.py and re-exported from the package. The CLI status command's direct JSON path is updated to pass active_root into _direct_component_readiness, which now calls two new helpers to populate assertions and transforms component readiness. Tests cover adapter state mappings and CLI integration scenarios.

Changes

Assertions & Transforms Readiness Components

Layer / File(s) Summary
New capability-readiness adapters and exports
polylogue/readiness/capability.py, polylogue/readiness/__init__.py
component_from_assertion_substrate and component_from_transform_registry added to capability.py with full state/counts/caveats/repair-hint logic; both exported via module __all__ and re-exported from the package __init__.
CLI status command wiring
polylogue/cli/commands/status.py
_direct_component_readiness signature updated to require active_root; two new helpers _direct_assertion_component (queries user.db) and _direct_transform_component (derives from archive_readiness) added and called; call site updated to pass active_root.
Unit and integration tests
tests/unit/core/test_readiness_capability.py, tests/unit/cli/test_status.py
Unit tests cover both adapters across missing/ready/error/blocked states; integration tests extend the archive-surface test to seed user.db and assert new components, plus two new tests for missing-archive and failed-archive-readiness paths.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

A rabbit checks the burrow twice,
Assertions counted, transforms precise.
user.db holds every claim,
The registry reports the same.
With active_root now in hand,
Readiness blooms across the land! 🐇✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 35.29% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: exposing assertion and transform readiness in the status command, matching the primary purpose of the PR.
Description check ✅ Passed The description follows the template with all major sections completed: Summary explains what changed and why, Problem contextualizes the work with issue references, Solution describes modules and contracts touched, Verification includes exact test commands with results, Changelog notes are appropriately included, and Risks/Follow-ups section documents intentional scoping limitations.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/feat/status-transform-assertion-readiness-1832

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.

@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: c952dc3899

ℹ️ 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/cli/commands/status.py Resolved
Problem: status --format json treated absent archive counts from a failed archive readiness probe as zero sessions, producing a misleading transforms=missing/no sessions payload and a demo-import repair hint.

What changed: component_from_transform_registry now accepts an explicit error path, and direct status maps checked-false archive readiness into a blocked transform component without session_count or import hints.

Verification: nix develop --command devtools test tests/unit/core/test_readiness_capability.py tests/unit/cli/test_status.py -k 'readiness or component or assertion or transform' (16 passed); nix develop --command devtools verify --quick (exit_code 0)
@Sinity

Sinity commented Jun 16, 2026

Copy link
Copy Markdown
Owner Author

Addressed the Codex P2 transform-readiness finding in 6f7c912: checked-false archive readiness now maps transforms to blocked with the archive error, no synthetic session_count=0 and no demo-import repair hint. Focused regression and quick gate both pass.

@Sinity
Sinity merged commit cbcc2e1 into master Jun 16, 2026
13 checks passed
@Sinity
Sinity deleted the feature/feat/status-transform-assertion-readiness-1832 branch June 16, 2026 03:43
@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.F061 / P2: fixed-already at the checked revision: The replacement producer gets session_count from archive.stats before constructing components, so a failed database count aborts instead of becoming zero. When the optional exact readiness probe has no counts, transforms use that independently measured session count at polylogue/operations/daemon_status.py:789.

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.

1 participant