Skip to content

feat: add runtime and host command observability - #84

Merged
roodboi merged 11 commits into
mainfrom
codex/runtime-observability
Sep 8, 2026
Merged

feat: add runtime and host command observability#84
roodboi merged 11 commits into
mainfrom
codex/runtime-observability

Conversation

@roodboi

@roodboi roodboi commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Host commands lacked retained lifetime/CPU/ownership diagnostics, and large project listings did not show where discovery time was spent. Add read-only host/lifecycle inspection, explicit finite-command timeouts, compact project summaries with phase timings, and per-container resource diagnostics.

  • Track payload-free records with PID/start-time verification, live/completed CPU, intended persistence, cancellation and orphan reporting. Terminal records distinguish the actual command PID from its supervisor-owned group and account for the command itself. Completion/deadline handling runs independently of diagnostic setup, preserving command outcomes and actual completion timestamps. Normalize legacy Bun Linux peak RSS to bytes.
  • Preserve default project JSON while adding summary/profile requests, daemon refresh/cache metrics and direct discovery selection. Project only required Docker inspect fields and exclude stopped/synthetic containers from stats.
  • Include mount types/destinations in human and watch details, plus mount metadata in JSON. Add cleanup dry-run and a bounded Bun/Node procfs/cgroup/storage probe. Update usage and generated CLI documentation.

Validation: pinned Bun 1.3.9 build, forced CLI/database typecheck and lint, privacy check, full forced suite (941 CLI passed, 5 skipped; 2 database passed). Ten source/compiled real-PTY regressions verify cancellation, job control and finalized command records; timeout/CPU, isolated daemon and Node/stopped-container probes passed. Linux Bun 1.3.9 regression tests verify outcome/callback ordering despite delayed diagnostics and byte-sized peak memory accounting. Built human usage output shows mounts. Independent adversarial review checked the fixes; GitHub current-head CI and review are separate gates.

Measured isolated daemon payload: 770,017 full bytes versus 4,908 summary/profile bytes for the same 13 projects. This establishes payload reduction, not a controlled latency speedup. Automatic registration remains a separately visible cost; no speculative registry cache was introduced.

Includes the merged #83 fixes plus Linux socket-name compatibility and preserved /dev/tty access for piped commands. A dedicated Linux PR job now covers native process, terminal, ownership, and resource-accounting regressions. Cleanup previews exclude lifecycle placeholders. Project filters scope tracked host-command rows and totals in both one-shot and watch output; a subsequent focused regression and typecheck also passed.

Release signal: feat for optional diagnostics and timeout flags. No installed binary upgrade, container/volume cleanup, application healthcheck change or memory-limit change.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-08T18:41:38.423077Z 3e7f080 New commits
🔒 Security Review Completed 2026-09-08T18:38:42.794363Z 3e7f080 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 19f38d5e87

ℹ️ 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 src/lib/shell.ts Outdated
Comment thread src/commands/usage.ts
…ntime-observability

# Conflicts:
#	docs/env.md

@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: c52e5ac04f

ℹ️ 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 src/commands/projects.ts
@roodboi

roodboi commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

@codex review — please review the updated head including the TTY supervisor diagnostics integration, Linux peak-RSS units, mount details, and slow diagnostic callback timeout handling.

Base automatically changed from codex/host-cancellation-daemon-ownership to main September 8, 2026 18:23

@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: a25609b3b3

ℹ️ 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 src/commands/usage.ts Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@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: 3e7f08030d

ℹ️ 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 scripts/inspect-container-resources.ts Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@roodboi
roodboi merged commit 38d49be into main Sep 8, 2026
7 checks passed
@roodboi
roodboi deleted the codex/runtime-observability branch September 8, 2026 18:50
roodboi pushed a commit that referenced this pull request Sep 8, 2026
## [4.2.0](v4.1.1...v4.2.0) (2026-09-08)

### Features

* add runtime and host command observability ([19f38d5](19f38d5))
* add runtime and host command observability ([#84](#84)) ([38d49be](38d49be))

### Bug Fixes

* cancel host process trees and scope daemon cleanup ([7f5c27d](7f5c27d))
* cancel host process trees and scope daemon cleanup ([#83](#83)) ([12822d4](12822d4))
* cancel verified TTY command descendants ([bd1c285](bd1c285))
* exclude lifecycle placeholders from orphan cleanup ([a25609b](a25609b))
* own terminal command groups before forwarding cancellation ([1cc238d](1cc238d))
* preserve command outcomes and resource diagnostics ([c52e5ac](c52e5ac))
* preserve controlling terminals with piped command input ([3e7f080](3e7f080))
* preserve nested host command usage attribution ([f4f487d](f4f487d))
* recognize exact Linux daemon socket names ([a5b2cbd](a5b2cbd))
* scope tracked host usage to the requested project ([1b0cf32](1b0cf32))
* skip CLI initialization in terminal supervisor ([8091e3a](8091e3a))
* use typed Docker inspect fields in resource probes ([b0991af](b0991af))
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