test(missions): a composed node is offered the same help as a solo one

Every composed run so far reports `subagents: 0`, and the honest question is
whether that is the tasks being small or the capability being absent. It is the
former, and this is what says so: a composed node's task text is built by
`microvm_turn_executor` and then wrapped by the SAME `vm_prompt` inside
`run_inside`, so one prompt builder serves both paths and both carry the `Agent`
tool offer and the `verifier` / `explorer` roles.

Asserted rather than left to code reading, because if someone gave composed
nodes their own prompt without the offer, the difference would show up only as a
count nobody was watching — and "the graph fanned out but no node did" is
indistinguishable from "no node needed to".

The roles are read from `agent_definitions()` rather than spelled out, so adding
a role without mentioning it in the prompt fails here instead of shipping a role
the lead is never told about.

535 tests pass, clippy clean.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
Omar Sobh
2026-08-06 19:26:59 -07:00
co-authored by Claude Opus 5
parent 742724e53c
commit a48d78f8eb
+18
View File
@@ -949,6 +949,24 @@ mod tests {
assert!(!BLOCKS_PROBE.contains(GUEST_REPO), "{BLOCKS_PROBE}"); assert!(!BLOCKS_PROBE.contains(GUEST_REPO), "{BLOCKS_PROBE}");
} }
/// EVERY VM turn is offered delegation, composed nodes included.
///
/// A composed node's task text is built by `microvm_turn_executor` and then
/// wrapped by this same `vm_prompt` inside `run_inside`, so one prompt
/// builder serves both paths. Composed runs report `subagents: 0` so far,
/// and this is what says that is the TASKS being small rather than the
/// capability being absent — if someone gave composed nodes their own
/// prompt without the offer, the difference would otherwise show up only as
/// a count nobody was watching.
#[test]
fn every_vm_turn_is_offered_the_same_help() {
let p = vm_prompt("do the thing");
assert!(p.contains("Agent tool"), "{p}");
for role in agent_definitions().as_object().unwrap().keys() {
assert!(p.contains(role.as_str()), "the prompt must name the `{role}` role: {p}");
}
}
/// The agent must not be told to push: delivery is host-side, and the guest /// The agent must not be told to push: delivery is host-side, and the guest
/// deliberately holds no forge credentials. /// deliberately holds no forge credentials.
#[test] #[test]