Record guarded Runtime-preview test failure and same-task repair

This commit is contained in:
Takeshi
2026-10-14 18:00:35 +09:00
parent ed3ee23709
commit fc5c9b2a56
6 changed files with 150 additions and 5 deletions
@@ -20,7 +20,7 @@
"denominator_units": 88,
"completed_delta": 0,
"formal_validator": "7e2368f5 only historical after changed Main/checker; current 4775001 not accepted",
"next_action": "Actual recorded Opus RUN dispatched; one 6.1-sol supporting implementer; Root targeted native work starts only on submitted frozen source",
"next_action": "One actual 6.1-sol worker fixes test initialization; preserve Runtime refactor and original P08 submitted 4775001",
"semantic_triage": "OPUS_PRE_FULL_SEMANTIC_TRIAGE_7E2368F5.json (read-only, no acceptance)",
"capacity": "cleanup complete: 7.94GB free; 580 closed stages archived losslessly; current R09 retained; no cleanup permission pending",
"implemented_not_accepted": [
@@ -30,10 +30,14 @@
"support_task": {
"id": "P08-03-RTPREVIEW",
"project": "the-tree-p08-runtime-preview",
"state": "implementing",
"state": "implementing test-only repair1",
"base": "d4747dd7e12e8fd19e404ad444bdc1e56d03f088",
"counting_scope": "zero additional original units",
"reuse": "4775001 unapplied Runtime/test proposal, reviewed by actual Opus",
"actual_pid_at_start": 9155
"actual_pid_at_start": 9155,
"submitted": "78dc82da077dabbdb92ebcf475cd81c5d619bcf6",
"repairs": 1,
"native_result": "import/parse passed; first targeted suite failed eager autoload reference; owned engine ended and source/default guards preserved",
"next": "test initialization repair then exact target/impact validation"
}
}
@@ -0,0 +1,7 @@
{
"action": "request-repair",
"task_id": "P08-03-RTPREVIEW",
"reason": "Same-task repair (repairs: 0, max_repair_attempts: null). I confirmed the Root failure against the frozen source. tests/transport/test_runtime_build_preview.gd:11 declares `class GatedRuntime extends SimulationRuntimeService` at parse time, and line 6 types `var _runtime: GatedRuntime` the same way. That resolves autoload/simulation_runtime.gd, and its GameClock reference at line 201, before the autoload exists. The script then fails to compile, the runtime becomes an invalid Node and the test idles. Every other runtime test (tests/s3/test_runtime_actor_cycle.gd:34-36, tests/s5/test_runtime_authority_cycle.gd:31-33, tests/fixtures/p08-02/mixed_world.gd:179-180) avoids this by calling load(\"res://autoload/simulation_runtime.gd\").new() inside the deferred _run.\n\nRepair scope, limited to tests/transport/test_runtime_build_preview.gd (keep its .uid valid and unchanged):\n(1) Remove the eager inner class and the typed GatedRuntime/SimulationRuntimeService variable annotations; type them as Variant/Node instead.\n(2) Inside the deferred _run, after loading game_clock/game_state, build the diagnostic subclass. Use a GDScript.new() whose source_code is `extends \"res://autoload/simulation_runtime.gd\"` plus the same gate override, call reload(), check that reload returned OK, then call .new(). Load the base script the same delayed way. Do not change what the gate override does.\n(3) Add a test guard. If reload fails, the instance is null, or the instance lacks initialize, create_snapshot or enable_production_operations, print the error and call quit(1) at once. The same applies to any assertion failure, so the test exits non-zero instead of idling.\n(4) Keep the real operations gate, the real elevator, and every original case, typed-snapshot, command-log, event-count, precedence and negative assertion.\n(5) Optionally print one passive JSON diagnostic line to stdout for each preview. It may contain the binary snapshot SHA via HashingContext and the command-log SHA, count and event count before and after. It must not contain copied snapshots and adds no acceptance.\n\nDo not change autoload/simulation_runtime.gd; keep the submitted Runtime refactor exactly as it is. No product, rule, code or message changes, and no invented rules. The worker does static diff review only, with no Godot, native or full runs. Root then reruns the affected target first, then the other planned impacts, and not the full suite yet. Independent Opus review and integration are still required.",
"codex_model": "gpt-6.1-sol",
"codex_model_reason": "This is a narrow mechanical repair in one test file. It moves the subclass definition to a delayed, reload-checked GDScript, which follows the existing delayed-load pattern in sibling runtime tests, and it adds a fail-fast quit guard. The repair needs no new product logic, no cross-file reasoning and no change to the runtime. That fits the default model on quality, time and usage, and nothing shows a need for Astra."
}
@@ -0,0 +1,7 @@
{
"action": "run",
"task_id": "P08-03-RTPREVIEW",
"reason": "Run the same-task repair on the preserved P08-03-RTPREVIEW task and source (submitted 78dc82d, state repair_ready, repairs counter as recorded). Do not reset counters, recreate the product refactor or expand scope. I checked the frozen source. In tests/transport/test_runtime_build_preview.gd, line 6 declares `var _runtime: GatedRuntime` and line 11 declares `class GatedRuntime extends SimulationRuntimeService`. Because both resolve at parse time, autoload/simulation_runtime.gd and its GameClock reference are resolved before the autoload exists. The script then fails to compile and the test idles. The sibling tests avoid this with load(\"res://autoload/simulation_runtime.gd\").new() inside the deferred _run: tests/s3/test_runtime_actor_cycle.gd:34-36, tests/s5/test_runtime_authority_cycle.gd:31-33 and tests/fixtures/p08-02/mixed_world.gd:179-180.\n\nWORKER DIRECTIONS. Edit only tests/transport/test_runtime_build_preview.gd. Keep tests/transport/test_runtime_build_preview.gd.uid valid and unchanged.\n(1) Remove the eager inner class GatedRuntime. Remove every GatedRuntime and SimulationRuntimeService type annotation and use Variant or Node instead.\n(2) Inside the deferred _run, load game_clock and game_state first. Then build the diagnostic subclass at runtime: create a GDScript.new() whose source_code is `extends \"res://autoload/simulation_runtime.gd\"` plus the same block_operations and block_vertical vars and the same two overrides, _operations_total_arrears and _facility_definition_is_unsupported_vertical_proxy, with identical super delegation. Call reload() and require it to return OK, then call .new(). Load the base script the same delayed way. Do not change gate semantics.\n(3) Add a fail-fast guard. If reload is not OK, the instance is null, or the instance lacks initialize, create_snapshot or enable_production_operations, print the error and call quit(1) immediately. Any assertion failure must also end in a non-zero quit, never an idle. Also check other parse-time global class_name references in this file, such as FacilityInfrastructureProjector.REASON_UNSUPPORTED_VERTICAL_TOPOLOGY at line 35. If any of them can pull in the autoload chain eagerly, resolve them through the same delayed load inside _run. Do not change the constant's value or the expected code string.\n(4) Keep the real operations gate, the real elevator, and every original case. Keep every typed-snapshot, command-log, event-count, precedence, purity and negative assertion. Do not weaken, delete or skip any of them.\n(5) Optional: print one passive JSON diagnostic line per preview. It may contain the binary snapshot SHA via HashingContext, the command-log SHA and count, and the event count before and after. It must not contain copied snapshots and does not count toward acceptance.\n\nFORBIDDEN. Do not edit autoload/simulation_runtime.gd; keep the submitted Runtime refactor exactly as it is. No product, rule, code, message or order changes. No invented rules. No edits outside this test file.\n\nThe worker does static diff review only: no Godot, native or full runs, and no commits or branch operations. It reports the diff and any context gap as blocked.\n\nAfter the new submission, Root reruns the affected target first under the guarded isolated native setup (runtime-preview-proof), then the other planned impact tests. The full regression suite is not run yet. Independent Opus review and integration are still required. Nothing here changes acceptance, budget or spec.",
"codex_model": "gpt-6.1-sol",
"codex_model_reason": "This is a narrow, mechanical repair to one test file. It moves the subclass definition into a delayed, reload-checked GDScript, following the delayed-load pattern the sibling runtime tests already use, and adds a fail-fast quit guard. It needs no new product logic, no runtime change and no cross-file reasoning. The default model covers this on quality, time and usage, and nothing here calls for Astra."
}
@@ -0,0 +1,35 @@
{
"candidate": "78dc82da077dabbdb92ebcf475cd81c5d619bcf6",
"accepted": false,
"receipt": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p08-runtime-preview-78dc82d-targeted-r01/runner-ended.json",
"phases": [
{
"phase": "import",
"test": null,
"passed": true,
"pid": 13138,
"error": null
},
{
"phase": "parse",
"test": null,
"passed": true,
"pid": 13257,
"error": null
},
{
"phase": "000",
"test": "tests/transport/test_runtime_build_preview.gd",
"passed": false,
"pid": 13292,
"error": "AssertionError: native ERROR/FAIL/ObjectDB/resource diagnostics never allowed"
}
],
"error": "eager GatedRuntime inheritance cannot resolve autoload GameClock before startup",
"root_parent_interruption_pid": 11751,
"direct_engine_signal": false,
"engine_ended": true,
"guard_errors": [],
"cleanup_errors": [],
"next": "actual Opus repair of test initialization; preserve Runtime refactor"
}
@@ -0,0 +1,90 @@
"""Root QA: four affected suites through the unchanged guarded standard phases."""
import sys
sys.dont_write_bytecode = True
import argparse, importlib.util, json, pathlib, shutil, uuid
p = argparse.ArgumentParser()
p.add_argument('--project-root', type=pathlib.Path, required=True)
p.add_argument('--output', type=pathlib.Path, required=True)
p.add_argument('--godot', required=True)
p.add_argument('--suite', action='append', choices=['tests/transport/test_runtime_build_preview.gd',
'tests/transport/test_runtime_stairs.gd', 'tests/s1/test_construction_service.gd',
'tests/ui/test_original_build_pointer.gd'])
a = p.parse_args()
root, out = a.project_root.resolve(), a.output.resolve()
spec = importlib.util.spec_from_file_location('p08_standard_root_qa', root/'tools/run_all_tests.py')
r = importlib.util.module_from_spec(spec)
spec.loader.exec_module(r)
paths = ['tests/transport/test_runtime_build_preview.gd', 'tests/transport/test_runtime_stairs.gd',
'tests/s1/test_construction_service.gd', 'tests/ui/test_original_build_pointer.gd']
if a.suite:
paths = list(a.suite)
r.require(len(paths)==len(set(paths)), 'no duplicate targeted suites')
refs = r.source_refs(root)
expected = {n: {'bytes': v['bytes'], 'sha256': v['sha256']} for n, v in refs.items()}
markers = r.module('p08_targeted_markers', root/'tools/strict_test_markers.py')
contract_path = root/'docs/plans/original-completion-2026-10-02/execution/completion_marker_contracts.json'
contracts = markers.load_contracts(contract_path)
contracts["tests/transport/test_runtime_build_preview.gd"]={"test":"tests/transport/test_runtime_build_preview.gd","template":"Runtime build preview: <checks> checks, <failures> failures","required":True,"fixed_check_count_used":False}
policy = r.read(r.SUPPORT/'suite-policy.json')
r.policy_coverage(paths, refs, policy)
for test in paths:
r.require(test in contracts, 'unchanged exact marker schema')
if test in policy['suite_policies']:
r.phase_policy(test, pathlib.Path(refs[test]['path']), policy['suite_policies'])
outer = r.module('p08_targeted_owned_outer', r.SUPPORT/'owned_outer.py')
diagnostics = r.module('p08_targeted_diagnostic_gate', r.SUPPORT/'diagnostic_gate.py')
owners = r.module('p08_targeted_ordinary_gate', r.SUPPORT/'ordinary_proof_gate.py')
audio = r.module('p08_targeted_audio_gate', r.SUPPORT/'audio_evidence_gate.py')
r.require(not outer.native.helper['live_engines'](), 'another Godot owns CPU')
r.require(shutil.disk_usage(out.parent).free >= r.MIN_SPACE, 'fresh diagnostic disk admission')
out.mkdir(exist_ok=False)
stage = out/'stage'; stage.mkdir()
(out/'bootstrap').mkdir(); (out/'starters').mkdir()
for n, pin in r.read(r.SUPPORT/'bootstrap-scripts.json').items():
data = pin['text'].encode('utf8')
import hashlib
r.require(hashlib.sha256(data).hexdigest() == pin['sha256'], 'unchanged external bootstrap')
(out/'bootstrap'/n).write_bytes(data)
for n, pin in refs.items():
target = stage/n; target.parent.mkdir(parents=True, exist_ok=True)
r.copy_source(pathlib.Path(pin['path']), target)
r.require(r.inventory(stage, stage=True) == expected, 'complete exact private source copy')
protected = r.default_player(root)
public = (stage/'project.godot').read_bytes()
parse_paths = ['res://'+n for n in sorted(refs) if n.endswith('.gd')]
r.write(out/'parse-paths.json', parse_paths)
selected = {'root_before': refs, 'map': {n:v['sha256'] for n,v in refs.items()}, 'timeout':1200}
run_id = uuid.uuid4().hex
r.write(out/'runner-input.json', {'scope':'shared Runtime targeted/impact checks only; not full regression or formal acceptance',
'run_id':run_id, 'roster':paths, 'selected_source_map':selected['map'],
'standard_runner_sha256':r.sha(root/'tools/run_all_tests.py'), 'root_harness_sha256':r.sha(__file__),
'marker_contract_sha256':r.sha(contract_path), 'engine':a.godot, 'engine_sha256':r.sha(a.godot)})
rows=[]; phases=[]; previous={}; error=None; cleanup_errors=[]; cleanup=[]
try:
for phase,test in [('import',None),('parse',None)]+[(f'{i:03d}',t)for i,t in enumerate(paths)]:
row=r.execute_phase(a.godot,stage,out,phase,test,selected,expected,previous,policy,contracts,
parse_paths,public,protected,root,outer,markers,diagnostics,owners,audio)
phases.append(row)
if test:
rows.append(row)
(out/'all-tests.json').write_text(json.dumps(rows,ensure_ascii=False,indent=2)+'\n')
print(('PASS 'if row['passed']else 'FAIL ')+test,flush=True)
r.require(row['passed'],'first strict failed targeted phase stops without retry: '+phase)
except BaseException as caught:
error=type(caught).__name__+': '+str(caught)
finally:
cleanup,cleanup_errors=outer.finish_captured(outer.OWNED)
guard_errors=[]
try:
r.require(r.source_refs(root)==refs,'whole source preserved')
r.require(r.default_player(root)==protected,'whole default player preserved')
r.require(r.inventory(stage,stage=True)==dict(expected,**previous),'whole stage/report set preserved')
except BaseException as caught:
guard_errors.append(type(caught).__name__+': '+str(caught))
ended=bool(outer.OWNED)and all(x['engine_ended']is True for x in cleanup)
passed=error is None and not cleanup_errors and not guard_errors and ended and len(rows)==len(paths)
r.write(out/'runner-ended.json',{'run_id':run_id,'passed':passed,'error':error,'guard_errors':guard_errors,
'cleanup_errors':cleanup_errors,'engine_ended':ended,'phases':phases,'formal_acceptance':False})
print(json.dumps({'passed':passed,'error':error,'guard_errors':guard_errors,'cleanup_errors':cleanup_errors}),flush=True)
sys.exit(0 if passed else 1)
@@ -9823,10 +9823,12 @@
"dependency": {
"task": "P08-03-RTPREVIEW",
"project": "the-tree-p08-runtime-preview",
"state": "implementing",
"state": "implementing test-only repair1",
"model": "gpt-6.1-sol",
"commander": "claude-opus-5-5",
"added_original_units": 0
"added_original_units": 0,
"submitted": "78dc82da077dabbdb92ebcf475cd81c5d619bcf6",
"native_targeted": "failed, preserved and engine ended; no acceptance"
},
"next": "shared Runtime precheck, existing P08 UI connection, frozen-version native and complete regression, independent review, integration",
"formal_complete": false