mirror of
https://github.com/codewhale-hq/Codewhale.git
synced 2026-11-11 10:01:30 -10:00
Check agent lifecycle guidance at its model-facing field
The e27735bb full nextest run exposed one stale assertion that required
`action=wait` in the agent top-level description after duplicated lifecycle
guidance was removed. Verify the existing action/until/detached schema
field descriptions instead: immediate start, observational wait, one/all/
activity completion behavior, default turn ownership and detached lifetime.
Keep top-level start/role/claim and description-size guards unchanged.
Rename that existing test to match its lifecycle coverage. The adjacent
transcript artifact test continues to verify transcript_handle and now
also requires its model-facing handle_read direction. No production tool
text, schema, permissions, runtime behavior or measured budgets change.
Validation: rustfmt --check --edition 2024 on the changed test file passed;
git diff --check passed. Rust execution is explicitly unrun: the coordinator
owns the fresh combined build and rerun. No Cargo/provider calls made.
This commit is contained in:
1 parent
ff073b4920
commit
5978f41b69
1 file changed
+16
-2
@@ -3199,19 +3199,33 @@ fn child_artifact_copy_surfaces_working_notes_in_the_complete_transcript() {
|
||||
assert_eq!(transcript.target, "agent:agent_scout_notes");
|
||||
assert!(transcript.description.contains("todo_write working notes"));
|
||||
assert!(transcript.description.contains("transcript_handle"));
|
||||
assert!(transcript.description.contains("handle_read"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn agent_description_explains_background_child_and_transcript_handle() {
|
||||
fn agent_definition_explains_background_child_and_wait() {
|
||||
let tmp = tempdir().expect("tempdir");
|
||||
let manager = new_shared_subagent_manager(tmp.path().to_path_buf(), 1);
|
||||
let tool = AgentTool::new(manager, stub_runtime());
|
||||
let description = tool.description();
|
||||
let schema = tool.input_schema();
|
||||
|
||||
assert!(description.contains("Start with action=start and prompt"));
|
||||
assert!(description.contains("Read-only roles need no extra fields"));
|
||||
assert!(description.contains("multiple starts"));
|
||||
assert!(description.contains("action=wait"));
|
||||
// Field descriptions carry lifecycle details in the model's definition;
|
||||
// duplicating them in the top-level description wastes every request.
|
||||
let action = schema_property_description(&schema, "action");
|
||||
assert!(action.contains("returns immediately"));
|
||||
assert!(action.contains("wait only observes"));
|
||||
let until = schema_property_description(&schema, "until");
|
||||
assert!(until.contains("For action=wait"));
|
||||
assert!(until.contains("completion (default) returns when any one child settles"));
|
||||
assert!(until.contains("every child running at call time has settled"));
|
||||
assert!(until.contains("activity also returns on progress"));
|
||||
let detached = schema_property_description(&schema, "detached");
|
||||
assert!(detached.contains("False (default): the turn owns"));
|
||||
assert!(detached.contains("true: detached work outlives the turn"));
|
||||
assert!(description.contains("action=claim"));
|
||||
assert!(description.contains("Fleet role"));
|
||||
assert!(
|
||||
|
||||
Reference in new issue
Block a user