Repository navigation
T21: pace the map and the pose by the belief commit - #164
Conversation
Add QUALIA_BELIEF_PACE_MS (default 250) to qualia-map and qualia-pose. Before a scan is integrated or a pose is published, the runner waits until the newest accepted belief commit, read from the layer slots' front-buffer timestamps, is younger than the pace window. A belief silence past QUALIA_BELIEF_PACE_MS * 8 releases the publish anyway and logs the measured lag, so navigation degrades instead of stopping. A pace of zero disables the gate. Tests: pace classification, layer-tick selection, the disabled gate and the stale release in both crates, plus two end-to-end qualia-map checks that the binary publishes when belief lags past the stale window and holds while belief is only lagging.
… pose rewrite #135 (25f2b6f) replaced runners/pose/src/main.rs wholesale, so the conflict is resolved by taking main's re-authored estimator as the base and re-applying only the pace-gate change on top of it: - DEFAULT_BELIEF_PACE_MS / BELIEF_PACE_STALE_WINDOWS, the BeliefPaceGate and its fresh/lagging/stale classification, and newest_belief_tick_ns; - the QUALIA_BELIEF_PACE_MS setting and the pre-publish wait in main, wired to main's Bootstrapped/Tracked outcomes; - the pace unit tests, plus end-to-end coverage of both the stale-release and the inside-the-window wait through the real binary. The map half merges unchanged.
Reviewed sha Build and suites (host, x86_64)
Matches the PR's numbers, stable across repeats. The e2e tests are behaviour tests: both spawn the real binary ( Falsification: real binaries against scratch SHMThrowaway probe under What this establishes on both runners, through the real binaries: a lag inside the pace window releases at once; a lag outside it holds (240 ms vs 260 ms brackets the 250 ms default); the release happens once the silence passes What I could not falsify, and the edge I did find
Clean-room
ContractOnly new interface name is Not verified hereThe aarch64/Pinkie claim. This host had no aarch64 target; I added |
Reviewed sha Measured trees: worktree Gate. None of the six reported runs is in the diff; all six files are untouched by this PR (inherited on the merged base). No byte-identical file. LF-normalised re-scan of all 121 shared paths (my own script using the gate's
Longest runs, quoted; all inherited, none authored here. The three 6-line runs in
Contract-forced, not copied: the map file's 119 distinct shared code lines are constants ( The new gate code is authored here. Whole-reference No shared prose. Normalised prose runs: 0 in all four files; the only comment lines that appear verbatim in the reference set are No mirrored test body. |
Reviewed sha Scope
Exactly the two packages the ticket names, source and tests, nothing else. Interface
Emitted lines (the question against the ticket text)The diff adds exactly two
Not verified here: the aarch64 / Pinkie build and on-board runs, which rest on the author's evidence. I did not rebuild at this head either, since correctness reproduced both suites and real-binary probes at |
What this does
Step 21 of #7.
qualia-mapandqualia-posenow hold a publish back until thebelief layers have committed recently, so a map or pose update cannot outrun
the belief it is conditioned on. The window is
QUALIA_BELIEF_PACE_MS(default
250); a layer commits by flipping its slot's write index, so thefront buffer's
timestamp_ns— already part of the shared ABI — is the newestaccepted tick. When every layer has been silent for
pace * 8, the publishergoes ahead anyway and says so:
Navigation degrades instead of stopping, which is the point of the gate.
QUALIA_BELIEF_PACE_MS=0disables it and leaves both runners behaving exactlyas they did before.
Why the pose half is re-applied, not merged
#135 (
25f2b6f) replacedrunners/pose/src/main.rswholesale with there-authored estimator. The branch was held back for exactly that reason, and
this PR merges
origin/mainwith main's file as the resolution base andre-applies only the pace gate on top of it:
DEFAULT_BELIEF_PACE_MS,BELIEF_PACE_STALE_WINDOWS,now_ns,newest_belief_tick_ns, andBeliefPaceGatewith itsfresh/lagging/stale classification;
QUALIA_BELIEF_PACE_MSsetting and the pre-publish wait inmain,wired to main's
Bootstrapped/Trackedoutcomes so nothing publisheswithout passing the gate;
git diff origin/mainis the four files below and nothing else; the posedelta against main's file is the gate and its tests.
runners/map/src/main.rs,runners/map/tests/runtime.rsrunners/pose/src/main.rs,runners/pose/tests/smoke.rsVerification
Host (x86_64,
-j 4):cargo build -p qualia-map -p qualia-poseclean.cargo test -p qualia-map: 14 unit + 4 end-to-end pass, includingpublishes_when_belief_lag_exceededandwaits_while_belief_is_inside_the_stale_window.cargo test -p qualia-pose: 25 unit + 3 end-to-end pass, including the fivepace unit tests, both pace end-to-end tests, and the accumulator tests C25 pose: reauthor internals to clear the clean-room overlap gate #135
added (
observe_tracks_curved_motion_through_anchor_intervals).300 ms old under
QUALIA_BELIEF_PACE_MS=200: the runner held the first posefor 1.31 s, then printed
qualia-pose: belief pace: stale, publishing pose at 1605 msand published —the 1.6 s stale window released it, as designed. The probe was a throwaway
and is not part of the diff.
python C:/tmp/gate.py->provenance: OK.Board (Pinkie,
jetson@192.168.55.1, aarch64,-j 2): the two packages build(
ELF 64-bit LSB pie executable, ARM aarch64) and both suites pass there —map 14 unit + 4 end-to-end, pose 25 unit + 3 end-to-end. The board has no DNS,
so the tree was shipped as a tarball and built
--offlineagainst the cachedregistry with the workspace members trimmed to
crates/types,crates/shm,runners/map,runners/pose; the board exercise is done, not pending.Closes #36