|
| 1 | +# Adapter purity permits declared code and execution placement |
| 2 | + |
| 3 | +**Recorded:** 2026-09-07. This is the amendment record date, not a separately |
| 4 | +verified approval date. |
| 5 | + |
| 6 | +**Authority:** Maxime ratified the principle below in session on 2026-09-07, |
| 7 | +while designing LMCC's host-supplied format executor: amend ProgramIR rather |
| 8 | +than design LMCC around its old restriction. The ratification covers the |
| 9 | +principle, not a specific ABI or backend. |
| 10 | + |
| 11 | +**Evidence type:** normative design amendment; no structural or execution |
| 12 | +fixtures change. `AUTHORITY.md` precedence and fixture evidence rules remain |
| 13 | +unchanged. Source record: DSPy `roadmap/05-decisions.md`, D-052. |
| 14 | + |
| 15 | +## Reason and exact scope |
| 16 | + |
| 17 | +D-026 treated purity as a universal ban on adapter placement. It also said |
| 18 | +execution placement could never be an artifact requirement. That restriction |
| 19 | +confused a declared transformation with a code-free representation. |
| 20 | + |
| 21 | +Adapters are where program code meets the LM. Formats can carry executable |
| 22 | +code. Purity means declared transformations without hidden LM calls or effects. |
| 23 | +Artifacts must declare code identity, dependencies, language, execution |
| 24 | +requirements, and enough placement information to run honestly. Hosts supply |
| 25 | +compatible bindings. Typed interfaces and transformation behavior stay invariant |
| 26 | +across local, sandboxed, and remote placement. |
| 27 | + |
| 28 | +This supersedes D-026's no-placement/no-rung-walk exception and reconciles |
| 29 | +`spec/placement.md`, PIR-012, component 4's manifest description, and the |
| 30 | +LANG/PROFILE distinction in `spec/errors.md`. D-026 stays in source history; |
| 31 | +D-052 supersedes it explicitly. The broader D-040 draft is not ratified by |
| 32 | +this amendment. |
| 33 | + |
| 34 | +Source sync accompanies this amendment in DSPy's `roadmap/IR-program-spec.md` |
| 35 | +(§Adapter-notes, §e0-lang, §e0-class) and `roadmap/adapter-ir-spec.md` |
| 36 | +(ADP-002, §9). Related planning summaries point to D-052. No implementation, |
| 37 | +profile predicate, schema, corpus, or version pin changes. |
| 38 | + |
| 39 | +## Preserved limits |
| 40 | + |
| 41 | +- Single-shot remains PIR-008/L2. Adapter code cannot call an LM, including |
| 42 | + through a tool/interpreter grant bridge. Multi-call policies remain explicit |
| 43 | + component-5 control flow: authored, lowered, or refused. |
| 44 | +- Adapter code holds no credential values. Artifacts declare names, never |
| 45 | + values (PIR-005). Hosts own executor transport authentication. Declared |
| 46 | + execution transport is not hidden inference or ambient network access by |
| 47 | + the transformation. This does not select a broker or change TLS policy. |
| 48 | +- Identity differs from location. Identity deviations detach scores; |
| 49 | + re-placement is recorded without detaching them (PIR-010). |
| 50 | +- Receiver bindings win before sidecar materialization. Unsatisfied requirements |
| 51 | + refuse loudly. No fixed backend or mandatory sidecar is introduced. |
| 52 | +- Isolation remains independent: floors bake, envelopes bind. No silent floor |
| 53 | + reduction, trust bypass, or new effect permission follows from placement. |
| 54 | +- D-023/DT-002/DT-003 still limit declared-tier adapters to data-only entries |
| 55 | + and exclude authored-origin code. Remote placement does not make code data-only. |
| 56 | +- Holding declarations does not authorize running them. No new load-time |
| 57 | + execution permission follows from this amendment. |
| 58 | + |
| 59 | +## Context, not executor evidence |
| 60 | + |
| 61 | +LMCC `contract/spec/kernel.md` §5 and its decision D-24 already describe shipped |
| 62 | +formats with `write`, `read`, optional `describe`, `language`, `deps`, `sha256`, |
| 63 | +and `authored_by`. Loading does not run these functions. Hosts admit or refuse |
| 64 | +execution. Section 6's strategy `placement` instead routes field values into |
| 65 | +messages or controls; it does not place executable code. |
| 66 | + |
| 67 | +LMCC D-24 and kernel §9 state that Go leaves `udf:python` cases unclaimed. |
| 68 | +Go's `lmcc/formats.go` verifies the hash, then refuses with `udf-unplaceable`; |
| 69 | +it supplies no code placer. Thus existing data-path conformance cannot prove |
| 70 | +local, sandboxed, or remote format executor support. This amendment neither |
| 71 | +changes LMCC nor adopts a new LMCC protocol. |
| 72 | + |
| 73 | +## Follow-up gates, not implemented behavior |
| 74 | + |
| 75 | +1. Specify and review the code/placement declaration shape and versioning. |
| 76 | + Decide placement ownership within component 4, code identity/dependency |
| 77 | + verification, binding compatibility, and typed value marshaling. Do not |
| 78 | + infer an adapter ABI from existing tool/interpreter data-plane rules. |
| 79 | +2. Specify host admission and execution boundaries, refusal codes/details, |
| 80 | + lifecycle, resource limits, cancellation, transport authentication, and |
| 81 | + provenance. Preserve no hidden effects or LM calls. No backend is selected. |
| 82 | +3. Reconcile `schema/manifest.schema.json` descriptions after review, notably |
| 83 | + `$defs.code_identity.properties.origin` (obsolete D-026 exclusion) and |
| 84 | + `$defs.adapter_preset_ref` (obsolete builtin-only profile wording). |
| 85 | + `$defs.adapter_full_preset` still describes a valid profile limit but cites |
| 86 | + D-026; cite D-023/DT-003 instead. These schema texts remain unchanged here |
| 87 | + because schema edits are outside this documentation amendment's scope. |
| 88 | + Permissive schema slots do not establish a new byte contract or executor. |
| 89 | +4. Add reviewed structural fixtures for declarations, compatibility/refusal, |
| 90 | + identity versus re-placement, and unchanged declared-tier exclusions. |
| 91 | + Add execution fixtures for binding-first selection, unsatisfied placement, |
| 92 | + invariant typed results, no hidden LM calls, credential isolation, and |
| 93 | + floor enforcement. Use AUTHORITY's evidence rules and dedicated fixture |
| 94 | + commits with no spec changes. Existing fixtures remain historical evidence |
| 95 | + for their pinned operations, not coverage of a new execution path. |
| 96 | +5. Implement and test each claimed executor only after those gates. Keep |
| 97 | + unsupported capabilities refused or explicitly unclaimed. Existing grade, |
| 98 | + profile, and corpus claims do not widen automatically. |
0 commit comments