From ce47af6f0db279db640e5fe6ee71111a54ac11e8 Mon Sep 17 00:00:00 2001 From: Said Turksever Date: Thu, 29 Oct 2026 14:33:17 +0000 Subject: [PATCH] Restore the Snow retirement in tests the main merge overwrote The merge from main kept this branch's side of four conflicts, which dropped the Snow PR's changes: tests expected Snow again, the share-link table lost its retired mark, and the voice pins lost the Snow restore. Keep both retirements, and re-derive the full-payload digest for both enum removals. --- docs/SHARE-LINK-FORMAT.md | 58 ++++++++++++++++---------------- src/share/viewCodec.test.mjs | 3 +- src/ui/cyberTheme.test.mjs | 14 ++++---- src/voice/actionSchemas.test.mjs | 15 ++++++++- 4 files changed, 52 insertions(+), 38 deletions(-) diff --git a/docs/SHARE-LINK-FORMAT.md b/docs/SHARE-LINK-FORMAT.md index 510e71508..5728d1ec3 100644 --- a/docs/SHARE-LINK-FORMAT.md +++ b/docs/SHARE-LINK-FORMAT.md @@ -90,35 +90,35 @@ probability of about 255 in 256 (many of them already fail as base64url). ## Field registry (top level) -| # | State key | Type | Default | Encoding | -| --- | ---------------------------- | ----- | ----------- | ------------------------------------------------------- | -| 1 | `view.kind` | enum | see below | 0 place, 1 thing | -| 2 | `lat` | coord | 0 | zigzag of degrees × 10⁴ | -| 3 | `lon` | coord | 0 | zigzag of degrees × 10⁴ | -| 4 | `alt` | sint | 800 | whole metres | -| 5 | `heading` | angle | 0 | whole degrees, see angles | -| 6 | `pitch` | sint | −35 | whole degrees | -| 7 | `roll` | angle | 0 | whole degrees | -| 8 | `sharedAtMs` | epoch | none | zigzag seconds since 2026-01-01T00:00:00Z | -| 9 | booleans | flags | 0 | bit set when the value differs from default | -| 10 | `layerState.enabledLayerIds` | LEN | none | layer bitset, see layers | -| 11 | `layerState.options` | LEN | none | packed option triples, see layers | -| 12 | `panelState` | LEN | none | packed panel entries, see panels | -| 13 | thing | LEN | none | sub-message, see thing views | -| 14 | `style` | enum | `normal` | normal, retro, surveillance, thermal, anime, noir, snow | -| 15 | `mapStack` | enum | `photoreal` | photoreal, bing-aerial, bing-labels, esri-imagery, osm | -| 16 | `hudVariant` | enum | style | tactical, operator (retired), minimal, cyber | -| 17 | `bloomIntensity` | uint | style | | -| 18 | `bloomVersion` | uint | 2 | | -| 19 | `sharpenIntensity` | uint | style | | -| 20 | `detectionMode` | enum | style | OFF, SPARSE, BALANCED, DENSE | -| 21 | `detectionDensity` | uint | style | one of 0, 25, 50, 75, 100 | -| 22 | `detectionAllocation` | enum | style | ELASTIC, WEIGHTED | -| 23 | `detectionFadePct` | uint | style | 0–40 | -| 24 | `detectionOutsideOpacityPct` | uint | style | 0–100 | -| 25 | `scopeFeatherPct` | uint | 100 | 0–200 | -| 26 | `scopeTerminusPct` | uint | none | 94–100; absent is the adaptive terminus | -| 27 | `styleParams` | LEN | style | packed `(token, value × 100)` pairs | +| # | State key | Type | Default | Encoding | +| --- | ---------------------------- | ----- | ----------- | ----------------------------------------------------------------- | +| 1 | `view.kind` | enum | see below | 0 place, 1 thing | +| 2 | `lat` | coord | 0 | zigzag of degrees × 10⁴ | +| 3 | `lon` | coord | 0 | zigzag of degrees × 10⁴ | +| 4 | `alt` | sint | 800 | whole metres | +| 5 | `heading` | angle | 0 | whole degrees, see angles | +| 6 | `pitch` | sint | −35 | whole degrees | +| 7 | `roll` | angle | 0 | whole degrees | +| 8 | `sharedAtMs` | epoch | none | zigzag seconds since 2026-01-01T00:00:00Z | +| 9 | booleans | flags | 0 | bit set when the value differs from default | +| 10 | `layerState.enabledLayerIds` | LEN | none | layer bitset, see layers | +| 11 | `layerState.options` | LEN | none | packed option triples, see layers | +| 12 | `panelState` | LEN | none | packed panel entries, see panels | +| 13 | thing | LEN | none | sub-message, see thing views | +| 14 | `style` | enum | `normal` | normal, retro, surveillance, thermal, anime, noir, snow (retired) | +| 15 | `mapStack` | enum | `photoreal` | photoreal, bing-aerial, bing-labels, esri-imagery, osm | +| 16 | `hudVariant` | enum | style | tactical, operator (retired), minimal, cyber | +| 17 | `bloomIntensity` | uint | style | | +| 18 | `bloomVersion` | uint | 2 | | +| 19 | `sharpenIntensity` | uint | style | | +| 20 | `detectionMode` | enum | style | OFF, SPARSE, BALANCED, DENSE | +| 21 | `detectionDensity` | uint | style | one of 0, 25, 50, 75, 100 | +| 22 | `detectionAllocation` | enum | style | ELASTIC, WEIGHTED | +| 23 | `detectionFadePct` | uint | style | 0–40 | +| 24 | `detectionOutsideOpacityPct` | uint | style | 0–100 | +| 25 | `scopeFeatherPct` | uint | 100 | 0–200 | +| 26 | `scopeTerminusPct` | uint | none | 94–100; absent is the adaptive terminus | +| 27 | `styleParams` | LEN | style | packed `(token, value × 100)` pairs | Field 1 absent means `thing` when field 13 is present and `place` otherwise, so v1 never writes it; a later view kind writes its code. diff --git a/src/share/viewCodec.test.mjs b/src/share/viewCodec.test.mjs index e2b298fbd..6cc6fd9b1 100644 --- a/src/share/viewCodec.test.mjs +++ b/src/share/viewCodec.test.mjs @@ -450,7 +450,8 @@ test('defaults travel as frozen meanings that match today’s app defaults', () SHARE_VIEW_ENUMS.hudVariant.filter((variant) => variant !== 'operator'), [...HUD_LAYOUTS], ); - assert.deepEqual(SHARE_VIEW_ENUMS.style, [...VIEW_STYLES]); + // Snow is retired; its code stays reserved (see the retired-style test). + assert.deepEqual(SHARE_VIEW_ENUMS.style, [...VIEW_STYLES, 'snow']); assert.deepEqual(SHARE_VIEW_ENUMS.mapStack, [...VIEW_MAPS]); assert.deepEqual(SHARE_VIEW_ENUMS.detectionAllocation, [ ...ALLOCATION_STRATEGIES, diff --git a/src/ui/cyberTheme.test.mjs b/src/ui/cyberTheme.test.mjs index 733064e2d..ec9795046 100644 --- a/src/ui/cyberTheme.test.mjs +++ b/src/ui/cyberTheme.test.mjs @@ -172,7 +172,7 @@ test('a preset explicitly selected in Cyber survives exit and resets for re-entr assert.equal(owner._preCyberStyle, 'noir'); owner._setHudVariant('minimal', { applyVisualDefaults: true }); assert.equal(hud.getVariant(), 'minimal'); - assert.equal(owner.activeStyle, 'snow'); + assert.equal(owner.activeStyle, 'anime'); assert.equal(owner._preCyberStyle, null); assert.equal(owner._cyberStyleUserSelected, false); @@ -208,7 +208,7 @@ test('an authoritative same-Cyber reset clears local preset ownership', (t) => { assert.equal(owner._preCyberStyle, null); assert.equal(owner._cyberStyleUserSelected, false); owner._setHudVariant('minimal', { applyVisualDefaults: true }); - assert.equal(owner.activeStyle, 'snow'); + assert.equal(owner.activeStyle, 'anime'); }); test('Display and voice HUD routes preserve explicit Cyber entry and exit authority', async (t) => { @@ -239,12 +239,12 @@ test('Display and voice HUD routes preserve explicit Cyber entry and exit author hudLayout.dispatchEvent(new Event('change')); assert.equal(display.hud.getVariant(), 'cyber'); assert.equal(display.owner.activeStyle, 'thermal'); - snowButton.dispatchEvent(new Event('click')); - assert.equal(display.owner.activeStyle, 'snow'); + animeButton.dispatchEvent(new Event('click')); + assert.equal(display.owner.activeStyle, 'anime'); hudLayout.value = 'minimal'; hudLayout.dispatchEvent(new Event('change')); assert.equal(display.hud.getVariant(), 'minimal'); - assert.equal(display.owner.activeStyle, 'snow'); + assert.equal(display.owner.activeStyle, 'anime'); controls.destroy(); const voice = makeOwner(); @@ -265,11 +265,11 @@ test('Display and voice HUD routes preserve explicit Cyber entry and exit author assert.equal(voice.owner.activeStyle, 'thermal'); const selected = await runVoiceAction('set_visual_style', { style: 'anime' }); assert.equal(selected.ok, true); - assert.equal(voice.owner.activeStyle, 'snow'); + assert.equal(voice.owner.activeStyle, 'anime'); const exited = await runVoiceAction('set_hud', { layout: 'minimal' }); assert.equal(exited.ok, true); assert.equal(voice.hud.getVariant(), 'minimal'); - assert.equal(voice.owner.activeStyle, 'snow'); + assert.equal(voice.owner.activeStyle, 'anime'); }); test('scope choice and expanded feather survive every HUD layout and both restore paths', async (t) => { diff --git a/src/voice/actionSchemas.test.mjs b/src/voice/actionSchemas.test.mjs index e08505146..4e6586729 100644 --- a/src/voice/actionSchemas.test.mjs +++ b/src/voice/actionSchemas.test.mjs @@ -45,8 +45,9 @@ test('the complete Realtime tool payload pins the manifest-generated layer relea // S2 GhostMaps extends the generated layer enums. // Panel adds named voice targets and timeout; shared Panel/Cockpit guidance // is consolidated without changing either feature's arguments. + // Snow leaves the set_visual_style enum. // The Operator HUD layout leaves set_hud's layout enum. - '8c3c26336e4820b4b0828ab2bedf70050eca91ea3b0517a62cd8b69ea4fefc92', + 'f47a7f78f13b1f79978fa524fad2618e32bd813e1a5dfd746bf35d29909fc91b', ); }); @@ -171,6 +172,18 @@ test('all legacy action arguments are byte-identical after removing the delibera const hud = property('set_hud').layout; assert.deepEqual(hud.enum, ['tactical', 'minimal', 'cyber']); hud.enum = ['tactical', 'operator', 'minimal']; + // Snow is retired from set_visual_style; restore it to keep the legacy pin. + const visualStyle = legacy.find((tool) => tool.name === 'set_visual_style') + .parameters.properties.style; + assert.deepEqual(visualStyle.enum, [ + 'normal', + 'retro', + 'surveillance', + 'thermal', + 'anime', + 'noir', + ]); + visualStyle.enum = [...visualStyle.enum, 'snow']; // Derived by applying the same removals to the 4b56d0e9 actionSchemas. assert.equal( createHash('sha256').update(JSON.stringify(legacy)).digest('hex'),