P0: Make the agent control contract unambiguous#270
Merged
Conversation
pengfei-threemoonslab
force-pushed
the
codex/p0-agent-control-contract
branch
from
July 12, 2026 22:54
cce51a9 to
9f7f32b
Compare
pengfei-threemoonslab
marked this pull request as ready for review
July 12, 2026 23:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes the agent control contract unambiguous by replacing independently-derived completion, stop, verification, and routing booleans with one schema-enforced
AgentControldiscriminated union.This is the P0 control-contract milestone targeting
0.16.0b3and runtime contract14, rebased onto currentmainatd4407d8.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
complete | agent_action_required | human_review_requiredunion and one pure control projector.build_agent_controllermodule and its isolated test; the oldAgentController,VerifierNextAction, andVerifierHumanReviewmodels remain explicitly deprecated readers for frozen v0.1/v0.2 artifacts.0.16.0b3, and runtime contract14.samples/conductor_agent/fixture.Developer and agent impact
Agents now switch on
control.state. Diagnosticdecisionvalues 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
-n autoaggregate.generate_schemas.py --check, Ruff, andgit diff --checkpassed.Review requirement
Agents Shipgate self-verification produced report schema
0.32,decision=insufficient_evidence,merge_verdict=insufficient_evidence, andcontrol.state=human_review_requiredbecause 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.