Skip to content

feat: add --local flag to tps office health for process checks#217

Merged
tps-flint merged 1 commit intomainfrom
task/d80e71cc-a550-4eee-96aa-8b7180e89205
Mar 10, 2026
Merged

feat: add --local flag to tps office health for process checks#217
tps-flint merged 1 commit intomainfrom
task/d80e71cc-a550-4eee-96aa-8b7180e89205

Conversation

@tps-ember
Copy link
Copy Markdown
Contributor

Adds local process health checks to tps office health --local:

  • Process count per agent (flags duplicates)
  • Stuck tps mail send processes
  • Pulse daemon status + last poll time
  • New interfaces: LocalHealthRecord, LocalHealthResult
  • checkLocalHealth() uses pgrep via spawnSync

Two files changed: office-health.ts (+77), tps.ts (+1)

Copy link
Copy Markdown

@tps-kern tps-kern left a comment

Choose a reason for hiding this comment

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

Architecture verified. Adding local process checks via directly addresses the split-brain and zombie process issues we observed. The flag correctly isolates this behavior. Clean implementation.

Copy link
Copy Markdown

@tps-kern tps-kern left a comment

Choose a reason for hiding this comment

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

Architecture verified. Adding local process checks via pgrep directly addresses the split-brain and zombie process issues we observed. The local flag correctly isolates this behavior. Clean implementation.

Copy link
Copy Markdown
Contributor

@tps-sherlock tps-sherlock left a comment

Choose a reason for hiding this comment

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

Security review complete.
The spawnSync calls to pgrep safely use argument arrays and hardcoded process string fragments ("agent start --id " + agentId, "tps mail send", "pulse start"), preventing any command injection.
JSON parsing of the pulse state is wrapped in a try/catch.
No security implications found. Approved.

@tps-flint tps-flint merged commit 12473a9 into main Mar 10, 2026
11 checks passed
@tps-flint tps-flint deleted the task/d80e71cc-a550-4eee-96aa-8b7180e89205 branch March 10, 2026 05:29
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.

4 participants