gnomonlearn
Docs/RFC-0041 install sequencing and optional dependencies

RFC-0041 install sequencing and optional dependencies

Versioned draft snapshot

RFCs, reference catalogs, and evidence reflect Spec 3b2e3e7a114fb826b1445d39a48756b8fff629cd. Counts and pending/status notes belong to that snapshot. Read the dated project update for later progress.

Source repositories are private during staging. Links marked “repository access required” need access to the linked repository.

This is a trace and gap record from the pinned draft specification. It does not establish proof or implementation conformance.

RFC-0041 §3 calls the ten-phase pipeline one transaction, but phases 0 (dependency resolution) and 1 (lifecycle decision) precede phase 2 (begin transaction). Section 6.1 is precise: phases 3–8 run within one module transaction and phase 9 commits it. The projection that says dependency resolution through commit all occur inside one transaction overstates that boundary.

Section 4.3 also says an optional dependency may be skipped during install planning, silently removing its templates: imports, after which a call to the dropped template produces M40021 at compile time. RFC-0040 §11 runs module compilation at build time, before the install plan can know which optional dependencies are available. A runtime plan cannot retroactively produce a compile-time error. The first release needs one stage contract:

  1. Resolve optional dependencies against a pinned build-time module closure and fail template-call validation during compilation, or
  2. Preserve conditional template references in the compiled bundle and diagnose an unavailable optional import during planning/install with a distinct phase and code.

The first option is simpler when module artifacts are immutable and their dependency closure is pinned. It requires a reproducible resolver snapshot and means optional dependencies cannot appear opportunistically at install. Whichever option is chosen, update RFC-0040/0041 prose, Lean, RDF claims, compiler and planner fixtures, and diagnostic phase metadata together.

Separately, §§3 and 13 say identical manifests, installed state, and lifecycle policy produce identical graph mutations. RFC-0039 permits now, uuid, uniqueId, and host functions in template calls; post-install hooks can also read graph state and the clock. Repeatability therefore needs an explicit execution-input envelope or a narrower claim limited to deterministic planning and stable IDs. See RFC0039_EXECUTION_OUTCOME_PROPOSAL.md for the template half of this issue.

Acceptance: fixture a missing optional dependency with a referenced template, a recovered optional dependency, a dependency cycle, and a backend transaction failure. Assert the stage and diagnostic code, the transaction boundary, and whether two runs with injected clocks and IDs produce equal mutations. Do not publish an unqualified deterministic execution claim without replay evidence.