Skip to content
This repository was archived by the owner on Oct 23, 2026. It is now read-only.

Slice 2: coverage window follows the rider on a triangle-only floor contract (#77) - #84

Merged
Jpatching merged 3 commits into
mainfrom
slice-2-moving-window
Oct 22, 2026
Merged

Jpatching merged 3 commits into
mainfrom
slice-2-moving-window

Conversation

@Jpatching

Copy link
Copy Markdown
Owner

Summary

 mount
   sample coverage window (2 m fixed cells)
-  install flat patch | triangles
+  Surface::install(triangles) -> installed | refused(reason)
 riding
+  rider leaves centre cell -> resample -> SURFACE_REPLACE (new revision, no remount)
+  coverage gap mid-ride -> dismount with stated reason
   floor agreement at 0.3 m wall threshold

Wire format v4. The flat-patch path and its natives are removed. The native fault check now injects a 0.31 m mismatch, so it is above the 0.3 m threshold.

Evidence

  • Before: main (Slice 1: Mount on a sampled slope through a Coverage window module #76) installs one window at mount and never moves it.
  • After: python3 scripts/verify.py passes: JS, Rust and C++ suites (coverage-window.cjs, tests/connection.rs, tests/wire.rs, native-surface.cpp), ending "PASS: repository gate".
  • Not covered: this works in tests only. A windowed ride in game has never been seen, because GTA IV is not installed right now. ADR 0004 stays proposed.

Merge Danger

Door: two-way

Reverting restores the v3 wire format and the flat-patch path.

Blast Radius: adapter

Worker and plugin must be rebuilt together, because the wire version changed.

Closes #77

🤖 Generated with Claude Code

Jpatching and others added 3 commits October 19, 2026 00:41
Prefactor for the moving coverage window. connection.rs now has one entry
point, Surface::install: install these triangles for this rider, or refuse
with a reason. Mount and replace in the in-process backend, the worker
parent and the worker child all call it; the refresh_basis ->
query_matches_pose -> observation -> finish_at -> contains_pose ->
triangles -> build -> install chain is gone from callers.

The flat path is deleted end to end: Surface::new, points, contains, the
flat observation/triangle branches and is_geometry in Rust; the
COMBINE_SKATE_VERTEX/MOUNT/TICK natives in plugin.cpp and
prepare_definitions.py; Request.points and the layer == 0 rules in the
wire (version 4, 96-byte request).

Thresholds are defined once in connection.rs: floor agreement (0.3 m),
query agreement and same floor (0.001 m), pose height (3 m), 4096
triangles, minimum area and coordinate bounds. The wire takes its
triangle limit from there.

Floor agreement now applies only while Skate reports ground contact
(any physical state but the air states); the worker reports it in the
response's spare word and the adapters expose it as value 4. Each
installed floor carries a revision (mount 1, +1 per replacement).

The 1000 m bound now limits one upload's reach from the rider. The Skate
frame stays at the mount origin, since Session cannot move the skater
without resetting its bodies, bounded at 8192 m where f32 still
resolves a millimetre; a 1500 m ride is tested to round-trip within
1 mm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Riding continues past the first window. combine_skate.js centres every
window on a fixed 2 m world-cell lattice; crossing out of the centre cell
resamples through the Coverage window module (sampleWindow, shared with
mount) and installs through SURFACE_REPLACE as a new revision, logged as
coverage-installed:N, with no remount. Neighbouring windows share lattice
samples, so a swap leaves the floor under the rider unchanged.

Floor agreement is checked only while Skate reports ground contact
(VALUE(4) is not 0); an airborne frame is not refused. A coverage gap
reached mid-ride (wall-height step, unloaded or missing ground) dismounts
with "coverage gap (...)" through the existing restore path. "Window edge"
is no longer a reason; leaving coverage is "outside supplied floor
coverage".

The JS floor rules live in one FLOOR constant set; the Rust contract
defines each again and decides.

Tests: sampled slope crossing cells 51 and 52 installs revisions 2 and 3
on the lattice without dismounting; a wall and unloaded ground 5 m ahead
dismount with their gap reasons and restore GTA; an airborne skater over
a planter keeps riding; neighbouring lattice windows agree everywhere they
overlap on curved ground.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-up. native-surface.cpp injected a 0.06 m ground
disagreement and expected refusal; floor agreement is 0.3 m, so the
Windows harness would have failed. It now injects 0.31 m, and the README
matches. The coverage window names its wall threshold again (equal to
FLOOR.agreement, ADR 0004), and Response::read decodes ground contact
once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jpatching
Jpatching merged commit 7e691ca into main Oct 22, 2026
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slice 2: Coverage window follows the rider on a triangle-only floor contract

1 participant