Sky menu fixes: one owner of the drawn place, Night is tonight's, named moments roll
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 3m32s
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 3m32s
- skyPlace.ts is the only writer of the sky's place: the manifest's when the cards load, FALLBACK_VIEW's when the manifest or cards fail; the scene draws the view it told the store, so sky, weather, ink and Auto agree on every drawn state (Auto ticks on the fallback). - useSkyPlace removed: only a scene start fetches the manifest. - Old-key migration writes the new key first; a refused write keeps the pick for the page load. - A named moment re-resolves when the place-local day rolls over (the one timer); Night is the nearest solar midnight (before the day's noon the one just passed or coming), keyed by the instant drawn. - Baker validate/schema check place.tz as load_preset does; Vienna manifest baker_version 3 (it carries tz). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
3269250d19
commit
cd81f85d05
14 changed files with 263 additions and 69 deletions
|
|
@ -189,6 +189,9 @@ def test_manifest_v2_writer():
|
|||
assert m['cards'][0]['near_m'] is None and m['cards'][-1]['far_m'] is None and m['cards'][0]['far_m'] == m['cards'][1]['near_m'] and m['cards'][0]['median_m'] < m['cards'][1]['median_m'] < m['cards'][2]['median_m']
|
||||
for c in m['cards']:
|
||||
for kind in ('colour', 'geometry'): f = a / c[kind]['file']; assert f.stat().st_size == c[kind]['bytes'] and export.decode(f.read_bytes()).shape[:2] == (c['h'], WIN), c
|
||||
bad = json.loads(json.dumps(m)); bad['place']['tz'] = 'Mars/Olympus'
|
||||
try: export.validate(bad, export.SCHEMA['$defs']['manifest']); raise AssertionError('a zone the system does not know validated')
|
||||
except ValueError as e: assert 'time zone' in str(e), e
|
||||
assert m['bytes'] == sum(c[k]['bytes'] for c in m['cards'] for k in ('colour', 'geometry')) and m['encoding']['normal'] == 'rt8' and m['curvature'] == dict(r_earth_m=ridge.R_EARTH, k_ref=ridge.KREF)
|
||||
idx = json.load(open(d + '/a/index.json')); export.validate(idx, export.SCHEMA['$defs']['index']); assert idx == dict(schema=1, default='synthetic', places={'synthetic': a.name})
|
||||
pk3 = [dict(c) for c in pk]; pk3[1]['geometry'] = pk3[1]['geometry'] + b'x'; assert export.bake_id([(c['colour'], c['geometry']) for c in pk3]) != export.bake_id([(c['colour'], c['geometry']) for c in pk]), 'a changed byte kept the bake_id'
|
||||
|
|
|
|||
Loading…
Reference in a new issue