docs: the stdio protocol doc describes the wire that ships - #286
Merged
Conversation
docs/stdio-protocol.md called itself the normative reference and documented openmax-stdio/3 while the binary speaks /5 and `--check --stdio` rejects a /3 hello on its first line. A client written from the doc failed conformance before it sent a command. The doc now matches `openmax --spec stdio`: the hello line carries `continued`; the event table gains `harness_note`, `compacted`, `turn_refused`, and the optional `approval_request.env`; the stop_reason table gains `budget_exhausted` and `unverified`, both emitted by core and mapped by every frontend but named nowhere; and the process exit code is stated. One "what changed" section per bump. The printed contract omitted `continued` from its hello line while the binary emits it. The `Done` doc comment on the wire type listed six stop reasons and the loop emits eight. The stdio module doc pointed at a README section that does not exist. README named the /3 contract twice. The usage doc referred to a `delegate` skill the tree stopped shipping in #240. The configuration example omitted `context_tokens`, the one field the text two paragraphs later calls required.
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.
Why
docs/stdio-protocol.mdcalls itself the normative reference for every field of every line and documentsopenmax-stdio/3. The binary speaks/5, andopenmax --check --stdiorejects a/3hello on its first line, so a client written from the doc fails conformance before it sends a command. Two events and two stop reasons that core emits today are named nowhere a client author would look.Summary
docs/stdio-protocol.mdnow matchesopenmax --spec stdio: the hello line carriescontinued; the event table gainsharness_note,compacted,turn_refused, and the optionalapproval_request.envwith the rendering rule for it; the stop_reason table gainsbudget_exhaustedandunverified; the process exit code is stated; one "what changed" section per bump, in the order the bumps happened.spec.rs) omittedcontinuedfrom its hello line while the binary emits it.Donedoc comment on the wire type listed six stop reasons; the loop emits eight. All eight are described./3contract twice.delegateskill the tree stopped shipping in chore(skills): the tree's extension surfaces ship empty #240.context_tokens, which the text two paragraphs later calls required.No behavior change: documentation, one string in the printed spec, and two doc comments.
Test Plan
cargo clippy --workspace --all-targets --locked -- -D warnings: clean.cargo test --workspace --locked: 944 passed, 11 ignored, 0 failed. The stdio spec drift tests and the wire golden pass unchanged.crates/tui/src/stdio.rs,crates/tui/src/headless.rs,crates/core/src/agent.rs, and the output ofopenmax --spec stdiofrom a release build.Greptile Summary
Updates the stdio protocol reference and related documentation for the shipped
openmax-stdio/5contract. The documented/5handshake, legacy/3rejection,harness_noteandturn_refusedenvelopes, and provider-error completion behavior were exercised against the CLI and matched the documentation. No defects were found.Confidence Score: 5/5
Safe to merge based on the exercised stdio protocol and error-handling flows.
The final review contains no findings: the live CLI behavior and generated protocol validation agreed with the updated documentation.
Files Needing Attention: None. The changed documentation files were consistent with the tested CLI contract.
What T-Rex did
Reviews (1): Last reviewed commit: "docs: the stdio protocol doc describes t..." | Re-trigger Greptile