Skip to content

P0: Make the agent control contract unambiguous#270

Merged
pengfei-threemoonslab merged 1 commit into
mainfrom
codex/p0-agent-control-contract
Jul 12, 2026
Merged

P0: Make the agent control contract unambiguous#270
pengfei-threemoonslab merged 1 commit into
mainfrom
codex/p0-agent-control-contract

Conversation

@pengfei-threemoonslab

@pengfei-threemoonslab pengfei-threemoonslab commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Makes the agent control contract unambiguous by replacing independently-derived completion, stop, verification, and routing booleans with one schema-enforced AgentControl discriminated union.

This is the P0 control-contract milestone targeting 0.16.0b3 and runtime contract 14, rebased onto current main at d4407d8.

Root cause

The existing check, preflight, verifier, handoff, MCP, GitHub Action, and harness surfaces projected operational state independently. A result could therefore authorize completion while still requiring verification, expose agent work alongside a stop instruction, or let compatibility fields disagree with the release substrate.

What changed

  • Added the canonical complete | agent_action_required | human_review_required union and one pure control projector.
  • Migrated local check, preflight, verify/preview, handoff, verify-run, MCP, PR comments, GitHub outputs, attestation, and harness detectors to the shared control.
  • Removed the product-dead build_agent_controller module and its isolated test; the old AgentController, VerifierNextAction, and VerifierHumanReview models remain explicitly deprecated readers for frozen v0.1/v0.2 artifacts.
  • Separated execution, applicability, release decision, and CI enforcement.
  • Added fail-closed legacy normalization and cross-artifact consistency validation.
  • Added generated JSON Schema constraints for contradictory wrapper states, safe-repair routing, merge authority, and human-stop behavior.
  • Published boundary v2, verifier 0.3, handoff v3, preflight 0.3, verify-run v2, local contract schema 3, package 0.16.0b3, and runtime contract 14.
  • Preserved the Conductor OSS adapter from current main, including the required report v0.32 Conductor summary and the complete samples/conductor_agent/ fixture.
  • Regenerated documentation, schemas, examples, skills, adoption kits, public metadata, and v0.32 sample goldens.

Developer and agent impact

Agents now switch on control.state. Diagnostic decision values no longer authorize completion. Advisory versus strict mode changes only process enforcement, and only a new verifier artifact can clear an outstanding control obligation.

Validation

  • CI-equivalent aggregate: 3239 passed, 5 skipped, 88.40% coverage.
  • Static adapter isolation suite passed.
  • Evidence-backed semantic canaries: 65/65 passed (the named 64-case contract plus its harness assertion).
  • Agent-binding canaries: 51/51 passed.
  • Performance suite: 4/4 passed; the 10-second large-scan budget is unchanged and also passed under the coverage/-n auto aggregate.
  • Focused control, Conductor, schema, public-surface, safety-qualification, sample-golden, and GitHub Action suites passed.
  • generate_schemas.py --check, Ruff, and git diff --check passed.

Review requirement

Agents Shipgate self-verification produced report schema 0.32, decision=insufficient_evidence, merge_verdict=insufficient_evidence, and control.state=human_review_required because this PR changes protected release trust roots and public control schemas. This draft intentionally does not claim merge readiness or self-approval; explicit maintainer review is required.

@pengfei-threemoonslab
pengfei-threemoonslab force-pushed the codex/p0-agent-control-contract branch from cce51a9 to 9f7f32b Compare July 12, 2026 22:54
@pengfei-threemoonslab
pengfei-threemoonslab marked this pull request as ready for review July 12, 2026 23:27
@pengfei-threemoonslab
pengfei-threemoonslab merged commit e59be40 into main Jul 12, 2026
4 checks 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.

1 participant