Skip to content

Driven-run start: check the commander's z against .gps FloorZ (#292) - #293

Merged
pjerra merged 3 commits into
devfrom
fix/start-commander-z-check
Oct 22, 2026
Merged

pjerra merged 3 commits into
devfrom
fix/start-commander-z-check

Conversation

@pjerra

@pjerra pjerra commented Oct 22, 2026

Copy link
Copy Markdown
Owner

Fixes #292.

A driven run's start moved the commander with .go xyz and then checked only the flat distance, so a wrong z (under a shelf or the terrain) went unnoticed and the bots followed the commander into the floor.

What changed:

  • After .go xyz the start selects the commander by GUID, then sends .gps and reads the reply's FloorZ.
  • A reply about another unit (X/Y more than the start range from the commander) is ignored.
  • If the commander stands off the floor, the start re-sends .go xyz once at the floor height; if the floor is far from the target (another layer) the start is refused with a plain reason.
  • No reply within the timeout: the start goes on and notes once per run that the height could not be checked.

Tests: go test ./... passes. New tests cover under-the-ground, the single re-send, a floor far from the target, a reply about another unit, the select-before-.gps order, and booking each GPS line. Mutations of each check turn a test red.

Reviews: Opus cold review SHIP, Codex review found no actionable issue.

Known limits (minor, follow-up):

  • The off-floor test compares FloorZ with the agent's own view of the commander's z; the server's Z: from the same reply would be more robust.
  • FloorZ of -200000 (no height data) is treated as "cannot check".
  • README still says the two GM lines are the only GM commands of a start; .gps and the re-send are now booked too.

@pjerra
pjerra marked this pull request as ready for review October 22, 2026 20:40
@pjerra
pjerra merged commit b067735 into dev Oct 22, 2026
2 checks passed
@pjerra
pjerra deleted the fix/start-commander-z-check branch October 26, 2026 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant