fix(06-08): the pump's accepted fixes ride the chain's surfaces — puck + freshness (G7c)

- during guidance the pump consumed fixes without refreshing the chain's
  surfaces: the puck froze at the boot fix while the camera rode the
  snapped line (the UI-SPEC's recorded call: 'the puck ... carr[ies]
  progress'), and lastFix stayed at boot so the strip's 45s staleness
  law falsely flipped SIGNAL LOST mid-drive and re-ran the chain
- one injected dep (updatePuck) composes both in main.ts: lastFix = fix,
  marker.update (the RAW fix — the camera rides the SNAPPED foot, the
  two-authorities-one-line law), marker.setStale(false); the camera is
  NOT touched (the guidance camera owns the viewport — the guard
  handleLive already keeps)
- G7c pins the dep call per accepted fix + the main.ts source-scan for
  the marker composition (the RS2 boot-wiring shape)
- found while building the real-drive gate: any drive past 45s would
  have hit both defects on the road
- web 148/148, typecheck clean; captures regenerated 20/20
This commit is contained in:
araharah-executor
2026-10-24 21:37:22 +08:00
parent ed86196f60
commit b83a88e00d
3 changed files with 49 additions and 0 deletions
+12
View File
@@ -450,6 +450,18 @@ async function boot(): Promise<void> {
onGuidanceChange: () => {
if (backSync !== null) backSync(); // confirm open/close + activation/teardown re-apply the graph
},
// 06-08 G7c: the pump's fixes ride the chain's surfaces — the puck moves
// (the UI-SPEC's recorded call: the puck carries progress) and the
// chain's freshness axis stays live (a drive past 45s never flips
// SIGNAL LOST while fixes flow). The camera is NOT touched here: the
// guidance camera owns the viewport (the same guard handleLive keeps).
updatePuck: (fix) => {
lastFix = fix;
if (map !== null) {
marker.update(map, fix);
marker.setStale(false);
}
},
fetchImpl: fetch.bind(globalThis),
bearer: getSession,
});
+7
View File
@@ -136,6 +136,12 @@ export interface RouteControllerDeps {
findGantry?: (banner: HTMLElement) => HTMLElement | null;
/** Fired on guidance phase transitions — main.ts re-syncs the BackButton. */
onGuidanceChange?: () => void;
/** The pump's per-fix chain-surface dep (06-08 G7c): every ACCEPTED fix
* moves the puck (the raw fix — the camera rides the snapped foot) and
* refreshes the chain's freshness axis (the strip's staleness law reads
* the LAST fix; a drive past 45s must never flip SIGNAL LOST while
* fixes flow). Composed in main.ts: marker.update + setStale(false). */
updatePuck?: (fix: Fix) => void;
/** Injectable fetch (the envelope POST/DELETE — tests pass a stub). */
fetchImpl?: typeof fetch;
/** The memory-held session token getter (the Bearer header). */
@@ -284,6 +290,7 @@ export function createRouteController(deps: RouteControllerDeps): {
* gate decides when the cockpit mounts. */
function onWatchFix(fix: Fix): void {
if (state !== "route") return; // PX-03's precondition: never without a route
if (deps.updatePuck !== undefined) deps.updatePuck(fix); // the puck + the chain's freshness ride every accepted fix (G7c)
if (guidance === null) {
const model = selectedModel();
if (model === null) return;