acpmux: a turn on lane reports only reports nothing upward

Merged
TE
10d ago
+524-15

A lane's parent reports to its own parent. Without this, a parent's turn that only read its lanes' reports would itself report upward, and a chain of lanes would keep answering reports with reports. Part 3 of 3 of #24365's split (parts 1 and 2: #25327, #25366).

  • A turn that took in only lane reports sends no report: a report on its own, or a turn of agent messages that held only reports (digest.rs).
  • Each turn is tracked on its own (TurnKinds in hub/lane_reports.rs). If another prompt is steered into the turn, the turn reports. The steer is counted before the agent can read it, and taken back when the steer found no turn or was withdrawn (hub/steer_end.rs).
  • A report still left queued goes out when such a turn ends.

Risk: normal. It changes only when a lane report is made, not how it is delivered.

Changelog

none

Testing

  • cargo test -p acpmux --lib lane_reports: includes each_turn_on_reports_only_is_known_on_its_own and a_turn_on_reports_only_is_known_by_its_provenance.
  • cargo test -p acpmux --lib steer_end: only_a_steer_the_turn_took_counts_as_in_it.
  • cargo test -p acpmux --test lane_reports: 17/17.
  • cargo clippy -p acpmux --all-targets -- -D warnings and cargo fmt --check: clean.

Observed / Not run

  • Observed: the tests above pass on this head (huge-blue, umask 077). In the full --lib run, agent_tools::tests::own_servers_run_under_the_daemon_prefix fails on base too. hub::admission::tests::an_unreadable_registry_keeps_the_last_good_copy is flaky through shared global state from #25453, and is being fixed in its own PR.
  • Not run: the other integration suites, which CI runs.

šŸ¤– Generated with Claude Code

Agent session: agent session