P18-01-CODE: 原本関係モデル・旧値保全・Runtime保存と読取経路

This commit is contained in:
Agent Control Runner
2026-10-15 20:33:19 +09:00
parent 0084760ee0
commit b7a7cc01d4
13 changed files with 2132 additions and 29 deletions
+10 -7
View File
@@ -199,6 +199,7 @@ def seal(out, refs, engine, contract_sha):
source = content_map(refs)
shared.write(out / 'receipt.json', {
'schema': 'guarded-p18-v2', 'source_map': source,
'parse_checks': len([name for name in refs if name.endswith('.gd')]),
'source_map_sha256': digest(source),
'project_settings_sha256': source['project.godot']['sha256'],
'marker_contract_sha256': contract_sha,
@@ -281,8 +282,10 @@ def verify(out, refs, markers, contracts, policy, contract_sha, parse_paths):
require(engine and shared.sha(engine) == start['engine_sha256']
== manifest['engine_sha256'] == files['engine.bin']['sha256'],
'current native engine and retained bytes pinned')
require(read('parse-paths.json') == parse_paths and len(parse_paths) == 308,
'all 308 exact source parse paths')
derived_paths = ['res://' + name for name in sorted(refs) if name.endswith('.gd')]
require(read('parse-paths.json') == parse_paths == derived_paths
and manifest['parse_checks'] == len(derived_paths),
'all exact source parse paths and receipt count')
require(end['passed'] is True and end['engine_ended'] is True and end['error'] is None
and end['cleanup_errors'] == [] and end['guard_errors'] == [],
'finished successful collection without guard/cleanup error')
@@ -463,8 +466,9 @@ def verify(out, refs, markers, contracts, policy, contract_sha, parse_paths):
else:
require(row['controlled_environment'] == {}, 'fresh import environment')
if phase == 'parse':
require(re.findall(r'(?m)^FULL_DEPENDENCY_PARSE checks=([0-9]+) failures=([0-9]+)\n', raw)
== [('308', '0')] and row['actual_parse_checks'] == 308, 'unique all-script parse marker')
require(len(re.findall(r'(?m)^FULL_DEPENDENCY_PARSE\b', raw)) == 1
and re.findall(r'(?m)^FULL_DEPENDENCY_PARSE checks=([0-9]+) failures=([0-9]+)\n', raw)
== [(str(len(parse_paths)), '0')] and row['actual_parse_checks'] == len(parse_paths), 'unique all-script parse marker')
if test:
parsed = markers.parse_raw(test, raw, contracts, source[test]['sha256'])
require(parsed['passed'] and row['completion'] == parsed
@@ -492,7 +496,7 @@ def verify(out, refs, markers, contracts, policy, contract_sha, parse_paths):
'whole raw evidence unchanged during verification')
require(content_map(shared.source_refs(shared.HERE.parent)) == source,
'whole current source unchanged during verification')
print(json.dumps({'verified': True, 'actual_suites': 7, 'parse_checks': 308,
print(json.dumps({'verified': True, 'actual_suites': 7, 'parse_checks': len(parse_paths),
'actual_checks': end['actual_all_roster_checks'], 'engines_started': 0,
'formal_acceptance': False, 'original_unit_complete': False}))
return 0
@@ -536,7 +540,6 @@ def main(argv=None):
require(contracts[test]['source_sha256_at_schema_audit'] == refs[test]['sha256'],
'new strict source-hashed marker')
parse_paths = ['res://' + name for name in sorted(refs) if name.endswith('.gd')]
require(len(parse_paths) == 308, 'exact expected parse count')
if args.prepare_only:
ancestor = out.parent
while not ancestor.exists():
@@ -545,7 +548,7 @@ def main(argv=None):
size = sum(p['bytes'] for p in refs.values())
print(json.dumps({'roster': ROSTER, 'source_files': len(refs), 'source_bytes': size,
'free_bytes': free, 'conservative_required_bytes': size + shared.MIN_SPACE,
'capacity_available': free >= size + shared.MIN_SPACE, 'parse_paths': 308,
'capacity_available': free >= size + shared.MIN_SPACE, 'parse_paths': len(parse_paths),
'future_native_phases': 9, 'actual_checks': None, 'engines': 0, 'stages': 0,
'formal_acceptance': False}))
return 0