Files
SkillFactory/scripts/adopt_cycle_sim_p1_evidence.py
chenlin 9fe9d27865 feat: checkpoint contact-cycle evaluation and RootXY PPO progress
Consolidate next-stage docs, archive superseded narratives, and preserve frozen document inputs. Retain invalid P2 pairs, partial RootXY training, failed attempts and nonselectable checkpoints as explicit limitations.

Include supervised evaluation/training, desktop GPU admission, bounded evidence and atomic-publication monitor repairs with CPU regressions. Ignore local dotenv configuration.

Validation: 1403 passed, 6 skipped for contact-cycle and related contracts/CLI tests. Full-suite legacy ABI and registration tests require Python 3.12/Torch 2.10/pxr; no runtime checks relaxed. No new physical run or accepted skill.
2026-10-15 14:18:17 +08:00

33 lines
1.4 KiB
Python

#!/usr/bin/env python3
"""CPU-only, explicitly reviewed external P1 adoption; no grant, reservation or Kit.
Writes only an allowlisted P2 root's p1-adoption.json, exclusively and read-only.
The parent must independently review its digest before any extended P2 grant.
"""
import argparse
import importlib.util
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
def main(argv=None):
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--parent-review', required=True)
parser.add_argument('--trusted-source-budget-sha256', required=True)
parser.add_argument('--artifact-root', type=Path, default=Path('/home/cen/sf-runs/p2-01'),
choices=[Path('/home/cen/sf-runs/p2-01'), Path('/home/cen/sf-runs/p2-02')])
args = parser.parse_args(argv)
spec = importlib.util.spec_from_file_location('_adoption_runner', ROOT / 'scripts/evaluate_cycle_sim_residual.py')
runner = importlib.util.module_from_spec(spec)
spec.loader.exec_module(runner)
adoption = runner.cpu_module('evaluation_adoption')
print(adoption.create_adoption(parent_review=args.parent_review,
trusted_source_budget_sha256=args.trusted_source_budget_sha256,
target_root=args.artifact_root))
return 0
if __name__ == '__main__':
raise SystemExit(main())