100%

Section 00 - walking-skeleton: canonical-driven self-contained bootstrap

Goal

Prove INV-1 end-to-end on a throwaway target: the installer runs FROM canonical using its OWN bundled runtimes and NEVER invokes the target’s scripts.plan_corpus / skills / plan runtime mid-install — the spine every later section builds on. The thinnest vertical slice (sync a couple of universal + adapted assets plus the version pin into a fresh target with NO working scripts.plan_corpus) completes cleanly.

Implementation Sketch

Today apply() calls _run_post_sync_migrate(target) (apply.py:453), which shells python3 -m scripts.plan_corpus migrate with cwd=target — running the TARGET’s possibly-absent plan_corpus — and post_sync_commands (apply.py:605) runs arbitrary target shell. Both violate INV-1.

  • Replace the target-cwd migrate with a CANONICAL-side migrate: run the migration using the canonical engine’s own scripts.plan_corpus (resolved from root, the canonical checkout), writing the advanced consumer pin into the target — never executing the target’s copy. The installer carries its own runtime.
  • Gate post_sync_commands behind an explicit opt-in so an install never depends on target-resident shell to succeed; a fresh target with no runtimes still completes the core sync.
  • A bootstrap-mode resolution: the engine’s tailoring + validation use the canonical engine’s modules (already imported in-process), never the target’s. Add a guard test: install into a target whose scripts/plan_corpus/ is absent or import-broken still succeeds.

The shim (scripts/harness_dist/shim.py:23) already calls apply(target=cwd, root=resolve_root()) from canonical; this section makes that path self-contained.

Spec & Rule References

  • INV-1 (mission); missions.md §Tooling.
  • script-first.md §10 (full-rigor pytest).
  • Completed engine contract: plans/completed/harness-distribution.

Layer Coverage

  • L1-L11 (compiler pipeline): N/A — tooling-scope, no .ori corpus, no backend legs.
  • L12 production entry point: scripts/harness_dist/tests/test_bootstrap.py driving the real apply() on a runtime-less fixture target.
  • Gate: pytest (scripts/harness_dist/tests/) + python -m scripts.harness_dist --self-test clean.

Work Items

  • Replace apply.py:453 _run_post_sync_migrate target-cwd migrate with a canonical-side migrate using the installer’s own scripts.plan_corpus (resolved from root), writing the advanced pin into the target.
  • Gate post_sync_commands (apply.py:605) behind explicit opt-in so a runtime-less target still completes the core sync.
  • Add a guard test: apply() into a target whose scripts/plan_corpus is absent or import-broken still installs cleanly.

Fresh intel (regenerated)

{ “schema_version”: 1, “target”: { “kind”: “plan-section”, “ref”: “installable-harness/s-4a078f98” }, “generated_at”: “2026-06-25T12:17:39.069646+00:00”, “graph_state”: { “head_sha”: “b74d6b9a”, “last_code_import_at”: “2026-06-25T12:14:42.317Z”, “embedding_stale”: false, “insights_stale”: false, “cpg_stale”: false }, “surfaces”: {}, “summary”: “intel-package[plan-section:installable-harness/s-4a078f98] agent-authored dossier”, “degraded”: false, “dossier”: { “objective_symbols”: [], “tiers”: {}, “agent_authored”: true, “difficulty”: { “class”: “routine”, “research_online”: false, “research_mode”: “auto”, “signals”: [], “plan_dir”: “/home/eric/projects/ori_lang/plans/installable-harness” } } }

(full dossier: walking-skeleton—s-4a078f98.intel.json)