Fix inventory layout integration and qualify ordinary UI and radio guidance
This commit is contained in:
+25
-2
@@ -751,10 +751,33 @@ def input_observer_evidence(content, nonce):
|
||||
if closes and (not opens or records.index(closes[0]) <= records.index(opens[0])):
|
||||
errors.append('inventory close lacks prior observed open')
|
||||
captures = matching('CAPTURE_REQUEST')
|
||||
for suffix, transition in [('baseline', ready), ('open', opens), ('closed', closes)]:
|
||||
for suffix, transition, following in [('baseline', ready, opens), ('open', opens, closes), ('closed', closes, finished)]:
|
||||
requested = [r for r in captures if r['event'] == 'CAPTURE_REQUEST '+suffix]
|
||||
if len(requested) > 1 or (requested and (not transition or records.index(requested[0]) <= records.index(transition[0]) or requested[0]['sample'] != transition[0]['sample'])):
|
||||
if len(requested) > 1 or (requested and len(transition) != 1):
|
||||
errors.append('capture request lacks its unique transition')
|
||||
continue
|
||||
if not requested:
|
||||
continue # superseded/invalid pending captures are legitimately skipped
|
||||
capture, begin = requested[0], transition[0]
|
||||
capture_index, begin_index = records.index(capture), records.index(begin)
|
||||
current = by_index.get(capture['sample'])
|
||||
if (capture_index <= begin_index or capture['real_ms']-begin['real_ms'] < 300 or
|
||||
not current or current['inventory'] is not (suffix == 'open')):
|
||||
errors.append('delayed capture lacks matching native state and minimum delay')
|
||||
if following and capture_index >= records.index(following[0]):
|
||||
errors.append('delayed capture crossed its transition interval')
|
||||
if queued and not 0 <= capture['real_ms']-queued[0]['real_ms'] < 45000:
|
||||
errors.append('delayed capture outside observation window')
|
||||
interval = [sample for sample in samples if begin['sample'] <= sample['sample'] <= capture['sample']]
|
||||
if any(sample['inventory'] is not (suffix == 'open') for sample in interval):
|
||||
errors.append('delayed capture native inventory state changed')
|
||||
if suffix == 'baseline':
|
||||
baseline = by_index.get(begin['sample'])
|
||||
if not baseline or any(abs(sample['forward']) > .01 or
|
||||
math.sqrt(sum(value*value for value in sample['input'])) > .01 or
|
||||
math.sqrt(sum(value*value for value in sample['velocity'])) > .05 or
|
||||
math.dist(sample['origin'], baseline['origin']) > .05 for sample in interval):
|
||||
errors.append('delayed baseline capture lost stationary state')
|
||||
# Native movement proof belongs to the observer, independently of whether
|
||||
# an external helper claims to have sent keys. Restrict it to READY→open.
|
||||
movement = {'action_observed': False, 'physical_motion_observed': False,
|
||||
|
||||
Reference in New Issue
Block a user