Skip to content

feat(cli,daemon): register maintenance group and wire HTTP endpoints (#871) - #980

Merged
Sinity merged 1 commit into
masterfrom
feature/feat/maintenance-cli-and-daemon
May 9, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/feat/maintenance-cli-and-daemon

Conversation

@Sinity

@Sinity Sinity commented May 9, 2026

Copy link
Copy Markdown
Owner

Summary

Registers maintenance_group in polylogue/cli/click_command_registration.py and wires /api/maintenance/plan and /api/maintenance/run HTTP endpoints in the daemon. The polylogue maintenance group is now reachable from CLI; plan produces a structured dry-run summary; run requires explicit confirmation.

Solution

  • click_command_registration.py: maintenance_group registered
  • daemon/http.py: /api/maintenance/plan (GET) and /api/maintenance/run (POST with confirm) endpoints
  • Test coverage: CLI registration smoke + endpoint integration

Certification

WORK

  1. polylogue maintenance group registered in CLI
  2. polylogue maintenance plan provides dry-run summary
  3. /api/maintenance/plan and /api/maintenance/run endpoints exposed by daemon

REALIZATION

  1. polylogue/cli/click_command_registration.py: maintenance_group import + registration; test: tests/unit/cli/test_maintenance_registration.py
  2. polylogue/cli/commands/maintenance.py: maintenance_command group; plan subcommand with dry-run
  3. polylogue/daemon/http.py: plan + run endpoints; test: tests/unit/daemon/test_maintenance_endpoints.py

DECLARATION

I declare every WORK item above to be fully realized by the matching REALIZATION entry. Verified by: ruff; 63+140 lines of test coverage.

Refs #871

Copilot AI review requested due to automatic review settings May 9, 2026 11:45
@coderabbitai

coderabbitai Bot commented May 9, 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 52 minutes and 46 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ 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: d2e58dfe-b6d7-438b-bf5c-ff8cc971cf52

📥 Commits

Reviewing files that changed from the base of the PR and between 6381467 and b4c3258.

📒 Files selected for processing (7)
  • AGENTS.md
  • polylogue/cli/click_command_registration.py
  • polylogue/cli/commands/maintenance.py
  • polylogue/daemon/http.py
  • tests/unit/cli/test_click_app.py
  • tests/unit/cli/test_maintenance_registration.py
  • tests/unit/daemon/test_maintenance_endpoints.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/feat/maintenance-cli-and-daemon

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: ecdf5a3c0a

ℹ️ 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/daemon/http.py Resolved
Comment thread polylogue/daemon/http.py Resolved
Register maintenance_group in click_command_registration.py. Wire
/api/maintenance/plan and /api/maintenance/run in daemon HTTP layer.
Add registration smoke test and endpoint integration test.

Refs #871
@Sinity
Sinity force-pushed the feature/feat/maintenance-cli-and-daemon branch from ecdf5a3 to b4c3258 Compare May 9, 2026 11:52
@Sinity
Sinity merged commit fb5ab8d into master May 9, 2026
3 checks passed
@Sinity
Sinity deleted the feature/feat/maintenance-cli-and-daemon branch May 9, 2026 11:52
@Sinity
Sinity removed the request for review from Copilot May 9, 2026 12:08
@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.

  • 62.F077 / P1: fixed-already at the checked revision: The canonical destructive maintenance.reset operation now declares confirmation authorization at polylogue/operations/daemon_protocol.py:2545. Its staged-reset executor also requires payload.confirm to be exactly True before preparing or authorizing deletion at polylogue/operations/daemon_mutations.py:324-325, replacing the former unconfirmed maintenance-run route.

Only the rows listed above are dispositioned. Held findings remain open.

@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.

  • 63.F071 / P2: fixed-already at the checked revision: The replacement operation decoder explicitly rejects a non-mapping request at polylogue/operations/daemon_protocol.py:2722-2723. The HTTP bridge catches that ValueError and returns invalid_request/BAD_REQUEST at polylogue/daemon/http.py:5243-5244 instead of invoking body.get on an array and producing a 500.

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