Include machine info in '#' status reply and add get_machine_info utility - #115
Merged
jamesoncollins merged 1 commit intoJun 1, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
#status handler by including machine details (hostname, OS, Python version, CPU, memory, disk, load) alongside uptime and git metadata.raw_messagebeing either a JSON string or already-parseddictso tests and the installed SignalBot behavior both work.Description
run.pyto acceptc.message.raw_messagewhen it's already adictand otherwisejson.loadsit, and to send a combinedstatus_messagecontaining uptime,get_git_info()andget_machine_info()for the#command (usesstatus_messagevariable and callsget_machine_info()in the handler).get_machine_info()and helpers (_format_bytes,_get_memory_info) toutils/misc_utils.py, and importplatform,shutil, andsocketto report hostname, OS, Python version, processor, CPU count, load average, memory usage and disk usage.tests/test_run.pyto assert the#response contains machine information fields such asMachine:,Hostname:, andOS:.Testing
python -m unittest discover -s tests -p "test_run.py"and they passed.python -m py_compile run.py utils/misc_utils.py tests/test_run.py, and it succeeded, and directly invokedget_machine_info()to confirm it returnsMachine:,Hostname:,OS:, andPython:lines.python -m unittest discover -s tests -p "test_*.py", which produced failures unrelated to these changes due to network/proxy restrictions and missing external credentials/API access (external downloads and API calls failed), so those failures are environmental rather than caused by this PR.Codex Task