Skip to content

feat(monitor): implement MMP system_powerdown (#88)#153

Closed
SAY-5 wants to merge 1 commit into
gevico:mainfrom
SAY-5:say5-mmp-system-powerdown
Closed

feat(monitor): implement MMP system_powerdown (#88)#153
SAY-5 wants to merge 1 commit into
gevico:mainfrom
SAY-5:say5-mmp-system-powerdown

Conversation

@SAY-5
Copy link
Copy Markdown
Contributor

@SAY-5 SAY-5 commented May 10, 2026

Closes #88.

Adds the system_powerdown MMP command. As noted in the issue, the existing MonitorService::quit() already does the right thing, so this mirrors the quit branch and adds a regression test alongside test_mmp_quit.

Signed-off-by: SAY-5 <SAY-5@users.noreply.github.com>
@zevorn
Copy link
Copy Markdown
Member

zevorn commented May 11, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

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

ℹ️ 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 monitor/src/mmp.rs
Comment on lines +133 to +135
"system_powerdown" => {
s.quit();
json!({"return": {}})
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Treat system_powerdown as a terminating command

system_powerdown now sets quit_requested, but this path does not signal handle_connection() to return true, so run_tcp() does not break out like it does for quit and can remain blocked in listener.incoming() waiting for another connection. This means a client issuing system_powerdown may get a success response while the monitor thread keeps running until extra I/O occurs, which diverges from the shutdown behavior expected from the equivalent quit flow.

Useful? React with 👍 / 👎.

@zevorn
Copy link
Copy Markdown
Member

zevorn commented May 27, 2026

@SAY-5 Could you resolve conflicts?

@SAY-5
Copy link
Copy Markdown
Contributor Author

SAY-5 commented May 28, 2026

Looks like #124 landed and already implements system_powerdown plus the connection-loop fix, so this can be closed. Sorry for the noise.

@SAY-5 SAY-5 closed this May 28, 2026
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.

[Open Source Workshop] Implement system_powerdown command for MMP monitor

2 participants