Skip to content

Make catalog delivery facts authoritative - #399

Merged
schickling-assistant merged 5 commits into
mainfrom
schickling-assistant/2026-08-31-st2-health-foundation
Aug 31, 2026
Merged

Make catalog delivery facts authoritative#399
schickling-assistant merged 5 commits into
mainfrom
schickling-assistant/2026-08-31-st2-health-foundation

Conversation

@schickling-assistant

@schickling-assistant schickling-assistant commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Make st2 the admitted source of truth for agent topology, native delivery ownership/readiness, retirement settlement, and Codex delivery-critical protocol compatibility.

Why

Downstream orchestration currently has to reconstruct graph validity and delivery eligibility from partial declarations. That duplicates policy and can diverge at the live migration boundary. Codex admission also used release strings where the actual dependency is the experimental app-server schema.

What changed

  • add tagged, non-secret delivery-readiness declarations paired with explicit native session drivers; Ding remains restricted to opaque non-harness PTYs
  • publish admitted parent/root/depth/ancestor facts and effective driver/readiness in st2.catalog-graph.v2; duplicate, missing-parent, cycle, depth, and per-host root-count faults make the graph incomplete and null every affected topology field
  • stop every live retired task before archiving its inbox; any failed teardown keeps the entire inbox in place for the next reconciliation, while archive-receipt-wins settlement remains idempotent after teardown succeeds
  • admit Codex by a canonical fingerprint of linked method/payload arms and recursively referenced delivery-critical schemas; preserve behavioral evidence as a separate check
  • classify unknown Codex thread statuses as an indeterminate hold rather than a terminal system error
  • ratify R35-R38 and the corresponding executable specification

Verification

  • nix develop -c cargo test -p agent-spec --test discovery delivery_readiness -- --nocapture
  • nix develop -c cargo test --test validate native_ -- --nocapture
  • nix develop -c cargo test --test catalog_graph graph_exposes_admitted_topology_and_delivery_readiness_facts -- --nocapture
  • nix develop -c cargo test --test catalog_graph graph_rejects_missing_cycle_depth_and_per_host_root_count -- --nocapture
  • nix develop -c cargo test --test run retired_agent_idempotently_archives_every_inbox_message -- --nocapture
  • nix develop -c cargo test --lib codex_app_server::tests::protocol_admission_proves_each_method_payload_linkage -- --nocapture
  • nix develop -c cargo test --lib codex_app_server::tests::unknown_thread_status_remains_a_hold_not_a_terminal_system_error -- --nocapture
  • nix develop -c cargo test --lib codex_app_server::tests::installed_codex_protocol_fingerprint_is_admitted -- --ignored --nocapture
  • git diff --check

axe vrs check --profile strict docs/vrs was also run. It remains red on pre-existing repository-wide broken local links and legacy decision/delta/experiment shape violations; none points at the edited R35-R38 material.

Rollout

No deployment or merge in this PR. Downstream Axe/catalog consumers can pin commit 060cbb7730ab92d13d0ef768cdd5068655ffe0a6 and remove their duplicate graph validation before the coordinated live migration.

Deferred acceptance

  • project-wide validation and CI are intentionally left to integration coordination
  • live deployment/migration is intentionally not performed
  • compatible behavior from historical PRs outside this coherent subset (process-group/socket recovery and Darwin-only race fixes) is not included
Posted on behalf of @schickling
field value
agent_identity dev3.direct.omp.jmg9x29x
session dev3.jmg9x29x
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.0.11
agent_runtime OMP 18.0.11
tooling_profile dotfiles@2161b9c

agent-identity: dev3.direct.omp.jmg9x29x
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.0.11
agent-runtime: OMP 18.0.11
tooling-profile: dotfiles@2161b9c
agent-identity: dev3.direct.omp.jmg9x29x
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.0.11
agent-runtime: OMP 18.0.11
tooling-profile: dotfiles@2161b9c
agent-identity: dev3.direct.omp.jmg9x29x
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.0.11
agent-runtime: OMP 18.0.11
tooling-profile: dotfiles@2161b9c
agent-identity: dev3.direct.omp.jmg9x29x
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.0.11
agent-runtime: OMP 18.0.11
tooling-profile: dotfiles@2161b9c
agent-identity: dev3.direct.omp.jmg9x29x
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.0.11
agent-runtime: OMP 18.0.11
tooling-profile: dotfiles@2161b9c
@schickling-assistant
schickling-assistant merged commit aa8eb48 into main Aug 31, 2026
2 checks passed
schickling pushed a commit that referenced this pull request Aug 31, 2026
* fix(validate): retired declarations leave the root slot (#402)

Root counting in validate's root-count invariant and the graph's admitted
topology counted every supervisor-less spec, so legacy `retired #true`
tombstones held a host's root slot and the live dev3 catalog failed with
"found 8". The folded desired-state model already maps both retirement
spellings to AgentDesiredState::Retired; both consumers now share one
predicate (supervisor_chain::is_counted_root) so a retired declaration
never counts, a suspended root still does, and zero counted roots
remains an error.

The graph declarations view folds legacy `retired #true` to
desiredState "retired"; an absent lifecycle stays null (lowers to
running).

Also repairs six tests/validate.rs expectations to the #399 semantics
(that target is not CI-gated, so the drift shipped unnoticed): a
dangling supervisor is now an error, driver/deliver conflicts refuse at
parse time, native drivers require delivery-readiness, and fixtures
satisfy the one-root invariant.

agent-identity: dev3.direct.omp.wk3aavmh
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.0.11
agent-runtime: OMP 18.0.11
tooling-profile: dotfiles@1defc60

* fix(validate): reject active chains rooted at a retired declaration

Review finding on #405 (Codex P1): with retired declarations excluded
from root counting, one active root plus a retired root still
supervising an active worker validated clean — root-count saw exactly
one counted root while the worker's chain terminated at the tombstone,
and the graph published complete: true with two disconnected trees.

An active agent's chain must now terminate at a counted root
(retired-root error); retired chains under a retired root stay legal.
Live dev3 catalog verified: zero new errors beyond the pre-existing
delivery-readiness ones (#406).

agent-identity: dev3.direct.omp.wk3aavmh
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.0.11
agent-runtime: OMP 18.0.11
tooling-profile: dotfiles@1defc60
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