Skip to content

refactor: split doctor readiness workflows - #298

Merged
Sinity merged 2 commits into
masterfrom
feature/refactor/repair-status-runtime
Apr 21, 2026
Merged

Sinity merged 2 commits into
masterfrom
feature/refactor/repair-status-runtime

Conversation

@Sinity

@Sinity Sinity commented Apr 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Split doctor repair/session-product assessment into typed helper functions.
  • Split doctor CLI maintenance execution into reusable workflow helpers while preserving VACUUM/persistence ordering.
  • Split archive readiness report construction into focused check builders.

Problem

Doctor maintenance and readiness logic had accumulated large inline blocks for session-product debt counting, CLI maintenance dispatch, archive debt checks, provider summaries, derived-model checks, and transcript-embedding freshness. That made the status/repair surface hard to audit and fragile to extend during the broader renewal push.

Solution

  • Added explicit session-product repair assessment helpers in polylogue/storage/repair.py.
  • Added small workflow helpers and a typed maintenance input object in polylogue/cli/check_workflow.py.
  • Extracted readiness builder functions in polylogue/readiness.py for config paths, DB probes, message index status, archive debt, duplicate/provider summaries, derived models, and embedding freshness.

Verification

  • pytest -q tests/unit/storage/test_repair.py tests/unit/cli/test_check.py
  • pytest -q tests/unit/core/test_health_core.py tests/unit/cli/test_check.py tests/unit/cli/test_check_runtime.py tests/unit/storage/test_fts5.py
  • mypy polylogue/storage/repair.py polylogue/cli/check_workflow.py tests/unit/storage/test_repair.py tests/unit/cli/test_check.py
  • mypy polylogue/readiness.py polylogue/cli/check_workflow.py polylogue/storage/repair.py tests/unit/core/test_health_core.py tests/unit/cli/test_check.py tests/unit/cli/test_check_runtime.py tests/unit/storage/test_fts5.py
  • mypy polylogue tests
  • devtools verify --quick

Ref #270

@coderabbitai

coderabbitai Bot commented Apr 21, 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 43 minutes and 40 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 43 minutes and 40 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: 6d5e9458-5df2-4533-bbb7-f48c5825f5e6

📥 Commits

Reviewing files that changed from the base of the PR and between 1889033 and 7a616dc.

📒 Files selected for processing (3)
  • polylogue/cli/check_workflow.py
  • polylogue/readiness.py
  • polylogue/storage/repair.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/refactor/repair-status-runtime

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 95b8d2c into master Apr 21, 2026
13 checks passed
@Sinity
Sinity deleted the feature/refactor/repair-status-runtime branch April 21, 2026 13:30
Sinity added a commit that referenced this pull request Apr 22, 2026
## Summary
- Split doctor repair/session-product assessment into typed helper functions.
- Split doctor CLI maintenance execution into reusable workflow helpers while preserving VACUUM/persistence ordering.
- Split archive readiness report construction into focused check builders.

## Problem
Doctor maintenance and readiness logic had accumulated large inline blocks for session-product debt counting, CLI maintenance dispatch, archive debt checks, provider summaries, derived-model checks, and transcript-embedding freshness. That made the status/repair surface hard to audit and fragile to extend during the broader renewal push.

## Solution
- Added explicit session-product repair assessment helpers in `polylogue/storage/repair.py`.
- Added small workflow helpers and a typed maintenance input object in `polylogue/cli/check_workflow.py`.
- Extracted readiness builder functions in `polylogue/readiness.py` for config paths, DB probes, message index status, archive debt, duplicate/provider summaries, derived models, and embedding freshness.

## Verification
- `pytest -q tests/unit/storage/test_repair.py tests/unit/cli/test_check.py`
- `pytest -q tests/unit/core/test_health_core.py tests/unit/cli/test_check.py tests/unit/cli/test_check_runtime.py tests/unit/storage/test_fts5.py`
- `mypy polylogue/storage/repair.py polylogue/cli/check_workflow.py tests/unit/storage/test_repair.py tests/unit/cli/test_check.py`
- `mypy polylogue/readiness.py polylogue/cli/check_workflow.py polylogue/storage/repair.py tests/unit/core/test_health_core.py tests/unit/cli/test_check.py tests/unit/cli/test_check_runtime.py tests/unit/storage/test_fts5.py`
- `mypy polylogue tests`
- `devtools verify --quick`

Ref #270
@Sinity Sinity added area:cli CLI area:parser Parser area:storage Storage tool:claude Claude type:refactor Code restructuring labels Apr 22, 2026
Sinity added a commit that referenced this pull request Apr 22, 2026
Doctor maintenance and readiness logic had accumulated large inline
blocks for session-product debt counting, CLI maintenance dispatch,
archive debt checks, provider summaries, derived-model checks, and
transcript-embedding freshness. The status/repair surface was hard
to audit and fragile to extend during the broader renewal push.

Adds explicit session-product repair assessment helpers in
`storage/repair.py`. Adds small workflow helpers and a typed
maintenance input object in `cli/check_workflow.py`. Extracts
readiness builder functions in `readiness.py` for config paths, DB
probes, message index status, archive debt, duplicate/provider
summaries, derived models, and embedding freshness. Preserves
VACUUM/persistence ordering in doctor CLI maintenance execution.

Verification: pytest + mypy over repair / check / check_runtime /
fts5 / health-core suites; devtools verify --quick green.

Ref #270
Sinity added a commit that referenced this pull request Apr 22, 2026
Doctor maintenance and readiness logic had accumulated large inline
blocks for session-product debt counting, CLI maintenance dispatch,
archive debt checks, provider summaries, derived-model checks, and
transcript-embedding freshness. The status/repair surface was hard
to audit and fragile to extend during the broader renewal push.

Adds explicit session-product repair assessment helpers in
`storage/repair.py`. Adds small workflow helpers and a typed
maintenance input object in `cli/check_workflow.py`. Extracts
readiness builder functions in `readiness.py` for config paths, DB
probes, message index status, archive debt, duplicate/provider
summaries, derived models, and embedding freshness. Preserves
VACUUM/persistence ordering in doctor CLI maintenance execution.

Verification: pytest + mypy over repair / check / check_runtime /
fts5 / health-core suites; devtools verify --quick green.

Ref #270
Sinity added a commit that referenced this pull request Apr 22, 2026
Doctor maintenance and readiness logic had accumulated large inline
blocks for session-product debt counting, CLI maintenance dispatch,
archive debt checks, provider summaries, derived-model checks, and
transcript-embedding freshness. The status/repair surface was hard
to audit and fragile to extend during the broader renewal push.

Adds explicit session-product repair assessment helpers in
`storage/repair.py`. Adds small workflow helpers and a typed
maintenance input object in `cli/check_workflow.py`. Extracts
readiness builder functions in `readiness.py` for config paths, DB
probes, message index status, archive debt, duplicate/provider
summaries, derived models, and embedding freshness. Preserves
VACUUM/persistence ordering in doctor CLI maintenance execution.

Verification: pytest + mypy over repair / check / check_runtime /
fts5 / health-core suites; devtools verify --quick green.

Ref #270
@Sinity

Sinity commented May 1, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

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

@Sinity
Sinity requested a review from Copilot May 1, 2026 01:52
@Sinity
Sinity removed the request for review from Copilot May 1, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant