Wire production aircraft callbacks and diagnose native prison action selection

This commit is contained in:
2026-09-19 20:03:38 +02:00
parent 53eaf3894d
commit f870443b9b
58 changed files with 40247 additions and 27 deletions
+22 -6
View File
@@ -624,6 +624,8 @@ def display_probe_result(context, session):
def validate_input_observer(a):
if getattr(a, 'observe_prison_choices', False) and not getattr(a, 'observe_prison_gate', False):
refuse('Prison action choices require the existing gate observer')
if getattr(a, 'observe_prison_gate', False) and not getattr(a, 'observe_player_input', False):
refuse('Prison gate observation requires the existing input observer')
if not getattr(a, 'observe_player_input', False):
@@ -635,6 +637,8 @@ def validate_input_observer(a):
def validate_input_exercise(a):
if getattr(a, 'observe_prison_choices', False) and getattr(a, 'exercise_player_input', False) and not getattr(a, 'exercise_prison_approach', False):
refuse('Input exercise with gate choices requires explicit approach')
if getattr(a, 'exercise_prison_alignment', False) and not getattr(a, 'exercise_prison_approach', False):
refuse('Prison lock alignment requires the explicit prison approach experiment')
if getattr(a, 'approach_wide_display', False) and not getattr(a, 'exercise_prison_approach', False):
@@ -654,13 +658,15 @@ def validate_input_exercise(a):
refuse('Input exercise requires --settle >=50')
def input_observer_command(command, project, packed, nonce, look=False, gate=False):
def input_observer_command(command, project, packed, nonce, look=False, gate=False, choices=False):
if project not in {'core', 'chat'} or packed is not None:
refuse('Input observation requires loose Core or Chat')
if not re.fullmatch(r'[A-Za-z0-9]{1,32}', nonce):
refuse('Input observer nonce must contain 1..32 ASCII letters/digits')
if type(look) is not bool:
refuse('Relative look selection must be boolean')
if type(choices) is not bool or (choices and not gate):
refuse('Prison choices require explicit boolean gate observation')
if type(gate) is not bool:
refuse('Prison gate observation selection must be boolean')
if any(value.startswith(('-errOrdinaryInput', '-errOrdinaryLook', '-errOrdinaryGate')) for value in command):
@@ -670,6 +676,8 @@ def input_observer_command(command, project, packed, nonce, look=False, gate=Fal
options += ['-errOrdinaryLookObserve', nonce]
if gate:
options += ['-errOrdinaryGateObserve', nonce]
if choices:
options += ['-errOrdinaryGateChoices', nonce]
return command + options
@@ -875,10 +883,17 @@ def input_exercise_command(command, root, compat, profile, executable, run_id, h
refuse('Prison alignment requires explicit prior approach')
if type(approach) is not bool or (approach and not look):
refuse('Prison approach requires explicit relative look')
if approach:
indices = [i for i,value in enumerate(child) if value.startswith('-errOrdinaryGate')]
if len(indices) != 1 or child[indices[0]] != '-errOrdinaryGateObserve' or child[indices[0]+1:indices[0]+2] != [run_id]:
refuse('Prison approach requires its exact native gate observer nonce')
gate_tokens = [value for value in child if value.startswith('-errOrdinaryGate')]
if any(value not in {'-errOrdinaryGateObserve', '-errOrdinaryGateChoices'} for value in gate_tokens):
refuse('Unknown native gate observer option')
if approach and '-errOrdinaryGateObserve' not in gate_tokens:
refuse('Prison approach requires its exact native gate observer nonce')
if '-errOrdinaryGateChoices' in gate_tokens and not approach:
refuse('Input exercise with gate choices requires explicit approach')
for name in set(gate_tokens):
index = child.index(name)
if child.count(name) != 1 or child[index+1:index+2] != [run_id]:
refuse('Native gate observer option is repeated or has a mismatched nonce')
if type(look) is not bool:
refuse('Relative look selection must be boolean')
look_options = [i for i,value in enumerate(child) if value.startswith('-errOrdinaryLook')]
@@ -1127,7 +1142,7 @@ def run_locked(a, steam, compat, profile, packed=None):
run_id = uuid.uuid4().hex
observation_nonce = run_id if getattr(a, 'observe_player_input', False) else None
if observation_nonce:
command = input_observer_command(command, a.project, packed, observation_nonce, getattr(a, 'exercise_relative_look', False), getattr(a, 'observe_prison_gate', False))
command = input_observer_command(command, a.project, packed, observation_nonce, getattr(a, 'exercise_relative_look', False), getattr(a, 'observe_prison_gate', False), getattr(a, 'observe_prison_choices', False))
display_context = None
if getattr(a, 'inspect_headless_display', False):
command, display_context = display_probe_command(command, ROOT, compat, profile, executable, run_id, os.environ.get('DISPLAY', ''))
@@ -1300,6 +1315,7 @@ def main():
parser.add_argument('--approach-wide-display', action='store_true', help='Use a disposable 2560x720 headless viewport for the explicit approach experiment; no physical display changes')
parser.add_argument('--exercise-prison-alignment', action='store_true', help='Explicit stationary yaw-only alignment to native prison lock after verified approach; no F or gate operation')
parser.add_argument('--exercise-prison-approach', action='store_true', help='Explicit bounded relative-mouse/W approach inside prison; requires relative look and gate observer; never operates gate')
parser.add_argument('--observe-prison-choices', action='store_true', help='Read-only native selected/ordered gate action diagnostics; requires --observe-prison-gate')
parser.add_argument('--observe-prison-gate', action='store_true', help='Read-only native registered prison lock/context/progress telemetry; requires --observe-player-input')
parser.add_argument('--exercise-relative-look', action='store_true', help='Explicit tiny relative right/return mouse experiment before W/Tab; requires --exercise-player-input and native view proof')
parser.add_argument('--exercise-player-input', action='store_true', help='Explicit bounded private W/Tab keyboard experiment; requires observer, display inspection, loose Core/Chat and settle >=50')