Integrate exact user-authorized correct03 720 debug assets with isolated admission

This commit is contained in:
zenord
2026-10-13 20:53:23 +08:00
parent c3fe22b8bf
commit e4e063baa3
23 changed files with 485 additions and 28 deletions
+4 -1
View File
@@ -35,9 +35,11 @@ parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--suite', choices=[name for name, _, _ in suites])
parser.add_argument('--runtime-manifest',type=Path,help='Additionally exercise real continuous parser with actual offline manifest metadata')
parser.add_argument('--index-manifest',type=Path,help='Additionally admit an exact offline v2 index and each referenced runtime through production parsers; no activation')
parser.add_argument('--user-authorized-debug-sha',help='Explicit exact user-authorized parent index for debug candidate admission; not Pi publication or network actions')
parser.add_argument('--metadata-only',action='store_true',help='Only the actual manifest admission, without repeating fixtures')
parser.add_argument('--rejection-report',type=Path,help='New bounded structural field report; no raw values')
args = parser.parse_args()
if args.user_authorized_debug_sha and (not args.index_manifest or args.user_authorized_debug_sha!='208f703ed92bf795bfeb78a1cef89b67bed2e45da80038a56157fd1ecd4cfa93'): parser.error('Exact authorized correct03 index required')
if args.index_manifest and args.runtime_manifest: parser.error('Choose runtime or index manifest, not both')
if args.metadata_only and not (args.index_manifest or args.runtime_manifest): parser.error('Actual manifest required')
if args.rejection_report and (not args.index_manifest or args.rejection_report.exists()): parser.error('Index and new rejection report required')
@@ -79,6 +81,7 @@ for name, main, real in suites:
else:
index_path=args.index_manifest.resolve(strict=True)
raw=index_path.read_bytes();digest=hashlib.sha256(raw).hexdigest()
if args.user_authorized_debug_sha and digest!=args.user_authorized_debug_sha: raise ValueError('User authorized index drift')
data=json.loads(raw);runtimes={};hashes={}
references=[row['runtimeManifest'] for row in data['conversationPackages']]
references += [edge['mouthRuntimeManifest'] for edge in data['edges'] if 'mouthRuntimeManifest' in edge]
@@ -95,7 +98,7 @@ for name, main, real in suites:
'fun main() {\nval root='+index_literal+'\nval runtimes='+runtime_literal+'\nval hashes='+hash_literal+'\n'+
'val parsed=runtimes.mapValues { (path,value) ->\nval hash=hashes.getValue(path) as String\n'+
'@Suppress("UNCHECKED_CAST")\nContinuousAvatarManifest.read(value as Map<String,Any?>,hash,hash,true,"fixture/"+path.substringBeforeLast(47.toChar())+"/",'+
'onReject={ field -> println("REJECT_FIELD|"+path+"|"+field) })\n}\n'+
'onReject={ field -> println("REJECT_FIELD|"+path+"|"+field) },userAuthorizedDebug='+str(bool(args.user_authorized_debug_sha)).lower()+')\n}\n'+
'val index=checkNotNull(EmotionActionManifest.read(root,"'+digest+'","'+digest+'","fixture/",'+
'onReject={ field -> println("REJECT_FIELD|manifest.json|"+field) }) { path,hash ->\n'+
'check(hashes[path]==hash)\nparsed[path]\n})\n'+