From ecf279fa93124d5c3d6430e2aa589ec0afadf61f Mon Sep 17 00:00:00 2001 From: Frank14f <1515444314@qq.com> Date: Tue, 17 Nov 2026 14:10:08 +0800 Subject: [PATCH] Release B7 B6 dependency under Claude ruling preserving science pins --- .../acceptance.json | 21 +++++++++ .../contract.json | 37 +++++++++++++++ .../before-retire.json | 26 +++++++++++ .../stop-audit.json | 28 +++++++++++ docs/collaboration-stage-review-policy.md | 2 + docs/phase2-b76-fixed-contracts-2026-11-17.md | 4 ++ docs/phase2-live-handoff-2026-11-17.md | 10 ++++ tools/phase2_b6_released.py | 35 ++++++++++++++ tools/phase2_b76_released.py | 46 +++++++++++++++++++ tools/phase2_b7_released.py | 28 +++++++++++ 10 files changed, 237 insertions(+) create mode 100644 artifacts/phase2-b76-released-2026-11-17/acceptance.json create mode 100644 artifacts/phase2-b76-released-2026-11-17/contract.json create mode 100644 artifacts/phase2-engineering-release-2026-11-17/before-retire.json create mode 100644 artifacts/phase2-engineering-release-2026-11-17/stop-audit.json create mode 100644 tools/phase2_b6_released.py create mode 100644 tools/phase2_b76_released.py create mode 100644 tools/phase2_b7_released.py diff --git a/artifacts/phase2-b76-released-2026-11-17/acceptance.json b/artifacts/phase2-b76-released-2026-11-17/acceptance.json new file mode 100644 index 000000000..9c6d60dc3 --- /dev/null +++ b/artifacts/phase2-b76-released-2026-11-17/acceptance.json @@ -0,0 +1,21 @@ +{ + "status": "PASS", + "unix": 1794895764.510995, + "checks": [ + { + "gate": "b7", + "run_body_identical_except_removed_B1_dependency": true, + "original_science_contract_sha256": "322f85dcf8ec77c23109dbcab61082060e394c0f60953c8f75965b52505341a2", + "original_code_pins_pass": true + }, + { + "gate": "b6", + "run_body_identical_except_removed_B1_dependency": true, + "original_science_contract_sha256": "cb77a580dcf1cbc3dae12de947413e91879fa426935f8df45fee392a8876afe4", + "original_code_pins_pass": true + } + ], + "serial_command_routes_pass": true, + "real_science_executed": false, + "tests_and_engineering_overhead_within_original_setup_reserve": 60 +} diff --git a/artifacts/phase2-b76-released-2026-11-17/contract.json b/artifacts/phase2-b76-released-2026-11-17/contract.json new file mode 100644 index 000000000..2894b8325 --- /dev/null +++ b/artifacts/phase2-b76-released-2026-11-17/contract.json @@ -0,0 +1,37 @@ +{ + "approval": "1794895409.079369", + "reason": "B7/B6 depend only on frozen A/B3; release B1 prerequisite; original idle571486 retired with no children", + "source_sha256": { + "artifacts/phase2-b6-gate-2026-11-17/contract.json": "cb77a580dcf1cbc3dae12de947413e91879fa426935f8df45fee392a8876afe4", + "artifacts/phase2-b7-gate-2026-11-17/contract.json": "322f85dcf8ec77c23109dbcab61082060e394c0f60953c8f75965b52505341a2", + "artifacts/phase2-b76-released-2026-11-17/acceptance.json": "7d3cab4e470ac0521998680b5e923864d0439115cebb1109c4687ae490695a55", + "artifacts/phase2-engineering-release-2026-11-17/stop-audit.json": "40e9a027fe6b250790ff6006540c11ae92c00bcaea6168f536144143e56f2616", + "tools/phase2_b6_gate.py": "218d99b609bc71430f75ee322c4588ccf93b572bda9979f86098d11e785708e5", + "tools/phase2_b6_math.py": "dfaa5fb93c1bb940411571d05641fa2360d595c3bc13e5e22038a7faac635ad3", + "tools/phase2_b6_released.py": "3575ed07958102fc329dc1618dfcc2b14dab6aa5b670e382a17349540ce7ecd1", + "tools/phase2_b76_released.py": "9e35948bc50360f358025e636a7b8192800653ea949edc6b2cc4b7c7c7b68384", + "tools/phase2_b76_serial.py": "72c826d3ed5eb3ba4fac85b18f05679a17c6f27e3d459391e42725523e3e7af7", + "tools/phase2_b7_gate.py": "3d7c7a8b94b10aefd063e5a41154041ad8abb6d5a4a9b993653e169e6a8d1eb3", + "tools/phase2_b7_released.py": "4fe3df3d871079c1a274d174d49451f440f5eb0ab74fcd1af8757814b9e77683", + "tools/phase2_fixed_io.py": "ea17fdfc7508f3f980e3cdf69534b1eb8ceb8a8e469c32451b2d5e16d0ada575", + "tools/phase2_h1_worker_v2.py": "1543df85b615bb69b79bacd572074a7c77ae19dab110197601573a7e5805ed20", + "tools/phase2_residual_math.py": "ffbd9624dec79bdaabf95244fe87209055908f31a977e73ea4377045d6f8fe62", + "tools/r4bc_common.py": "27543fff987975ece767167f9771e6621c825035a053805604e4a696794dfcbd", + "tools/r4bc_guard.py": "437a756ddf10b125dce450f463e76e28df52724f8c5766e0a989dfa536805628", + "tools/s2_custody_common.py": "588c646101be0d50f505f9a12a1c98361aa3437c8c594eecb7321831f717a741", + "tools/s2_custody_statistics.py": "188565801f6901d0192f79aec0889e632501e672a4149d76d1835efbb9b45447", + "tools/s2_recovery_monitoring.py": "442c2a9c75e8c00b30a8f2e91cb52d87c466b19a80aea9128b10c021e61b922e", + "tools/s2_recovery_supervisor.py": "f563ca3c2665f5baf0c04f296616e4640423a59b815fbb00479af0f29e57a919" + }, + "scientific_contracts_unchanged": true, + "order": [ + "B7", + "B6" + ], + "parallel_with_existing_B1_recovery": true, + "cumulative_budget_per_gate_cpu_seconds": 7200, + "original_setup_reserve_seconds": 60, + "extra_budget": 0, + "retry": false, + "duplicate_launch": false +} diff --git a/artifacts/phase2-engineering-release-2026-11-17/before-retire.json b/artifacts/phase2-engineering-release-2026-11-17/before-retire.json new file mode 100644 index 000000000..3037d2acc --- /dev/null +++ b/artifacts/phase2-engineering-release-2026-11-17/before-retire.json @@ -0,0 +1,26 @@ +{ + "unix": 1794895667.1169431, + "approval": "1794895409.079369", + "original_already_exited_before_stop_attempt": true, + "no_signal_sent_to_original": true, + "raw_original_status": "COMPLETE", + "raw_original_reason": null, + "accounting_complete": true, + "charges": { + "geometry": 1755.625577025, + "fit": 3087.063371555, + "postfit": 8488.40306277599 + }, + "total_cpu_charge": 14903.96785419699, + "records": 1180, + "complete_sha256": "c0944424601ec10d72d024b8383379311eb565728e462eb8567caa7d8e83e40c", + "v1_incomplete_no_main_decision": true, + "old_waiter": { + "pid": 571486, + "args": [ + "/home/frank14f/optane/MeltMind/artifacts/gre24-reproduction-2026-11-15/environment/venv/bin/python", + "tools/phase2_b76_serial.py" + ], + "children": [] + } +} diff --git a/artifacts/phase2-engineering-release-2026-11-17/stop-audit.json b/artifacts/phase2-engineering-release-2026-11-17/stop-audit.json new file mode 100644 index 000000000..be065909f --- /dev/null +++ b/artifacts/phase2-engineering-release-2026-11-17/stop-audit.json @@ -0,0 +1,28 @@ +{ + "unix": 1794895667.1169431, + "approval": "1794895409.079369", + "original_already_exited_before_stop_attempt": true, + "no_signal_sent_to_original": true, + "raw_original_status": "COMPLETE", + "raw_original_reason": null, + "accounting_complete": true, + "charges": { + "geometry": 1755.625577025, + "fit": 3087.063371555, + "postfit": 8488.40306277599 + }, + "total_cpu_charge": 14903.96785419699, + "records": 1180, + "complete_sha256": "c0944424601ec10d72d024b8383379311eb565728e462eb8567caa7d8e83e40c", + "v1_incomplete_no_main_decision": true, + "old_waiter": { + "pid": 571486, + "args": [ + "/home/frank14f/optane/MeltMind/artifacts/gre24-reproduction-2026-11-15/environment/venv/bin/python", + "tools/phase2_b76_serial.py" + ], + "children": [] + }, + "old_waiter_retired": true, + "classification": "Original B1 already terminal before operator action; no manufactured INFRA_STOPPED status" +} diff --git a/docs/collaboration-stage-review-policy.md b/docs/collaboration-stage-review-policy.md index 56233a7e5..2eb9bf37f 100644 --- a/docs/collaboration-stage-review-policy.md +++ b/docs/collaboration-stage-review-policy.md @@ -223,3 +223,5 @@ Phase2已批接续实况(2026-11-17):Claude1794887072/1794888554批准B1 Claude1794892722已批准B1五个预测的一次标记恢复,0refit;旧20fit/五失败/原评分固定保留,v1主池缺4折不作树门。已有唯一恢复567454与B11接续567472等待真实依赖,不能再次启动。预算仍总72000/postfit25200,B11累计7200。B7/B6按1794892472和1794893702裁量接在B1恢复后串行,每门7200CPU-s;Mold1794893856全文8f94be12完整纳入数学定义与验收。实施合同见docs/phase2-b76-fixed-contracts-2026-11-17.md,10合成实际guard PASS。模型/几何签名先固定再读限定角色标签,不扩成H2或额外模型。当前无科学新门结果,需结果实到后再由Claude整合树与既有目标复核;不另造审批门。 B7/B6串行等待器已实际启动:固定086c56dc,唯一PID571486/CPU24,根artifacts/phase2-b76-serial-2026-11-17,合同59cdfc4a。审计确认只在WAIT_EXISTING_B1_V2_TERMINAL_AND_EXIT,B7/B6均未开始。已有链不能重复启动,后续实况以回执为准。 + +最新Claude1794895409覆盖旧B1依赖:B7→B6 CPU24可与恢复并行,原科学合同/帽/零重试不变。原559442在操作者信号前已自然终态,raw COMPLETE与账完整保留,不造INFRA_STOPPED;原v1科学覆盖不完整仍无主门。旧571486无子进程退役,独立released工程入口仅删依赖、原科学worker/pins不改;替代唯一链见最新handoff/actual-start。 diff --git a/docs/phase2-b76-fixed-contracts-2026-11-17.md b/docs/phase2-b76-fixed-contracts-2026-11-17.md index 9da78bf95..51ca4b4cb 100644 --- a/docs/phase2-b76-fixed-contracts-2026-11-17.md +++ b/docs/phase2-b76-fixed-contracts-2026-11-17.md @@ -1,3 +1,7 @@ +# 最新执行依赖修正 + +Claude1794895409已解除B1依赖:B7后B6仍串行CPU24,与现有B1恢复并行。科学合同322f85dc/cb77a580及全部科学源码不改。旧唯一空闲等待器571486已退役;独立released入口保留原run除依赖以外的全部语句,AST对照PASS,由唯一替代工程链执行。下文原B1依赖只是历史快照,预算和科学定义继续有效。 + # B7/B6 固定实施与串行依赖 Claude1794892472及1794893702已批准原门;Mold1794893856全文已实际读取,4221字节SHA256 `8f94be1294b9b8a020aabaf2f434658b593a3fc78504815c38751e546015ae16`,保存于references/2026-11-17/phase2-design/mold-b6-spec-8f94be12.md。不重复主审或用户go。本页是实现与执行边界,尚不是科学结果。 diff --git a/docs/phase2-live-handoff-2026-11-17.md b/docs/phase2-live-handoff-2026-11-17.md index a89e9c397..048235208 100644 --- a/docs/phase2-live-handoff-2026-11-17.md +++ b/docs/phase2-live-handoff-2026-11-17.md @@ -1,3 +1,13 @@ +# 最新工程释放裁量(2026-11-17 14:09,覆盖下方B1依赖) + +Claude1794895409明确要求停止缺陷旧评分、释放B7/B6对B1依赖。操作身份核验时559442已先自然退出:原complete=COMPLETE、accounting_complete=true、1180records,总14903.96785419699 CPU-s/postfit8488.40306277599。没有向旧PID发信号,不能制造INFRA_STOPPED;v1原五预测失败/主池缺4折仍不作树门。审计根artifacts/phase2-engineering-release-2026-11-17,原证据不改。 + +既有567454已自动实启00/01/03/04恢复预测,四guard572451..572454和四worker572455..572458被观察到,原失败/模型/pins保留、0refit。567472保持等待v2冻结。 + +旧571486确认无子进程且两门未started后已SIGTERM退役,旧等待根原样保留,不重启。新增独立工程入口phase2_b7_released/phase2_b6_released只删旧run前置B1依赖;所有原science workers仍逐字不变,合同322f85dc/cb77a580原SHA不变;AST验收与原run除依赖外完全相同。唯一替代串行链phase2_b76_released,根artifacts/phase2-b76-released-2026-11-17,待固定发布后实启。仍B7→B6/CPU24,与现有恢复并行,预算/单次/零重试不变。后续actual-start审计优先于本准备快照。 + +--- + # 最新:B1标记恢复等待链与B7/B6固定实现(2026-11-17 14:00) 本节覆盖下方历史“B11尚未实施/仅B1活跃”的快照。实际进程审计见artifacts/phase2-current-handoff-2026-11-17.json。 diff --git a/tools/phase2_b6_released.py b/tools/phase2_b6_released.py new file mode 100644 index 000000000..a8a82aad1 --- /dev/null +++ b/tools/phase2_b6_released.py @@ -0,0 +1,35 @@ +"""Claude1794895409 dependency release only; original science workers unchanged.""" +from phase2_b6_gate import * + +def run(root): + c=config(root);os.sched_setaffinity(0,[c['cpu']]);lock=(root/'run.lock').open('a');fcntl.flock(lock,fcntl.LOCK_EX|fcntl.LOCK_NB) + if (root/'started.json').exists():raise FileExistsError('B6 zero retries') + start=time.process_time();u0=resource.getrusage(resource.RUSAGE_CHILDREN);charged=0.;records=[];entries=[] + def total(): + u=resource.getrusage(resource.RUSAGE_CHILDREN);return 60+max(charged,u.ru_utime+u.ru_stime-u0.ru_utime-u0.ru_stime)+time.process_time()-start + save(root/'started.json',dict(pid=os.getpid(),unix=time.time(),contract_sha256=sha(root/'contract.json'))) + try: + for i,row in enumerate(c['parts']): + if total()+c['part_cpu_seconds']+1050>7200:raise RuntimeError('B6 remaining CPU cannot reserve next part and postfit') + dest=root/'parts'/f'{i:02d}';dest.mkdir(parents=True,exist_ok=False) + remaining=c['disk_bytes']-disk_usage(root) + if remaining<=0:raise RuntimeError('B6 disk cap') + save(root/'live-progress.json',dict(stage='GEOMETRY_ONLY',index=i,parts=len(records),unix=time.time(),cumulative_cpu_seconds=total())) + g=supervise([sys.executable,'tools/phase2_b6_gate.py','field',str(root),str(i)],dest,dict(cpu_seconds=c['part_cpu_seconds'],wall_seconds=c['part_wall_seconds'],rss_bytes=c['rss_bytes'],disk_bytes=remaining)) + charged+=g['cpu_seconds'];record=dict(index=i,case=row['case'],guard=g);records.append(record) + if g['monitor_errors']:raise RuntimeError('B6 monitor failure') + if g['status']!='PASS' and not (dest/'failure.json').exists() and not g['stop_reason']:raise RuntimeError('B6 input/configuration failure before field diagnostics') + if g['status']=='PASS':entries.append(dict(index=i,case=row['case'],result_sha256=sha(dest/'result.json'))) + save(root/'phase-ledger.json',dict(records=records,cumulative_cpu_seconds=total())) + save(root/'fields-manifest.json',dict(entries=entries,records=records,all50_terminal=True,labels_read=False)) + freeze(root,'fields',[root/'contract.json',root/'fields-manifest.json',*[BASE/p for p in c['code_sha256']]]) + dest=root/'score';dest.mkdir(exist_ok=False) + g=supervise([sys.executable,'tools/phase2_b6_gate.py','score',str(root)],dest,dict(cpu_seconds=min(900,7200-total()-120),wall_seconds=1200,rss_bytes=c['rss_bytes'],disk_bytes=c['disk_bytes']-disk_usage(root))) + charged+=g['cpu_seconds'];records.append(dict(phase='score',guard=g)) + if g['status']!='PASS' or total()>7200 or disk_usage(root)>c['disk_bytes']:raise RuntimeError('B6 scoring/resource failure') + save(root/'complete.json',dict(status='COMPLETE',cumulative_cpu_seconds=total(),records=records,scientific_gate=read(dest/'result.json')['decision'],retry=False)) + except BaseException as exc: + save(root/'complete.json',dict(status='STOPPED',reason=type(exc).__name__+': '+str(exc),cumulative_cpu_seconds=total(),records=records,retry=False));raise + + +if __name__=='__main__':run(Path(sys.argv[1])) diff --git a/tools/phase2_b76_released.py b/tools/phase2_b76_released.py new file mode 100644 index 000000000..698d5f001 --- /dev/null +++ b/tools/phase2_b76_released.py @@ -0,0 +1,46 @@ +"""Claude1794895409: B7 then B6 once, independent of B1 recovery.""" +import fcntl +import json +import os +from pathlib import Path +import subprocess +import sys +import time +import psutil +from phase2_h1_worker_v2 import save,sha,checked + +BASE=Path('/home/frank14f/optane/MeltMind') +ROOT=BASE/'artifacts/phase2-b76-released-2026-11-17' +DEPENDENCY=BASE/'artifacts/phase2-h1-labelled-recovery-2026-11-17' +def read(p):return json.loads(Path(p).read_text()) + + +def live(root): + return [p.pid for p in psutil.process_iter(['pid','cmdline']) if p.pid!=os.getpid() and str(root) in (p.info['cmdline'] or [])] + + +def run(): + c=read(ROOT/'contract.json') + for p,h in c['source_sha256'].items():checked(BASE/p,h) + os.sched_setaffinity(0,[24]);start=time.process_time() + with (ROOT/'run.lock').open('a') as lock: + fcntl.flock(lock,fcntl.LOCK_EX|fcntl.LOCK_NB) + if (ROOT/'started.json').exists():raise FileExistsError('Unique existing chain; no restart') + save(ROOT/'started.json',dict(pid=os.getpid(),unix=time.time(),contract_sha256=sha(ROOT/'contract.json'))) + results=[] + try: + for name,module in [('phase2-b7-gate-2026-11-17','phase2_b7_released'),('phase2-b6-gate-2026-11-17','phase2_b6_released')]: + root=BASE/'artifacts'/name + for p,h in c['source_sha256'].items():checked(BASE/p,h) + if live(root) or (root/'started.json').exists():raise RuntimeError('Dependent gate already attempted; do not duplicate') + save(ROOT/'live-progress.json',dict(stage='RUN_'+module,unix=time.time(),coordinator_cpu_seconds=time.process_time()-start)) + with (ROOT/(module+'.log')).open('x') as log: + child=subprocess.run([sys.executable,'tools/'+module+'.py',str(root)],stdout=log,stderr=subprocess.STDOUT) + if not (root/'complete.json').exists() or live(root):raise RuntimeError('Missing terminal or live children') + result=read(root/'complete.json');results.append(dict(gate=name,returncode=child.returncode,complete_sha256=sha(root/'complete.json'),status=result['status'])) + save(ROOT/'gate-terminals.json',results) + save(ROOT/'complete.json',dict(status='BOTH_GATES_TERMINAL',results=results,coordinator_cpu_seconds=time.process_time()-start,retry=False)) + except BaseException as exc: + save(ROOT/'complete.json',dict(status='STOPPED',reason=type(exc).__name__+': '+str(exc),results=results,coordinator_cpu_seconds=time.process_time()-start,retry=False));raise + +if __name__=='__main__':run() diff --git a/tools/phase2_b7_released.py b/tools/phase2_b7_released.py new file mode 100644 index 000000000..4efcc36b2 --- /dev/null +++ b/tools/phase2_b7_released.py @@ -0,0 +1,28 @@ +"""Claude1794895409 dependency release only; original science workers unchanged.""" +from phase2_b7_gate import * + +def run(root): + c=config(root);os.sched_setaffinity(0,[24]);start=time.process_time();u0=resource.getrusage(resource.RUSAGE_CHILDREN);charged=0.;records=[] + lock=(root/'run.lock').open('a');fcntl.flock(lock,fcntl.LOCK_EX|fcntl.LOCK_NB) + if (root/'started.json').exists():raise FileExistsError('B7 no retry') + save(root/'started.json',dict(pid=os.getpid(),unix=time.time(),contract_sha256=sha(root/'contract.json'))) + def total(): + u=resource.getrusage(resource.RUSAGE_CHILDREN);return 60+max(charged,u.ru_utime+u.ru_stime-u0.ru_utime-u0.ru_stime)+time.process_time()-start + try: + for mode in ['train','predict','score']: + if mode=='predict':freeze(root,'model',[root/'contract.json',root/'phases/train/model.ubj',root/'phases/train/result.json',*[BASE/p for p in c['code_sha256']]]) + if mode=='score':freeze(root,'predictions',[root/'contract.json',root/'phases/predict/manifest.json',*[BASE/p for p in c['code_sha256']]]) + dest=root/'phases'/mode;dest.mkdir(parents=True,exist_ok=False);cap=min(c['phase_limits'][mode],7200-total()-120) + disk_remaining=c['disk_bytes']-disk_usage(root) + if disk_remaining<=0:raise RuntimeError('B7 cumulative disk cap') + if cap<=0:raise RuntimeError('B7 cumulative CPU cap') + save(root/'live-progress.json',dict(stage=mode,unix=time.time(),cumulative_cpu_seconds=total())) + g=supervise([sys.executable,'tools/phase2_b7_gate.py',mode,str(root)],dest,dict(cpu_seconds=cap,wall_seconds=c['phase_limits'][mode],rss_bytes=c['rss_bytes'],disk_bytes=disk_remaining)) + charged+=g['cpu_seconds'];records.append(dict(phase=mode,guard=g));save(root/'phase-ledger.json',dict(records=records,cumulative_cpu_seconds=total())) + if g['status']!='PASS' or total()>7200 or disk_usage(root)>c['disk_bytes']:raise RuntimeError('B7 phase/resource stop') + save(root/'complete.json',dict(status='COMPLETE',cumulative_cpu_seconds=total(),records=records,scientific_gate=read(root/'phases/score/result.json')['decision'],retry=False)) + except BaseException as exc: + save(root/'complete.json',dict(status='STOPPED',reason=type(exc).__name__+': '+str(exc),cumulative_cpu_seconds=total(),records=records,retry=False));raise + + +if __name__=='__main__':run(Path(sys.argv[1]))