Repository navigation
feat(core): child-agent handoff schema, validation and verify gate (#383, 1/2) - #396
Merged
Merged
Conversation
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
| return bad("artifact path has control characters or a backslash"); | ||
| } | ||
| if path.starts_with('/') || path.starts_with('~') { | ||
| return bad(format!("artifact path {path:?} must be workspace-relative")); |
…rnate data streams) (#383)
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.
What
Part 1 of 2 of the child-agent handoff: the typed document, its validation and the close gate. The child-side tool and the
agent_pollenforcement follow in part 2.Why
#383. A child's result reaches other agents only as the parent's retelling, and a child can finish without anyone checking its work.
Changes
handoff.rs(new, ungated so embedders have it):Handoff { version, role, summary, artifacts, verify }; rolesexplore/implement/verify/fix; artifacts are references (workspace-relativepathplus optionalrev), read by downstream children themselves rather than relayed by the parent..., backslash, control characters or leading-; arevmust be a plain commit/ref name (alphanumeric start, safe charset, no..), so neither can be parsed as an option or escape the workspace.Handoff::gate(): an implement/fix child without passing verification isUnverified/VerifyFailed, never closed silently.fix_prompt()builds the follow-up fix child's prompt from references and bounded evidence; text rendered for another model escapes control characters.Testing
cargo check --no-default-featurespass; cora review --staged clean.Refs #383