Skip to content

feat(agents): join observed harness state into the roster, Doctor, and human output - #322

Merged
schickling-assistant merged 5 commits into
schickling/hs-03-codexfrom
schickling/hs-04-roster
Aug 24, 2026
Merged

feat(agents): join observed harness state into the roster, Doctor, and human output#322
schickling-assistant merged 5 commits into
schickling/hs-03-codexfrom
schickling/hs-04-roster

Conversation

@schickling

@schickling schickling commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

The exposure slice: #268 §E's roster join (the maintainer call, decided for the join), Doctor, and the reader-side liveness cross-check.

  • ding::session_liveness: positive-evidence probe (ESRCH → dead; unreadable registry → indeterminate, downgrading nothing — a reader may not share the writer's PTY root).

  • agents --json: observedState appended last on both wire shapes — null when no record exists (no producer ≠ unknown); the probe applies only to this-host agents. The three pinned full-string assertions updated deliberately in the same change, with a new proof that declared presence and observed state are independent axes and lastActivity keeps its meaning.

  • INVARIANTS "Stable roster JSON" wording extended to name the third axis; row 14's two drifted proof references (post-feat(stream): implement declared event ingress #300/feat(ding): support OpenCode composer delivery #313 renames) repaired in passing — they were failing qualified_proof_references_resolve on the branch base.

  • Human st2 agents gains an observed column; Doctor emits advisories (missing record → driver gap; rotted record → reason), exit code unaffected.

  • Cycle-2: the probe resolves the pty root exactly as the runner does (legacy PTY_SESSION_DIR deliberately dropped); observedState carries the ask kind.

Part of the #268 stack (#319#326).

🤖 Generated with Claude Code

Refinement pass: the liveness probe derives the runner's own pty root from the catalog (PTY_ROOT/PTY_SESSION_DIR still win), so operator shells get the cross-check without exporting anything — the live smoke proved the cross-check fires with the right root and stays safely inert without it; the errno mapping is unit-tested (ESRCH→dead, EPERM→alive, unreadable→indeterminate); observedState serializes exit/reason as explicit null per the roster's null-not-omit convention; Doctor gains the ended-while-desired-running crashed-seat advisory with tests covering all four observed-state arms; and the human observed column is prefixed obs: so declared and observed state words never sit ambiguously side by side.

@schickling schickling changed the title schickling/hs 04 roster feat(agents): join observed harness state into the roster, Doctor, and human output Aug 23, 2026
@schickling
schickling marked this pull request as ready for review August 23, 2026 18:18

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

ℹ️ 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/main.rs
Comment thread src/agents.rs Outdated
@schickling
schickling force-pushed the schickling/hs-04-roster branch from cbba4cd to c9a6d04 Compare August 23, 2026 19: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: c9a6d041db

ℹ️ 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/agents.rs Outdated

@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: 213e860b02

ℹ️ 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/agents.rs Outdated
@schickling
schickling force-pushed the schickling/hs-04-roster branch from 213e860 to 386fcaa Compare August 23, 2026 23:01

@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: 386fcaae38

ℹ️ 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/ding/mod.rs
@schickling
schickling force-pushed the schickling/hs-04-roster branch from 386fcaa to f41f9e4 Compare August 23, 2026 23:35
@schickling
schickling force-pushed the schickling/hs-04-roster branch from f41f9e4 to 95092f4 Compare August 24, 2026 00:04
@schickling
schickling force-pushed the schickling/hs-04-roster branch from 95092f4 to 447de04 Compare August 24, 2026 00:37
@schickling
schickling force-pushed the schickling/hs-04-roster branch from 447de04 to eaa3c7a Compare August 24, 2026 04:30

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

ℹ️ 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/main.rs Outdated
&format!("{bus_id} observed harness state ended"),
&format!(
"session ended ({}) while desired state is running — crashed seat?",
observed.exit.as_deref().unwrap_or("exit unstated")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Report reason-only terminal diagnostics

When Codex reports CodexObservedState::TerminalError, harness_observation creates an ended record with reason: "systemError" but no exit (src/codex_app_server.rs:229-231). This fallback therefore makes Doctor print only session ended (exit unstated) and discards the actual terminal diagnostic, obscuring the cause operators need to investigate; include observed.reason when exit is absent.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixed in 493cb8c on schickling/hs-04-roster: the Doctor ended-advisory now falls back to the recorded reason when no exit is present (e.g. Codex's reason-only systemError terminal), instead of discarding it as 'exit unstated'.

Posted on behalf of @schickling
field value
agent_identity unknown
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.0.3
agent_runtime OMP 18.0.3
tooling_profile dotfiles@f33cd9c-dirty

schickling and others added 5 commits August 24, 2026 16:31
…d human output

The chosen $E surface from #268: an appended observedState object on both
roster JSON shapes (null = no record, distinct from derived unknown), a
compact observed column in human output, and advisory-only doctor lines.
The session-liveness cross-check demands positive evidence of death
(ding::session_liveness); an unreadable registry downgrades nothing.
Row 22's wording now names the third independent axis with its proof, and
two stale stream proof references from the #300/#313 renames are corrected.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…observed output

Review-pass fixes for the exposure slice: the session-liveness probe
derives the runner's own pty root from the catalog (PTY_ROOT and
PTY_SESSION_DIR still win) so operator shells get the cross-check without
exporting anything, with the errno mapping now unit-tested; observedState
serializes exit and reason as explicit null per the roster's
null-not-omit convention; Doctor gains the ended-while-desired-running
crashed-seat advisory and tests covering all four observed-state arms;
and the human observed column is prefixed obs: so two bare state words
never sit ambiguously side by side.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PTY_SESSION_DIR pointed the probe at a directory st2-managed sessions
never use (provable deaths read indeterminate); the probe now shares
run::effective_pty_root verbatim. observedState gains the machine-readable
ask axis, pinned literals updated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
reason precedes exit, as the spec example pins; pinned literals updated
in the same change.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…stated

An ended record can carry only a reason — Codex's observed systemError
writes reason without an exit — and the catch-all advisory discarded it,
leaving the operator 'exit unstated' with nothing to act on. The advisory
now falls back to the recorded reason when no exit is present.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
agent-identity: unknown
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.0.3
agent-runtime: OMP 18.0.3
tooling-profile: dotfiles@f33cd9c-dirty
@schickling-assistant
schickling-assistant merged commit 9297ea5 into main Aug 24, 2026
1 check passed
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.

2 participants