Start bounded G1 copy calibration with fixed dimensionless route thresholds

This commit is contained in:
Frank14f committed 2026-11-14 21:28:47 +08:00
1 parent dbfb11ea42
commit 2ba7800d39
16 files changed
+876

No files matched your search

@@ -0,0 +1,8 @@
{
"pid": 2,
"started_unix": 1794662686.7935393,
"jobs": 22,
"pairs": 62,
"workers": 4,
"contract_sha256": "3fecf5e32757e6946e54e746061f921cb67eb72f4c8011daec8f0ba5c2a8ae03"
}
@@ -0,0 +1,63 @@
{
"authorizing_rulings": [
"1794661944.308269",
"1794662380.787319"
],
"code_sha256": {
"tools/prepare_g1_copy_calibration.py": "eb4945b0fe69bc40ec9f9168c1d2dece477a01f566a8b506f9e39e9ed8723486",
"tools/g1_copy_calibration.py": "c5516eaae798be0af863c2d7cd1688d31485a938e46d627c440d31bca873fc39",
"tools/run_g1_copy_calibration.py": "2e19cfba2d8def2d6be32bea0a951cda4b4a895149cdf7b77a0d11ccf9082801",
"tools/g1_registration_cost.py": "c3d722a8cfd067dfd726f8a8729e72c37dbc63e2c24ba1b0e3d767d47f7756ba",
"tools/s2_e1_supervisor.py": "6753c9ceb0b932047ba505bd15681f109e9407bdb58fd96c55e1431a3f1b4a02",
"tools/audit_samples.py": "a3daf70ec3bcb77bf46d9dc4887d552cf7c422117880a169969780012278cd70",
"tools/boundary_distance.py": "a45c1cbce92521a96eb814913b4f465b926c0b3883932ab0b7c37d11db113ed7"
},
"input_sha256": {
"artifacts/s2-g1-copy-calibration-2026-11-14/custodian/plan.json": "2c9c09e143020345115ee9146546f97686f033b25cdb830dc8f1d166c9283a94",
"artifacts/s2-g1-inventory-2026-11-14/custodian/parts.json": "977df4e1910607a2b540dce4a4d95dff247414c88daa54415a6799feb71abb35",
"artifacts/s2-g1-custody-handoff-2026-11-14/custodian/rigid-calibration-inputs.json": "d11b3bef2c23e010c375fa0897c529577821aea729579d91a586d3d3f5ec1bdf"
},
"archive": "data.zip",
"archive_verification": "artifacts/intake-2026-11-13/archive_verification.json",
"existing_registration_cache": "artifacts/s2-e1-2026-11-14/cost-geometry",
"sample_seed": [
2026111414
],
"synthetic_parts": 20,
"synthetic_pairs": 60,
"natural_visual_rigid_pairs": 2,
"synthetic_transform": "independent Haar proper R; mirror R diag(-1,1,1); scale 2; t=Rg*U[-3,3]^3; original face indices retained",
"sampling": "unchanged area-PPS 2000; source numeric prefix, unique synthetic target prefix 100000000+pair_index; natural original numeric prefixes",
"registration": "unchanged g1_registration_cost.register, both routes, det +/- starts, full-triangle two-way P95; no remeshing",
"threshold_policy": {
"physical_residual": "raw P95 / mean(Rg_a,Rg_b)",
"physical_size_gate": "max(Rg_a,Rg_b)/min(Rg_a,Rg_b) <= 1.05",
"scale_free_residual": "unchanged individual Rg-normalized P95",
"positive_kinds_physical": [
"rigid",
"mirror",
"natural_visual_rigid"
],
"positive_kinds_scale_free": [
"rigid",
"mirror",
"scale",
"natural_visual_rigid"
],
"per_pair_residual": "min of det+ and det- branch best P95 within route",
"threshold": "3 * largest positive-pair residual on each route",
"link": "either route meets own threshold; physical also requires Rg ratio gate",
"negative_control": "all 20 scale copies must fail physical size gate; any pass stops",
"mirror_check": "flag a mirror copy when det- does not strictly win; do not silently discard symmetric cases"
},
"workers": 4,
"per_pair_wall_seconds": 1800,
"per_worker_rss_bytes": 1342177280,
"aggregate_rss_bytes": 21474836480,
"worker_cpu_budget_seconds": 360000,
"wall_seconds": 28800,
"disk_bytes": 21474836480,
"scope": "only calibration; formal candidate generation and registration queue follow calibration checkpoint",
"failed_jobs": "retained; no retry/replacement; final checkpoint after 22 jobs; any failure leaves calibration incomplete",
"no_simulation_fields_no_training_no_gpu": true
}
@@ -0,0 +1,290 @@
{
"status": "PARTIAL_RESIDUAL_CHECKPOINT",
"completed_pairs": 10,
"pair_kind_counts": {
"rigid": 6,
"mirror": 2,
"scale": 2
},
"thresholds": null,
"threshold_ruling": "1794662380.787319",
"residual_distributions": [
{
"pair_id": "calib-000",
"kind": "rigid",
"rg_ratio": 1.0,
"routes": {
"physical": {
"branch_residuals": {
"1": 0.0007655151816286167,
"-1": 0.0009000445166876989
},
"best_residual": 0.0007655151816286167,
"positive": true,
"size_gate_pass": true
},
"scale_free": {
"branch_residuals": {
"1": 0.0007655151816283179,
"-1": 0.0009000445166877924
},
"best_residual": 0.0007655151816283179,
"positive": true,
"size_gate_pass": true
}
},
"source_result_sha256": "498a51fdfcb002a5b0942c113e28a7d0d682c0d7b0740b4fdf35e53c341857a3"
},
{
"pair_id": "calib-003",
"kind": "rigid",
"rg_ratio": 1.0,
"routes": {
"physical": {
"branch_residuals": {
"1": 0.004860985658796247,
"-1": 0.0024434709881316027
},
"best_residual": 0.0024434709881316027,
"positive": true,
"size_gate_pass": true
},
"scale_free": {
"branch_residuals": {
"1": 0.004860985658795578,
"-1": 0.002443470988132329
},
"best_residual": 0.002443470988132329,
"positive": true,
"size_gate_pass": true
}
},
"source_result_sha256": "c073b6a276468754ee27ea597fdca4f88cb6ad49473395adff4f313ff2e4213a"
},
{
"pair_id": "calib-006",
"kind": "rigid",
"rg_ratio": 1.0,
"routes": {
"physical": {
"branch_residuals": {
"1": 0.0018786009642255224,
"-1": 0.004860096112958939
},
"best_residual": 0.0018786009642255224,
"positive": true,
"size_gate_pass": true
},
"scale_free": {
"branch_residuals": {
"1": 0.00187860096422521,
"-1": 0.00486009611295906
},
"best_residual": 0.00187860096422521,
"positive": true,
"size_gate_pass": true
}
},
"source_result_sha256": "fcfc12023693c5d879ab436be8d062a12ff82aec6a672c56b0d64d70b5a1c738"
},
{
"pair_id": "calib-007",
"kind": "mirror",
"rg_ratio": 1.0,
"routes": {
"physical": {
"branch_residuals": {
"1": 0.003043202713277692,
"-1": 0.0030384151886850663
},
"best_residual": 0.0030384151886850663,
"positive": true,
"size_gate_pass": true
},
"scale_free": {
"branch_residuals": {
"1": 0.0030432027132775655,
"-1": 0.003038415188685041
},
"best_residual": 0.003038415188685041,
"positive": true,
"size_gate_pass": true
}
},
"source_result_sha256": "d4b3c0236a5bb7e4182aa7f25dcf00808527977a37f52c54d44a3f353f2e5219"
},
{
"pair_id": "calib-008",
"kind": "scale",
"rg_ratio": 2.0,
"routes": {
"physical": {
"branch_residuals": {
"1": 0.9683416462081893,
"-1": 966.2474928284491
},
"best_residual": 0.9683416462081893,
"positive": false,
"size_gate_pass": false
},
"scale_free": {
"branch_residuals": {
"1": 0.002902163907666195,
"-1": 0.003629575108848093
},
"best_residual": 0.002902163907666195,
"positive": true,
"size_gate_pass": true
}
},
"source_result_sha256": "bf9d62c132733d93ad9d64af0410d47b50afbd2ab6006ce9fec99b90c2d54b9d"
},
{
"pair_id": "calib-009",
"kind": "rigid",
"rg_ratio": 1.0,
"routes": {
"physical": {
"branch_residuals": {
"1": 0.001686208947509553,
"-1": 0.12843659353064088
},
"best_residual": 0.001686208947509553,
"positive": true,
"size_gate_pass": true
},
"scale_free": {
"branch_residuals": {
"1": 0.001686208947509512,
"-1": 0.1284365935306402
},
"best_residual": 0.001686208947509512,
"positive": true,
"size_gate_pass": true
}
},
"source_result_sha256": "2a6eef2c38e47664f07628664463ee2aa93e6cd2427c88badc01487033c34496"
},
{
"pair_id": "calib-010",
"kind": "mirror",
"rg_ratio": 1.0,
"routes": {
"physical": {
"branch_residuals": {
"1": 0.1259045104245645,
"-1": 0.0015437310484486084
},
"best_residual": 0.0015437310484486084,
"positive": true,
"size_gate_pass": true
},
"scale_free": {
"branch_residuals": {
"1": 0.12590451042456374,
"-1": 0.0015437310484488122
},
"best_residual": 0.0015437310484488122,
"positive": true,
"size_gate_pass": true
}
},
"source_result_sha256": "c2b88df317b9f040b0a6ce5b06786d8cb3749128c539c2b0fe92f45259cb4a15"
},
{
"pair_id": "calib-011",
"kind": "scale",
"rg_ratio": 2.0,
"routes": {
"physical": {
"branch_residuals": {
"1": 1.4764714665998997,
"-1": 1.52403929815083
},
"best_residual": 1.4764714665998997,
"positive": false,
"size_gate_pass": false
},
"scale_free": {
"branch_residuals": {
"1": 0.0011272062311777908,
"-1": 0.12570653994342385
},
"best_residual": 0.0011272062311777908,
"positive": true,
"size_gate_pass": true
}
},
"source_result_sha256": "709b8070346a10266472ae2048bce58f9e33857dc67841f3642a301ffebf2122"
},
{
"pair_id": "calib-012",
"kind": "rigid",
"rg_ratio": 1.0,
"routes": {
"physical": {
"branch_residuals": {
"1": 0.0011100171704919348,
"-1": 0.001403386162929844
},
"best_residual": 0.0011100171704919348,
"positive": true,
"size_gate_pass": true
},
"scale_free": {
"branch_residuals": {
"1": 0.0011100171704916712,
"-1": 0.0014033861629297489
},
"best_residual": 0.0011100171704916712,
"positive": true,
"size_gate_pass": true
}
},
"source_result_sha256": "f24a0ed7e139029d421d5bf5fdb41ba2ba5b8ca5c1ecd4427b20852bd01ff526"
},
{
"pair_id": "calib-015",
"kind": "rigid",
"rg_ratio": 1.0,
"routes": {
"physical": {
"branch_residuals": {
"1": 0.0017815282578255499,
"-1": 0.00164363252901044
},
"best_residual": 0.00164363252901044,
"positive": true,
"size_gate_pass": true
},
"scale_free": {
"branch_residuals": {
"1": 0.0017815282578257847,
"-1": 0.0016436325290102565
},
"best_residual": 0.0016436325290102565,
"positive": true,
"size_gate_pass": true
}
},
"source_result_sha256": "3ba378635c3617016508ecaaa6ab14bc03ef4a39f2da92e203ee582764b6b391"
}
],
"physical_scale_negative_controls": [
{
"pair_id": "calib-008",
"rg_ratio": 2.0,
"physical_size_gate_pass": false
},
{
"pair_id": "calib-011",
"rg_ratio": 2.0,
"physical_size_gate_pass": false
}
],
"mirror_branch_flags": [],
"physical_positive_size_gate_failures": [],
"claim": "Engineering calibration on development examples; not independent cross-key recall certification",
"candidate_generation_started": false,
"source_sha256": "062ba0c099f7898b72551edc4d04c3ea4661c201c537a0ffcc7d55a42d79c121"
}
@@ -0,0 +1,6 @@
{
"source_sha256": "062ba0c099f7898b72551edc4d04c3ea4661c201c537a0ffcc7d55a42d79c121",
"threshold_ruling": "1794662380.787319",
"final_requires": "all 22 jobs PASS, all 62 rows, 42 physical positives, 62 scale-free positives, 20 scaled negatives fail Rg gate",
"partial_checkpoint_freezes_no_threshold": true
}
@@ -0,0 +1,13 @@
{
"status": "CALIBRATION_FROZEN_NOT_STARTED",
"pairs": 62,
"synthetic_parts": 20,
"jobs": 22,
"unique_source_parts": 24,
"plan_sha256": "2c9c09e143020345115ee9146546f97686f033b25cdb830dc8f1d166c9283a94",
"contract_sha256": "3fecf5e32757e6946e54e746061f921cb67eb72f4c8011daec8f0ba5c2a8ae03",
"exposure_overlay_sha256": "c32cbbdbec72643ad43c6ea089e02239fca1998b1b3bd2234a0480d3c60c206d",
"threshold_ruling": "1794662380.787319",
"previous_review_not_repeated": true,
"split_stream_consumed": false
}
@@ -0,0 +1,17 @@
{
"completed_jobs": 4,
"active_jobs": [
0,
1,
6,
7
],
"next_job": 8,
"completed_worker_cpu_seconds": 423.61940300000003,
"live_tree_cpu_seconds": 451.83,
"active_tree_rss_bytes": 609148928,
"stop_reason": null,
"elapsed_seconds": 219.91591645299923,
"snapshot_utc": "2026-11-14T13:28:26.712114+00:00",
"snapshot_only": true
}
@@ -0,0 +1,30 @@
(2 total) ===
--- Reply 1 of 2 ---
From: ClaudeWorker (local) <botuser-T0C8JMA61UY-B0C7YUHNDFC@slack-bots.com> (U0C7SSQLBJ7)
Time: 2026-11-14 21:19:16 CST
Message TS: 1794662356.246479
Accepted; working on: “MeltAstra 正在实际启动下一阶段校准,已确认无既有校准产物/进程,固定 det/2000面积PPS/全三角双向P95 协议不改。常规…”
--- Reply 2 of 2 ---
From: ClaudeWorker (local) <botuser-T0C8JMA61UY-B0C7YUHNDFC@slack-bots.com> (U0C7SSQLBJ7)
Time: 2026-11-14 21:19:40 CST
Message TS: 1794662380.787319
*Claude: confirmed, with one correction to the physical route*
• *Two separate thresholds, as you propose:* τ_phys and τ_sf. Each = 3 × the largest positive-pair residual on its own route, where a pair's residual is min(det+, det−) P95. A pair links if either route, in either branch, is at or below its threshold.
• *Correction: express the physical route without units as well.* Part volumes span about 5 orders of magnitude, so a single τ in raw units would mean entirely different tolerances for small and large parts. So:
• *physical residual = P95 in raw units ÷ the mean of the two parts' R_g*;
• *the physical route also requires an R_g ratio ≤ 1.05.* That keeps it a same-size route.
The scale-free route stays as it is (each part normalised by its own R_g).
• *Positives per route,* as you set them out:
• physical: rigid copies, mirror copies, and the 2 natural pairs;
• scale-free: all three copy types (rigid, mirror, 2× scale) plus the 2 natural pairs.
• *Negative control:* the 2× scaled copies must fail the physical route because of the R_g-ratio gate. Report that they do. If any passes, stop.
• *Also report:*
• the full residual distribution of positives per route and branch;
• for the mirror copies, which branch fits best. det− should win; if it doesn't, flag it, as a check on the implementation.
Everything else proceeds as you described under the reproducible contract.
@@ -0,0 +1,8 @@
{
"passed": 3,
"failed": 0,
"test_source": "tools/test_g1_copy_calibration.py",
"reported_test_seconds": 0.033,
"scope": "synthetic transformation invariants, independent PPS streams, improper base rejection",
"no_real_geometry": true
}
@@ -0,0 +1,26 @@
from pathlib import Path
import tempfile,json,subprocess,os,sys,zipfile,numpy as np
repo=Path('/home/frank14f/optane/MeltMind');base=Path(tempfile.mkdtemp(prefix='meltmind-calib-runner-'));records=[]
for fail in [False,True]:
root=base/('failure' if fail else 'success');(root/'custodian').mkdir(parents=True);cache=root/'cache';cache.mkdir();archive=root/'empty.zip'
with zipfile.ZipFile(archive,'w'):pass
st=archive.stat();ver=root/'archive.json';ver.write_text(json.dumps({'bytes':st.st_size,'mtime_ns':st.st_mtime_ns,'inode':st.st_ino}))
jobs=[]
for i in range(2):
case=f'{i+1:08d}_fixture_step_000'
if not fail:np.savez_compressed(cache/(case+'.npz'),points=np.array([[0.,0,0],[3.,0,0],[0,2.,0],[0,0,1.]]),boundary=np.array([[0,1,2],[0,1,3],[0,2,3],[1,2,3]]),center=np.array([.75,.5,.25]),rg=np.array(1.1))
jobs.append({'cases':[case],'pairs':[{'id':f'p{i}','a':case,'kind':'rigid','rotation':np.eye(3).tolist(),'unit_translation':[1,2,3],'source_sampling_prefix':i+1,'target_sampling_prefix':1000000+i}]})
(root/'custodian/plan.json').write_text(json.dumps({'jobs':jobs}))
contract={'code_sha256':{},'input_sha256':{},'archive':str(archive),'archive_verification':str(ver),'existing_registration_cache':str(cache),'per_pair_wall_seconds':60,'workers':2,'per_worker_rss_bytes':1342177280,'aggregate_rss_bytes':3*1024**3,'disk_bytes':1024**3,'wall_seconds':90,'worker_cpu_budget_seconds':180}
(root/'contract.json').write_text(json.dumps(contract))
env=dict(os.environ,MELTMIND_G1_CALIBRATION_ROOT=str(root),OMP_NUM_THREADS='1',OPENBLAS_NUM_THREADS='1',MKL_NUM_THREADS='1',CUDA_VISIBLE_DEVICES='')
p=subprocess.run([sys.executable,'tools/run_g1_copy_calibration.py'],cwd=repo,env=env,capture_output=True,text=True,timeout=110)
output=json.loads((root/('batch-incomplete.json' if fail else 'batch-complete.json')).read_text())
assert (p.returncode!=0)==fail and len(output['jobs'])==2
assert output['failed_jobs']==(2 if fail else 0)
assert len(list((root/'jobs').glob('*/worker.receipt.json')))==2
assert all(j['worker']['returncode'] is not None for j in output['jobs'])
records.append({'case':'intentional_missing_geometry' if fail else 'two_parallel_synthetic_jobs','pass':True,'returncode':p.returncode,'worker_cpu_seconds':output['worker_cpu_seconds'],'failed_jobs':output['failed_jobs'],'wall_seconds':output['wall_seconds']})
print(records[-1],flush=True)
(repo/'artifacts/s2-g1-copy-calibration-tests-2026-11-14').mkdir(exist_ok=True)
(repo/'artifacts/s2-g1-copy-calibration-tests-2026-11-14/runner-tests.json').write_text(json.dumps({'tests':records,'fixture_root':str(base),'no_real_geometry_read':True},indent=2)+'\n')
@@ -0,0 +1,22 @@
{
"tests": [
{
"case": "two_parallel_synthetic_jobs",
"pass": true,
"returncode": 0,
"worker_cpu_seconds": 65.63278199999999,
"failed_jobs": 0,
"wall_seconds": 33.96670820901636
},
{
"case": "intentional_missing_geometry",
"pass": true,
"returncode": 1,
"worker_cpu_seconds": 0.751822,
"failed_jobs": 2,
"wall_seconds": 1.0101391290081665
}
],
"fixture_root": "/tmp/meltmind-calib-runner-fi2qhnyv",
"no_real_geometry_read": true
}