Wire M10.6b probe markers through sessions, evo-server, probe and client
Foundation / checks (checks) (push) Successful in 32m33s
Foundation / checks (client) (push) Successful in 12m28s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m0s
Foundation / checks (network) (push) Successful in 12m8s
Foundation / checks (postgres) (push) Successful in 40m38s
Foundation / checks (tsan) (push) Successful in 8m4s
Foundation / postgres-tools (push) Successful in 1m36s
Foundation / image (push) Successful in 2m33s
Foundation / server-image (push) Successful in 3m53s

EXPERIMENT (ADR-0094). RegionSessions owns the probe markers: admitted
intentions schedule them, each poll advances them to the simulated tick, and
snapshots carry them. evo-server sets the motion area from the region's
habitat sites; the probe prints its own marker.

The engineering client predicts its marker with the adaptive input lead,
rebases on each snapshot, resends a lost or refused intention, smooths
corrections, draws markers and follows its own with camera and interest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-06 16:07:34 -04:00
co-authored by Claude Opus 5.5
parent ab7e26c02e
commit 96237ca10a
17 changed files with 334 additions and 27 deletions
+15 -3
View File
@@ -108,6 +108,9 @@ struct Region {
CHECK(made.has_value());
sessions = std::move(*made);
sessions->set_default_interest({3, 3, -7, 7});
// Probe markers (ADR-0094) over the slice's cells, spawning in the middle of (3, 3).
CHECK(sessions->set_motion_area({-10'000'000, -10'000'000, 10'999'999, 10'999'999, -7},
3'500'000, 3'500'000));
}
WireGrant grant(const AccountId& who, std::uint64_t serial,
std::uint64_t in_region = region) const {
@@ -203,12 +206,16 @@ void views_interest_and_intentions(Region& r) {
return e.voxel.x >= -4 && e.voxel.x <= 10 && e.voxel.y >= -4 && e.voxel.y <= 10;
}));
CHECK(s.environment().freshness() == client::Freshness::current);
// The camera follows the view: the middle of its square, offered once per change.
// The session's probe marker, predicted at its spawn; the camera follows it, and so does
// the interest (its cell is the default's centre: the same view).
CHECK(c.until(r, [&] { return s.status().marker; }, 20));
CHECK(s.markers().size() == 1 && s.markers()[0].own && s.status().marker_x_mm == 3500);
const auto centre = s.take_recentre().value_or(client::WorldPoint{-1, -1});
CHECK(centre.x_mm == 3500 && centre.y_mm == 3500 && !s.take_recentre());
s.focus(centre); // Where the view put it: still following, no interest sent.
s.focus(centre); // Where the session put it: still following.
static_cast<void>(c.until(r, [] { return false; }, 20, std::chrono::milliseconds{300}));
CHECK(!s.status().focused && c.cells() == 225); // 300 ms of ticks: the same view.
CHECK(s.status().focused && s.status().focus_x == 3 && s.status().focus_y == 3 &&
c.cells() == 225); // 300 ms of ticks: the same view.
// The user moves the camera: its centre's voxel becomes the interest (clipped).
s.focus({-5500, -5200});
CHECK(c.until(r, [&] { return c.cells() == 144; }, 20)); // x, y in -10..1.
@@ -221,6 +228,11 @@ void views_interest_and_intentions(Region& r) {
CHECK(c.until(r, [&] { return c.has(OutcomeState::simulated); }, 20));
const auto& first = s.outcomes().entries().front();
CHECK(first.sequence == 1 && first.tick != 0 && s.status().simulated_tick >= first.tick);
// The marker moves +x at 70 mm per tick, predicted ahead of the authority, and the
// authority confirms the prediction (loopback: no correction needed).
CHECK(c.until(r, [&] { return s.status().marker_x_mm > 4000; }, 20));
CHECK(s.status().marker_y_mm == 3500 && s.status().max_error_um == 0 &&
s.status().inputs_pending == 0);
// A new epoch closes the session: the open intention is unknown, the views are stale,
// and the session reconnects with the bundle's next grant after its pause.
const auto old_session = s.status().session;