fix(hosted/orchestration): scope turn origin for local-agent spawn so cron tools aren't denied - #5527
The change wraps the `run_local_agent` spawn in `with_origin(AgentTurnOrigin::Cl
The change wraps the run_local_agent spawn in with_origin(AgentTurnOrigin::Cli, …) so the sub-agent's external-effect tools are no longer refused by the approval gate as Unknown. It also rewrites the gate's unlabelled-origin deny message to be more actionable. The tests earn their keep: the new gate test (cron_add_on_a_turnless_spawn_resolves_to_a_real_origin_not_unknown_denied) exercises both halves of the behavior across a real tokio::spawn boundary — it fails if the gate stops denying an unlabelled cron_add or stops allowing one scoped with an explicit Cli origin. The turn_origin.rs test pins the with_origin-across-spawn pattern the fix relies on and would fail if that mechanism broke. The updated string assertions in gate.rs and the e2e file track the deny-message wording change and contain the new substrings the message actually produces. No problems found. The code index for this repository is cold, so this review saw the diff alone.
No findings.