Inventory existing G1 material and validate virtual scheduler contract

This commit is contained in:
Frank14f committed 2026-11-14 19:11:38 +08:00
1 parent 07003020c5
commit 24d2da0fe7
14 files changed
+662

No files matched your search

@@ -0,0 +1,43 @@
{
"status": "INVENTORY_IDENTITY_FILES_SEALED_LOCALLY_NOT_BLIND_PACKAGE",
"custodian": "MeltAstra",
"reviewer": "MoldAstra",
"unblinding_witness": "Grok",
"source": "https://arcticnimbus.slack.com/archives/C0C78UFKGRM/p1794654335163209",
"identity_directory": "artifacts/s2-g1-inventory-2026-11-14/custodian",
"directory_mode": "0700",
"file_modes": "0600",
"files": [
{
"file": "independent_natural_pairs.json",
"bytes": 117,
"sha256": "5ccb2981e7be4669f9c9d28e719e5d3ac0c2c123e15094ea1c2d5b4b4260e6ba"
},
{
"file": "manifest.json",
"bytes": 588,
"sha256": "7a0bf4e91180a6745d18e0570510cec0744818ca5f2dd47a03e71388b96708d9"
},
{
"file": "old_exposed_pairs.json",
"bytes": 13164,
"sha256": "cb66a776c89887fa76fa9a43dc14801a7a8c43a94cb37b2c7b72a3da84dc5955"
},
{
"file": "parts.json",
"bytes": 900882,
"sha256": "977df4e1910607a2b540dce4a4d95dff247414c88daa54415a6799feb71abb35"
},
{
"file": "source_clusters.json",
"bytes": 86487,
"sha256": "b2fd8451bfefede6d11523c118f620c9748964cb9c17b06a2c6bfa8f3ec97a2d"
}
],
"no_anonymous_mapping_created": true,
"no_sampling_or_probability_assignment": true,
"no_blind_package_dispatched": true,
"supersedes_inventory_summary_custody_pending_status": true,
"unblinding": "freeze and commit blind labels first; Grok verifies published SHA256 before joining identities. No seal opened in this inventory stage.",
"limitations": "Unix permissions are local access control, not encrypted storage or protection from owner/root; no claim of technical isolation from authorized shared-host agents."
}
@@ -0,0 +1,9 @@
{
"parts_unique": 624,
"clusters_cover_all_parts": true,
"old_pairs_retained": 30,
"no_fabricated_parent_or_positive_truth": true,
"metadata_export_allowlist_checked": true,
"surface_count_reconciled": true,
"no_blind_view_generated": true
}
@@ -0,0 +1,13 @@
{
"baseline_commit": "108e78364437c5f79304610df6c63dd4daad5e76",
"baseline_e1_charged_cpu_seconds": 1665.366982,
"new_preparation_reserve_seconds": 30,
"new_reserve_is_measurement": false,
"new_reserve_scope": "metadata inventory, synthetic model tests including initial failure, seals and publication; measured receipts included within reserve, not added again",
"measured_inventory_cpu_seconds": 0.310497,
"measured_final_test_process_cpu_seconds": 0.08585,
"updated_conservative_e1_cpu_seconds": 1695.366982,
"e1_limit_cpu_seconds": 57600,
"scientific_workers_started": 0,
"registration_queue_started": false
}
@@ -0,0 +1,70 @@
{
"scope": "public aggregates/code/simulation receipts and seal hashes; actual identity files remain on Horsea under custodian",
"files": [
{
"path": "artifacts/s2-g1-inventory-2026-11-14/public/custody-seal.json",
"bytes": 1693,
"sha256": "bb7695b532a1db1cb2180db93d64408807b7c7db37462780c515bc48da069ee5"
},
{
"path": "artifacts/s2-g1-inventory-2026-11-14/public/inventory-validation.json",
"bytes": 256,
"sha256": "c715ce3d2850e5405906a46f08a60c54cdd804d55f32fe23731c26693189f36c"
},
{
"path": "artifacts/s2-g1-inventory-2026-11-14/public/preparation-resource-ledger.json",
"bytes": 636,
"sha256": "9f2c29f6e10e4b542436a626c468c9f9ba717fa5ced0bdcf852944f296df3f1f"
},
{
"path": "artifacts/s2-g1-inventory-2026-11-14/public/summary.json",
"bytes": 2134,
"sha256": "7a8e9fe4c4b7b4007cf278093322ad56ac340bb6857082bdcb51070b6ef6fa5d"
},
{
"path": "artifacts/s2-g1-scheduler-simulation-2026-11-14/initial-simulator.py",
"bytes": 5929,
"sha256": "5b09c8e7288684cc07a2b789e0905ef3905a9030ea5778931a1b52212d8c4f21"
},
{
"path": "artifacts/s2-g1-scheduler-simulation-2026-11-14/initial-test-failure.json",
"bytes": 387,
"sha256": "71dd9a96bb17b93455ae7066109738bd520c03f8187195bc8fd9c3714f96bad2"
},
{
"path": "artifacts/s2-g1-scheduler-simulation-2026-11-14/test-receipt.json",
"bytes": 486,
"sha256": "ebf9900623cb497cf52e75972a690e53947e08ab477f28ba097a24cd4aa9ea10"
},
{
"path": "artifacts/s2-g1-scheduler-simulation-2026-11-14/tests.log",
"bytes": 1063,
"sha256": "c5283afa5a60b8e7b7296f838feee8cc5c837b1c28187e7097d8eaaeda846af6"
},
{
"path": "docs/s2-g1-material-inventory-2026-11-14.md",
"bytes": 5224,
"sha256": "7a11927a3cb8424577a30a4a87643e78767f0f71874a5c8eea2f2c215bdf20a1"
},
{
"path": "references/2026-11-14/s2-design/moldastra-note16-1900.md",
"bytes": 19098,
"sha256": "aa448d8e9b78a24ec925a61dacd30e35222792d07b1ced216b94758ab8bcf4fc"
},
{
"path": "tools/inventory_g1_materials.py",
"bytes": 7634,
"sha256": "ab5fd9c5da55bd0f354e9b2dc4c24ccfcb05010b81ba6bceea0a71966651c64e"
},
{
"path": "tools/simulate_g1_scheduler.py",
"bytes": 6079,
"sha256": "3395dbde8ce5966882936c54296d3fe06af4c4de9be34bc186c4eca1eda75dbf"
},
{
"path": "tools/test_g1_scheduler_simulation.py",
"bytes": 3588,
"sha256": "245a3fb85418a39f8af8dc389fb736b7b0bb4b79f9c4576827ffd9125272a99e"
}
]
}
@@ -0,0 +1,36 @@
{
"scope": "existing material inventory only; no new descriptors, candidates, pair extraction, labels from original source, LOG reread, registration, training or GPU",
"cases": 624,
"source_keys": 249,
"verified_parent_links": 0,
"verified_independent_natural_positive_pairs": 0,
"old_exposed_pairs": 30,
"old_exposed_endpoint_cases": 56,
"exposure_counts": {
"UNKNOWN": 541,
"KNOWN_DEVELOPMENT_EXPOSED": 83
},
"cluster_exposure_counts": {
"EXPOSED_CLUSTER": 55,
"UNKNOWN_EXPOSURE_CLUSTER": 194
},
"independent_holdout_eligibility_certified_cases": 0,
"surface_cache_cases": 47,
"surface_cache_records": 47,
"npz_member_directories_inspected": 313,
"legacy_geometry_metadata_cases": 624,
"note16_complete_fingerprint_cases": 0,
"custody": "IDENTITY_TABLES_PREPARED_LOCALLY; designated custodian/interface pending Claude; no anonymous IDs or blind bundle generated",
"identity_manifest_sha256": "7a0bf4e91180a6745d18e0570510cec0744818ca5f2dd47a03e71388b96708d9",
"input_sha256": {
"artifacts/intake-2026-11-13/source_groups.json": "03ca9b1a30bd1b957a59dfae0561c452645f1a6151a72eb4da7cf1f51cc50e13",
"artifacts/intake-2026-11-13/geometry_log_census.json": "29f107100ebcc296c41206434229b4941e573c9c4c8c57f820e82f388b2cf40b",
"artifacts/intake-2026-11-13/geometry_screening.json": "98e0bee5bcfb4210ecf3c1c3554ef9c530b120f22c9fc3de5733a9619559937c"
},
"producer_sha256": "ab5fd9c5da55bd0f354e9b2dc4c24ccfcb05010b81ba6bceea0a71966651c64e",
"interpretation": "0 certified independent positives/eligible cases means missing proof, not zero true relatives; unknown exposure cannot be promoted to unexposed. Old geometry screening is not the proposed fingerprint. Source keys are not CAD ancestry.",
"mixed_metadata_disclosure": "Existing geometry_log_census JSON also stores historical process/output fields; parsed as a container, only bbox/covariance/point hash selected. Other fields not used or exported. NPZ access is ZIP member names only, no payload.",
"cpu_seconds": 0.31049699999999997,
"wall_seconds": 0.2523299700114876,
"peak_rss_bytes": 21606400
}
@@ -0,0 +1,102 @@
"""Pure discrete-event contract model. NO subprocesses, data reads or real jobs.
Virtual process-tree inputs test accounting and barriers, not Linux enforcement.
A production adapter must supply sampled + final tree accounting, kill/reap,
locks and persisted recovery; none is claimed here.
"""
from dataclasses import dataclass, asdict
import math
@dataclass(frozen=True)
class Task:
pair_id: str
rank: int
duration: float = 1.
tree_cpu_rates: tuple = (1.,)
tree_rss_bytes: tuple = (1024,)
disk_rate: float = 0.
fails: bool = False
@dataclass(frozen=True)
class Limits:
workers: int = 16
worker_cpu: float = 80*3600
wall: float = 8*3600
disk: float = 20*1024**3
pair_wall: float = 1800.
pair_rss: int = 1342177280
checkpoint: int = 100
def simulate(tasks, limits=Limits(), *, supervisor_cpu_rate=.1):
"""Virtual seconds/bytes only. Each unique pair is attempted at most once."""
tasks=sorted(tasks,key=lambda t:(t.rank,t.pair_id))
if len({t.pair_id for t in tasks})!=len(tasks):raise ValueError('Duplicate pair cannot expand denominator')
if not 1<=limits.workers<=16 or limits.checkpoint!=100:raise ValueError('Contract worker/checkpoint bound')
if any(not math.isfinite(v) or v<=0 for v in asdict(limits).values()):raise ValueError('Invalid limit')
if not math.isfinite(supervisor_cpu_rate) or supervisor_cpu_rate<0:raise ValueError('Invalid supervisor rate')
for t in tasks:
values=(t.duration,*t.tree_cpu_rates,*t.tree_rss_bytes,t.disk_rate)
if not t.pair_id or not math.isfinite(t.rank) or any(not math.isfinite(v) or v<0 for v in values) or t.duration<=0 or not t.tree_cpu_rates or not t.tree_rss_bytes:
raise ValueError('Invalid virtual tree/task')
active={};records=[];events=[];checkpoints=[];index=0;end=min(100,len(tasks))
elapsed=worker_cpu=supervisor_cpu=disk=0.;peak_workers=peak_tree_processes=0
reason=None
def finish(pid,why=None):
a=active.pop(pid);t=a['task']
records.append({'pair_id':pid,'rank':t.rank,'status':'FAIL' if why or t.fails else 'PASS',
'reason':why or ('worker_exit' if t.fails else None),'worker_tree_cpu':a['cpu'],
'tree_rss':sum(t.tree_rss_bytes),'start':a['start'],'finish':elapsed})
events.append({'event':'finish','pair_id':pid,'time':elapsed,'reason':records[-1]['reason']})
def global_limit():
if worker_cpu>=limits.worker_cpu:return 'worker_cpu_cap'
if elapsed>=limits.wall:return 'global_wall_cap'
if disk>=limits.disk:return 'global_disk_cap'
while index<len(tasks) or active:
reason=global_limit()
if reason:break
# Barrier: never launch pair 101 while any of first 100 are in flight.
while index<end and len(active)<limits.workers:
t=tasks[index];index+=1
active[t.pair_id]={'task':t,'start':elapsed,'cpu':0.}
events.append({'event':'start','pair_id':t.pair_id,'time':elapsed,'attempt':index})
peak_workers=max(peak_workers,len(active))
peak_tree_processes=max(peak_tree_processes,sum(len(a['task'].tree_rss_bytes) for a in active.values()))
if sum(t.tree_rss_bytes)>limits.pair_rss:finish(t.pair_id,'pair_tree_rss_cap')
if not active and index==end:
failed=sum(r['status']=='FAIL' for r in records)
assert len(records)==index
checkpoint={'attempted':index,'terminal':len(records),'failed':failed,'time':elapsed,'stop':failed*50>index}
checkpoints.append(checkpoint);events.append({'event':'checkpoint',**checkpoint})
if checkpoint['stop']:reason='failure_fraction_gt_2_percent';break
if index==len(tasks):break
end=min(end+100,len(tasks));continue
rate=sum(sum(a['task'].tree_cpu_rates) for a in active.values())
disk_rate=sum(a['task'].disk_rate for a in active.values())
remaining=[min(a['task'].duration,limits.pair_wall)-(elapsed-a['start']) for a in active.values()]
remaining += [limits.wall-elapsed]
if rate:remaining.append((limits.worker_cpu-worker_cpu)/rate)
if disk_rate:remaining.append((limits.disk-disk)/disk_rate)
dt=max(0.,min(remaining))
if dt==0:raise RuntimeError('Zero-time event without stop/terminal transition')
elapsed+=dt;supervisor_cpu+=supervisor_cpu_rate*dt;disk+=disk_rate*dt
for a in active.values():
c=sum(a['task'].tree_cpu_rates)*dt;a['cpu']+=c;worker_cpu+=c
for pid,a in list(active.items()):
t=a['task'];age=elapsed-a['start']
if age>=min(t.duration,limits.pair_wall):
finish(pid,'pair_wall_cap' if t.duration>limits.pair_wall else None)
if reason:
for pid in list(active):finish(pid,reason)
# Stop/global cap still records an end checkpoint against every attempted pair.
if records and (not checkpoints or checkpoints[-1]['attempted']!=index):
failed=sum(r['status']=='FAIL' for r in records)
checkpoints.append({'attempted':index,'terminal':len(records),'failed':failed,'time':elapsed,'stop':failed*50>index,'trigger':'end/global stop'})
assert len(records)==index and abs(sum(r['worker_tree_cpu'] for r in records)-worker_cpu)<1e-6
return {'kind':'PURE_VIRTUAL_CONTRACT_SIMULATION_NOT_REAL_PROCESS_SUPERVISION',
'status':'STOPPED' if reason else 'COMPLETE','stop_reason':reason,'attempted':index,
'not_attempted':len(tasks)-index,'records':records,'events':events,'checkpoints':checkpoints,
'virtual_worker_cpu':worker_cpu,'virtual_supervisor_cpu':supervisor_cpu,
'virtual_wall':elapsed,'virtual_disk':disk,'peak_worker_trees':peak_workers,
'peak_virtual_process_count_including_descendants':peak_tree_processes,
'real_workers_started':0,'retry':False}
@@ -0,0 +1,10 @@
{
"tests": 11,
"passed": 10,
"failed": 1,
"failed_test": "test_final_short_batch_check",
"error": "Expected failure_fraction_gt_2_percent for 1/49 failures, got None",
"test_runner_seconds": 0.01,
"cause": "Loop completed before final short-batch checkpoint could update stop reason",
"source_sha256": "5b09c8e7288684cc07a2b789e0905ef3905a9030ea5778931a1b52212d8c4f21"
}
@@ -0,0 +1,12 @@
{
"returncode": 0,
"wall_seconds": 0.08645775698823854,
"test_process_cpu_seconds": 0.08585,
"peak_rss_bytes": 14155776,
"real_worker_processes": 0,
"kind": "pure virtual contract simulation, not real OS/process-tree enforcement",
"code_sha256": {
"tools/simulate_g1_scheduler.py": "3395dbde8ce5966882936c54296d3fe06af4c4de9be34bc186c4eca1eda75dbf",
"tools/test_g1_scheduler_simulation.py": "245a3fb85418a39f8af8dc389fb736b7b0bb4b79f9c4576827ffd9125272a99e"
}
}
@@ -0,0 +1,16 @@
test_child_rss_summed_and_failure_preserved (test_g1_scheduler_simulation.ContractTests) ... ok
test_duplicate_pair_rejected (test_g1_scheduler_simulation.ContractTests) ... ok
test_exact_two_percent_continues_and_barrier (test_g1_scheduler_simulation.ContractTests) ... ok
test_final_short_batch_check (test_g1_scheduler_simulation.ContractTests) ... ok
test_global_disk_cumulative (test_g1_scheduler_simulation.ContractTests) ... ok
test_global_wall (test_g1_scheduler_simulation.ContractTests) ... ok
test_global_worker_cpu_stops_all (test_g1_scheduler_simulation.ContractTests) ... ok
test_pair_wall_failure_continues_to_checkpoint (test_g1_scheduler_simulation.ContractTests) ... ok
test_stable_rank_and_worker_bound (test_g1_scheduler_simulation.ContractTests) ... ok
test_three_percent_stops_no_101 (test_g1_scheduler_simulation.ContractTests) ... ok
test_tree_cpu_and_failed_cpu_separate_from_supervisor (test_g1_scheduler_simulation.ContractTests) ... ok
----------------------------------------------------------------------
Ran 11 tests in 0.012s
OK