behavior-contracts 0.11.23 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/cli-contract.yaml +27 -20
  2. package/dist/authoring.d.ts +4 -4
  3. package/dist/authoring.d.ts.map +1 -1
  4. package/dist/authoring.js +11 -23
  5. package/dist/authoring.js.map +1 -1
  6. package/dist/behavior.d.ts +3 -3
  7. package/dist/behavior.d.ts.map +1 -1
  8. package/dist/behavior.js +7 -10
  9. package/dist/behavior.js.map +1 -1
  10. package/dist/cli.js +3 -3
  11. package/dist/cli.js.map +1 -1
  12. package/dist/generated/contract.d.ts.map +1 -1
  13. package/dist/generated/contract.js +2 -2
  14. package/dist/generated/contract.js.map +1 -1
  15. package/dist/generated/program.js +4 -4
  16. package/dist/generated/program.js.map +1 -1
  17. package/dist/generator/core.d.ts +13 -10
  18. package/dist/generator/core.d.ts.map +1 -1
  19. package/dist/generator/core.js.map +1 -1
  20. package/dist/generator/emit-native-dynamic.d.ts +203 -0
  21. package/dist/generator/emit-native-dynamic.d.ts.map +1 -0
  22. package/dist/generator/emit-native-dynamic.js +736 -0
  23. package/dist/generator/emit-native-dynamic.js.map +1 -0
  24. package/dist/generator/emit-native-php.d.ts +4 -0
  25. package/dist/generator/emit-native-php.d.ts.map +1 -0
  26. package/dist/generator/emit-native-php.js +668 -0
  27. package/dist/generator/emit-native-php.js.map +1 -0
  28. package/dist/generator/emit-native-python.d.ts +4 -0
  29. package/dist/generator/emit-native-python.d.ts.map +1 -0
  30. package/dist/generator/emit-native-python.js +592 -0
  31. package/dist/generator/emit-native-python.js.map +1 -0
  32. package/dist/generator/emit-php.d.ts +4 -0
  33. package/dist/generator/emit-php.d.ts.map +1 -1
  34. package/dist/generator/emit-php.js +6 -2
  35. package/dist/generator/emit-php.js.map +1 -1
  36. package/dist/generator/emit-python.d.ts +4 -0
  37. package/dist/generator/emit-python.d.ts.map +1 -1
  38. package/dist/generator/emit-python.js +2 -2
  39. package/dist/generator/emit-python.js.map +1 -1
  40. package/dist/generator/emit-shared-typescript.d.ts.map +1 -1
  41. package/dist/generator/emit-shared-typescript.js +15 -20
  42. package/dist/generator/emit-shared-typescript.js.map +1 -1
  43. package/dist/generator/emit-typed-native-go.d.ts.map +1 -1
  44. package/dist/generator/emit-typed-native-go.js +50 -553
  45. package/dist/generator/emit-typed-native-go.js.map +1 -1
  46. package/dist/generator/emit-typed-native-rust.d.ts.map +1 -1
  47. package/dist/generator/emit-typed-native-rust.js +43 -471
  48. package/dist/generator/emit-typed-native-rust.js.map +1 -1
  49. package/dist/generator/index.d.ts +2 -0
  50. package/dist/generator/index.d.ts.map +1 -1
  51. package/dist/generator/index.js +9 -1
  52. package/dist/generator/index.js.map +1 -1
  53. package/dist/generator/native-coverage.d.ts +162 -0
  54. package/dist/generator/native-coverage.d.ts.map +1 -0
  55. package/dist/generator/native-coverage.js +412 -0
  56. package/dist/generator/native-coverage.js.map +1 -0
  57. package/dist/generator/native-expr.d.ts +1 -1
  58. package/dist/generator/native-expr.d.ts.map +1 -1
  59. package/dist/generator/typed.d.ts +6 -0
  60. package/dist/generator/typed.d.ts.map +1 -1
  61. package/dist/generator/typed.js +17 -0
  62. package/dist/generator/typed.js.map +1 -1
  63. package/package.json +3 -2
@@ -0,0 +1,162 @@
1
+ /**
2
+ * native-coverage.ts — the ONE coverage decision of the native codegen surface (go / rust / python / php).
3
+ *
4
+ * A component is emitted on the native surface iff it is a COVERED read: a static execution plan
5
+ * (sequential, or staged with real concurrency whose parallel members are plain dispatches), every body
6
+ * node a covered shape (componentRef / cond / map / fanout with statically resolvable ports and `over`),
7
+ * every node typed (outType — a control-gate cond excepted) and an output that lowers natively. Anything
8
+ * else fails closed at generation time with the specific reason. The rule is language-neutral: the only
9
+ * language-specific question it asks is "does this PORT expression lower to the declared port type in
10
+ * your backend?" ({@link PortLowerProbe} — each emitter answers it with the SAME port lowering it emits
11
+ * with, so eligibility and emission cannot disagree). Every native emitter consumes this module, so the
12
+ * four languages accept exactly the same inputs (golden corpus invariant I3).
13
+ *
14
+ * Also the language-neutral resolvers the emitters share for the covered shapes: the per-node typed
15
+ * result map ({@link buildTypedNodes}), a map node's produced array type ({@link mapNodeArrRef}), the
16
+ * `over` collection's element type and source ({@link resolveOver}), and the map/fanout element shapes.
17
+ */
18
+ import type { Component, FanoutNode, MapNode } from "../behavior.js";
19
+ import { type StaticExpr } from "./straightline.js";
20
+ import { type TypePlan, type TypeRef } from "./typed.js";
21
+ /** A map/fanout element binding (`as`) — the over element's TypeRef, read by the element ports. */
22
+ export type AsBinding = {
23
+ name: string;
24
+ ref: TypeRef;
25
+ plan: TypePlan;
26
+ };
27
+ /**
28
+ * PortLowerProbe — the ONE language-specific question of the coverage rule: lower `node` (a port
29
+ * expression of `comp`) to the declared port type `expected` with this language's port lowering, THROWING
30
+ * a `GeneratorFailure` when it does not lower. `asBinding` is the element binding of a map/fanout port;
31
+ * `narrowed` the gate/guard-proven non-null ref paths of the port's scope. A head is a prior node exactly
32
+ * when `typedNodes` has it.
33
+ */
34
+ export type PortLowerProbe = (node: unknown, comp: Component, plan: TypePlan, typedNodes: Map<string, TypeRef>, expected: TypeRef | undefined, opts: {
35
+ asBinding?: AsBinding;
36
+ narrowed?: ReadonlySet<string>;
37
+ }) => void;
38
+ /** a static `{arr:[…]}` literal's element list, else null. */
39
+ export declare function staticArrElems(node: unknown): unknown[] | null;
40
+ /** the Expression IR node a {@link StaticExpr} classifies (the inverse of `classifyExpr`). */
41
+ export declare function reconstructStatic(e: StaticExpr): unknown;
42
+ /** planForComp — a TypePlan for a single component (its named types are component-scoped, so a
43
+ * one-component IR yields the same plan the full-IR build would for this component). */
44
+ export declare function planForComp(comp: Component): TypePlan;
45
+ /** mapNodeArrRef — the map node's PRODUCED-ARRAY TypeRef from its `outType`.
46
+ *
47
+ * A map node's `outType` is its ELEMENT type (scp-error.md "Map element type"), so the produced array
48
+ * is `{arr: element}`. This is the same reading the compiler applies when it resolves what a node
49
+ * result reference has (`type-gate`: `"map" in n ? {arr:ot} : ot`) — the emitter follows that SSoT
50
+ * rather than inspecting the annotation's shape, so an element that is ITSELF an `arr` stays
51
+ * expressible (element `arr(T)` produces `arr(arr(T))`). */
52
+ export declare function mapNodeArrRef(node: MapNode, plan: TypePlan): TypeRef;
53
+ /** buildTypedNodes — the prior-node typed-local TypeRef map for a component (control-gate nodes are
54
+ * typeless; a map node carries its produced-array ref). An untyped node is omitted (not an error here). */
55
+ export declare function buildTypedNodes(comp: Component, plan: TypePlan): Map<string, TypeRef>;
56
+ /** Where a covered `over` collection is read from: a prior node's typed result (field path `path`, possibly
57
+ * empty) or an input array port. */
58
+ export type OverSource = {
59
+ kind: "node";
60
+ head: string;
61
+ path: string[];
62
+ } | {
63
+ kind: "input";
64
+ port: string;
65
+ };
66
+ /**
67
+ * resolveOver — the ONE resolver of a map/fanout `over` to its element TypeRef + source. Two sources (#108):
68
+ * - a ref to a PRIOR BODY NODE's typed `arr` (or `opt(arr)`) field — the element type from that node's
69
+ * result type;
70
+ * - a ref to an INPUT ARRAY port carrying `elemType` — the element type from `PortSchema.elemType`. An
71
+ * input array WITHOUT elemType is not resolved (BC does not infer — consumer-interface C3).
72
+ * `optArr` is true when the over's declared type is `{opt:{arr}}` (a prior-node opt-arr field OR an OPT input
73
+ * array port): a null optional collection iterates EMPTY (#177 (A)), byte-equal to run_behavior. Returns null
74
+ * when the over is neither (the caller fails closed with its own position label). Each emitter renders the
75
+ * native read of the returned {@link OverSource}.
76
+ */
77
+ export declare function resolveOver(comp: Component, over: unknown, typedNodes: Map<string, TypeRef>, plan: TypePlan): {
78
+ elemRef: TypeRef;
79
+ optArr: boolean;
80
+ source: OverSource;
81
+ } | null;
82
+ /** resolveOverOrFail — {@link resolveOver}, failing closed with the position label when unresolvable. */
83
+ export declare function resolveOverOrFail(lang: string, comp: Component, over: unknown, typedNodes: Map<string, TypeRef>, plan: TypePlan, nodeId: string, label: string): {
84
+ elemRef: TypeRef;
85
+ optArr: boolean;
86
+ source: OverSource;
87
+ };
88
+ /** fanoutItemsElemRef — a fanout node's connection `items` element type (its outType must be the
89
+ * connection struct `{items: arr(T), cursor}`). */
90
+ export declare function fanoutItemsElemRef(lang: string, node: FanoutNode, connRef: TypeRef, plan: TypePlan): TypeRef;
91
+ /** mapElemRowRef — the leaf's per-element RETURN shape for a covered map node: the `into` field's type
92
+ * (into) or the element outType directly (no-into). */
93
+ export declare function mapElemRowRef(lang: string, node: MapNode, arrRef: {
94
+ kind: "arr";
95
+ elem: TypeRef;
96
+ }, plan: TypePlan): TypeRef;
97
+ /** mapFanoutElemRef — the per-element leaf return type of a covered map (its {@link mapElemRowRef}) or
98
+ * fanout (the connection items element). */
99
+ export declare function mapFanoutElemRef(lang: string, node: MapNode | FanoutNode, typedNodes: Map<string, TypeRef>, plan: TypePlan): TypeRef;
100
+ /** A native-raw component MUST be fully typed (outType on every node + outputType). */
101
+ export declare function isFullyTyped(comp: Component): boolean;
102
+ /** The output must lower to a typed value with no Value-scope read: a ref whose head is a BODY NODE
103
+ * (typed), an obj/arr of native-lowerable outputs, a string/bool/null literal, or a concat of them. A ref
104
+ * to an input param or any other operator is NOT native-lowerable here. */
105
+ export declare function outputIsNativeLowerable(comp: Component): boolean;
106
+ /**
107
+ * NativeCoverage — the coverage rule bound to one language's {@link PortLowerProbe}. `lang` labels the
108
+ * per-node messages (`go` / `rust` / `python` / `php`); `surface` labels the aggregated fail-closed
109
+ * failure (e.g. `go typed-native`).
110
+ */
111
+ export declare class NativeCoverage {
112
+ readonly lang: string;
113
+ readonly surface: string;
114
+ private readonly probe;
115
+ constructor(lang: string, surface: string, probe: PortLowerProbe);
116
+ /** portIsStatic — the ELIGIBILITY gate ASKS the language's port lowering whether it can lower this port,
117
+ * rather than re-deriving the shape rules — so the gate and the emitter can never disagree. #170: with the
118
+ * SAME node narrowing; #173: with the SAME declared `expected` port type. */
119
+ portIsStatic(node: unknown, comp: Component, plan: TypePlan, typedNodes: Map<string, TypeRef>, expected: TypeRef | undefined, asBinding?: AsBinding, narrowed?: ReadonlySet<string>): boolean;
120
+ /** the `as` element binding of a map/fanout node's element ports, or undefined when the over source does
121
+ * not resolve (an uncovered node). */
122
+ private elemBinding;
123
+ /**
124
+ * coveredMapNode — the covered map shape. A `map` node whose:
125
+ * - over is a static ref (to a prior node's typed collection field OR an input array with elemType),
126
+ * - every element port is static (lowers to its declared port type in the element scope),
127
+ * - element outType is declared (a compound / opaque-wire element for a component map; any type the
128
+ * declared materializer builds for a pure-transform map — #225),
129
+ * - relationKind connection or absent (every Error Policy Kind is covered).
130
+ * A `map...into` ALWAYS has a well-defined unproduced value for the into field (#177/#182/#232 — the type
131
+ * gate `mapIntoHoldsUnproduced` rejects anything else before an emitter sees it), so the augmented list is
132
+ * homogeneous by construction, EXACTLY run_behavior's applyInto.
133
+ */
134
+ coveredMapNode(n: unknown, bodyIds: Set<string>, comp: Component): boolean;
135
+ /**
136
+ * coveredFanoutNode (v3) — a FANOUT node (first-class `@refs` id-list fan-out) is covered when:
137
+ * - over is a static ref to a PRIOR BODY NODE's typed arr field OR an INPUT array port with elemType,
138
+ * - every element port is static (lowers to its declared port type in the element scope),
139
+ * - relationKind connection; every Error Policy Kind is covered.
140
+ * The fanout lowers to: one deduped batched dispatch → first-seen dedupe (by the elem's dedupeKey field)
141
+ * + dangling drop + implicitSource strip + connection wrap {items, cursor:null}.
142
+ */
143
+ coveredFanoutNode(n: unknown, bodyIds: Set<string>, comp: Component): boolean;
144
+ /**
145
+ * coverageRejectReason — null when the component IS a covered native read; otherwise a SPECIFIC
146
+ * human-readable reason naming the exact disqualifier and the offending node id. {@link isCoveredShape}
147
+ * is defined as `coverageRejectReason(c) === null`, so the two can never disagree.
148
+ */
149
+ coverageRejectReason(comp: Component): string | null;
150
+ /** isCoveredShape — a covered read SHAPE (typing-independent). */
151
+ isCoveredShape(comp: Component): boolean;
152
+ /** isNativeRaw — a covered read shape that is also fully typed: emitted on the native surface. */
153
+ isNativeRaw(comp: Component): boolean;
154
+ /**
155
+ * assertCovered — the native surface is native-only and fail-closed: a covered shape that lacks the typed
156
+ * annotations, or any component that is not a covered read, is a LOUD generation failure naming the
157
+ * component and its specific reason (never a silently boxed / interpreted component). Returns the
158
+ * components (all of them, when it returns).
159
+ */
160
+ assertCovered(components: readonly Component[]): Component[];
161
+ }
162
+ //# sourceMappingURL=native-coverage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-coverage.d.ts","sourceRoot":"","sources":["../../src/generator/native-coverage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,SAAS,EAA8B,UAAU,EAAE,OAAO,EAA4B,MAAM,gBAAgB,CAAC;AAG3H,OAAO,EAAyE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC3H,OAAO,EAAgG,KAAK,QAAQ,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAEvJ,mGAAmG;AACnG,MAAM,MAAM,SAAS,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AAEvE;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,CAC3B,IAAI,EAAE,OAAO,EACb,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,QAAQ,EACd,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,QAAQ,EAAE,OAAO,GAAG,SAAS,EAC7B,IAAI,EAAE;IAAE,SAAS,CAAC,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;CAAE,KAC5D,IAAI,CAAC;AAEV,8DAA8D;AAC9D,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,EAAE,GAAG,IAAI,CAM9D;AAED,8FAA8F;AAC9F,wBAAgB,iBAAiB,CAAC,CAA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tC,OAAO,CAAC,WAAW;IAKnB;;;;;;;;;;OAUG;IACH,cAAc,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,GAAG,OAAO;IAmC1E;;;;;;;OAOG;IACH,iBAAiB,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,GAAG,OAAO;IAqB7E;;;;OAIG;IACH,oBAAoB,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI;IA0DpD,kEAAkE;IAClE,cAAc,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO;IAIxC,kGAAkG;IAClG,WAAW,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO;IAIrC;;;;;OAKG;IACH,aAAa,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,GAAG,SAAS,EAAE;CAqB7D"}
@@ -0,0 +1,412 @@
1
+ import { isControlGate, mapNodeElemIsOpaqueWire, mapTransformExpr } from "../behavior.js";
2
+ import { GeneratorFailure } from "./core.js";
3
+ import { classifyExpr, execPlan, nodeNarrowedPaths, unguardedUnproducibleReads } from "./straightline.js";
4
+ import { buildTypePlan, deriveTypeRef, findDecl, inputPortIsOptional, inputPortTypeRef, typeRefAtPath } from "./typed.js";
5
+ /** a static `{arr:[…]}` literal's element list, else null. */
6
+ export function staticArrElems(node) {
7
+ if (node === null || typeof node !== "object" || Array.isArray(node))
8
+ return null;
9
+ const keys = Object.keys(node);
10
+ if (keys.length !== 1 || keys[0] !== "arr")
11
+ return null;
12
+ const arg = node.arr;
13
+ return Array.isArray(arg) ? arg : null;
14
+ }
15
+ /** the Expression IR node a {@link StaticExpr} classifies (the inverse of `classifyExpr`). */
16
+ export function reconstructStatic(e) {
17
+ switch (e.kind) {
18
+ case "str":
19
+ return e.value;
20
+ case "bool":
21
+ return e.value;
22
+ case "null":
23
+ return null;
24
+ case "ref":
25
+ return { [e.opt ? "refOpt" : "ref"]: e.path };
26
+ case "concat":
27
+ return { concat: e.parts.map(reconstructStatic) };
28
+ case "dynamic":
29
+ return e.node;
30
+ }
31
+ }
32
+ /** planForComp — a TypePlan for a single component (its named types are component-scoped, so a
33
+ * one-component IR yields the same plan the full-IR build would for this component). */
34
+ export function planForComp(comp) {
35
+ return buildTypePlan({ irVersion: 2, exprVersion: 2, components: [comp] });
36
+ }
37
+ /** mapNodeArrRef — the map node's PRODUCED-ARRAY TypeRef from its `outType`.
38
+ *
39
+ * A map node's `outType` is its ELEMENT type (scp-error.md "Map element type"), so the produced array
40
+ * is `{arr: element}`. This is the same reading the compiler applies when it resolves what a node
41
+ * result reference has (`type-gate`: `"map" in n ? {arr:ot} : ot`) — the emitter follows that SSoT
42
+ * rather than inspecting the annotation's shape, so an element that is ITSELF an `arr` stays
43
+ * expressible (element `arr(T)` produces `arr(arr(T))`). */
44
+ export function mapNodeArrRef(node, plan) {
45
+ const outT = node.outType;
46
+ return deriveTypeRef({ arr: outT }, plan);
47
+ }
48
+ /** buildTypedNodes — the prior-node typed-local TypeRef map for a component (control-gate nodes are
49
+ * typeless; a map node carries its produced-array ref). An untyped node is omitted (not an error here). */
50
+ export function buildTypedNodes(comp, plan) {
51
+ const typedNodes = new Map();
52
+ for (const n of comp.body) {
53
+ if (isControlGate(n))
54
+ continue;
55
+ try {
56
+ typedNodes.set(n.id, "map" in n ? mapNodeArrRef(n, plan) : deriveTypeRef(n.outType, plan));
57
+ }
58
+ catch {
59
+ /* untyped node — omit */
60
+ }
61
+ }
62
+ return typedNodes;
63
+ }
64
+ /**
65
+ * resolveOver — the ONE resolver of a map/fanout `over` to its element TypeRef + source. Two sources (#108):
66
+ * - a ref to a PRIOR BODY NODE's typed `arr` (or `opt(arr)`) field — the element type from that node's
67
+ * result type;
68
+ * - a ref to an INPUT ARRAY port carrying `elemType` — the element type from `PortSchema.elemType`. An
69
+ * input array WITHOUT elemType is not resolved (BC does not infer — consumer-interface C3).
70
+ * `optArr` is true when the over's declared type is `{opt:{arr}}` (a prior-node opt-arr field OR an OPT input
71
+ * array port): a null optional collection iterates EMPTY (#177 (A)), byte-equal to run_behavior. Returns null
72
+ * when the over is neither (the caller fails closed with its own position label). Each emitter renders the
73
+ * native read of the returned {@link OverSource}.
74
+ */
75
+ export function resolveOver(comp, over, typedNodes, plan) {
76
+ const e = classifyExpr(over);
77
+ if (e.kind !== "ref" || e.path.length < 1)
78
+ return null;
79
+ const head = e.path[0];
80
+ if (typedNodes.has(head)) {
81
+ const path = e.path.slice(1);
82
+ const ref = typeRefAtPath(typedNodes.get(head), path, plan);
83
+ if (ref === null)
84
+ return null;
85
+ const source = { kind: "node", head, path };
86
+ if (ref.kind === "arr")
87
+ return { elemRef: ref.elem, optArr: false, source };
88
+ if (ref.kind === "opt" && ref.inner.kind === "arr")
89
+ return { elemRef: ref.inner.elem, optArr: true, source };
90
+ return null;
91
+ }
92
+ if (e.path.length !== 1)
93
+ return null;
94
+ const schema = comp.inputPorts?.[head];
95
+ const et = schema?.elemType;
96
+ // the input port must also be readable as a native value (its declared type has a native lowering).
97
+ if (et === undefined || inputPortTypeRef(schema, plan) === undefined)
98
+ return null;
99
+ return { elemRef: deriveTypeRef(et, plan), optArr: inputPortIsOptional(schema), source: { kind: "input", port: head } };
100
+ }
101
+ /** resolveOverOrFail — {@link resolveOver}, failing closed with the position label when unresolvable. */
102
+ export function resolveOverOrFail(lang, comp, over, typedNodes, plan, nodeId, label) {
103
+ const r = resolveOver(comp, over, typedNodes, plan);
104
+ if (r !== null)
105
+ return r;
106
+ throw new GeneratorFailure("UNSUPPORTED_NODE_STRAIGHTLINE", `${lang} ${label}: '${nodeId}' 'over' must be a ref to a prior node's typed arr field OR an input array port with a declared elemType (got ${JSON.stringify(over)}). BC does not infer input-array element types (consumer-interface C3).`);
107
+ }
108
+ /** fanoutItemsElemRef — a fanout node's connection `items` element type (its outType must be the
109
+ * connection struct `{items: arr(T), cursor}`). */
110
+ export function fanoutItemsElemRef(lang, node, connRef, plan) {
111
+ if (connRef.kind !== "named")
112
+ throw new GeneratorFailure("UNSUPPORTED_NODE_STRAIGHTLINE", `${lang} fanout (v3): node '${node.id}' outType must be a connection struct {items,cursor} (got ${JSON.stringify(connRef.kind)}).`);
113
+ const decl = findDecl(plan, connRef.name);
114
+ const itemsField = decl.fields.find((fd) => fd.name === "items");
115
+ if (!itemsField || itemsField.type.kind !== "arr")
116
+ throw new GeneratorFailure("UNSUPPORTED_NODE_STRAIGHTLINE", `${lang} fanout (v3): node '${node.id}' connection struct '${connRef.name}' has no 'items' array field.`);
117
+ return itemsField.type.elem;
118
+ }
119
+ /** mapElemRowRef — the leaf's per-element RETURN shape for a covered map node: the `into` field's type
120
+ * (into) or the element outType directly (no-into). */
121
+ export function mapElemRowRef(lang, node, arrRef, plan) {
122
+ const m = node.map;
123
+ if (m.into === undefined)
124
+ return arrRef.elem;
125
+ if (arrRef.elem.kind !== "named")
126
+ throw new GeneratorFailure("UNSUPPORTED_NODE_STRAIGHTLINE", `${lang} map (#86 pt2): node '${node.id}' element outType must be a named struct (got ${JSON.stringify(arrRef.elem.kind)}) — the augmented element is the over element plus the '${m.into}' (into) field.`);
127
+ const decl = findDecl(plan, arrRef.elem.name);
128
+ const intoField = decl.fields.find((f) => f.name === m.into);
129
+ if (!intoField)
130
+ throw new GeneratorFailure("UNSUPPORTED_NODE_STRAIGHTLINE", `${lang} map (#86 pt2): element struct '${arrRef.elem.name}' has no '${m.into}' (into) field.`);
131
+ return intoField.type;
132
+ }
133
+ /** mapFanoutElemRef — the per-element leaf return type of a covered map (its {@link mapElemRowRef}) or
134
+ * fanout (the connection items element). */
135
+ export function mapFanoutElemRef(lang, node, typedNodes, plan) {
136
+ const ref = typedNodes.get(node.id);
137
+ if ("fanout" in node)
138
+ return fanoutItemsElemRef(lang, node, ref, plan);
139
+ return mapElemRowRef(lang, node, ref, plan);
140
+ }
141
+ /** A native-raw component MUST be fully typed (outType on every node + outputType). */
142
+ export function isFullyTyped(comp) {
143
+ if (comp.outputType === undefined)
144
+ return false;
145
+ for (const n of comp.body) {
146
+ // #125: a control-gate cond is a typeless skip marker (A3) — it never de-boxes a result, so it is
147
+ // exempt from the "every node carries outType" de-box requirement (matches type-gate's exemption).
148
+ if (isControlGate(n))
149
+ continue;
150
+ if (n.outType === undefined)
151
+ return false;
152
+ }
153
+ return true;
154
+ }
155
+ /** The output must lower to a typed value with no Value-scope read: a ref whose head is a BODY NODE
156
+ * (typed), an obj/arr of native-lowerable outputs, a string/bool/null literal, or a concat of them. A ref
157
+ * to an input param or any other operator is NOT native-lowerable here. */
158
+ export function outputIsNativeLowerable(comp) {
159
+ const bodyIds = new Set(comp.body.map((n) => n.id));
160
+ const walk = (node) => {
161
+ const arr = staticArrElems(node);
162
+ if (arr !== null)
163
+ return arr.every(walk);
164
+ if (node !== null && typeof node === "object" && !Array.isArray(node)) {
165
+ const keys = Object.keys(node);
166
+ if (keys.length === 1 && keys[0] === "obj") {
167
+ const obj = node.obj;
168
+ return Object.keys(obj).every((k) => walk(obj[k]));
169
+ }
170
+ if (keys.length === 1 && keys[0] === "arr")
171
+ return true; // handled by staticArrElems above
172
+ }
173
+ const e = classifyExpr(node);
174
+ if (e.kind === "str" || e.kind === "bool" || e.kind === "null")
175
+ return true;
176
+ // ref OR refOpt to a body node (typed). refOpt is how a produced-aware output reads a skippable
177
+ // relation child: the head node's produced flag gates it, yielding opt-nil when unproduced.
178
+ if (e.kind === "ref")
179
+ return bodyIds.has(e.path[0]); // must ref a body node (typed), not input
180
+ if (e.kind === "concat")
181
+ return e.parts.every((p) => walk(reconstructStatic(p)));
182
+ return false;
183
+ };
184
+ return walk(comp.output);
185
+ }
186
+ /**
187
+ * NativeCoverage — the coverage rule bound to one language's {@link PortLowerProbe}. `lang` labels the
188
+ * per-node messages (`go` / `rust` / `python` / `php`); `surface` labels the aggregated fail-closed
189
+ * failure (e.g. `go typed-native`).
190
+ */
191
+ export class NativeCoverage {
192
+ lang;
193
+ surface;
194
+ probe;
195
+ constructor(lang, surface, probe) {
196
+ this.lang = lang;
197
+ this.surface = surface;
198
+ this.probe = probe;
199
+ }
200
+ /** portIsStatic — the ELIGIBILITY gate ASKS the language's port lowering whether it can lower this port,
201
+ * rather than re-deriving the shape rules — so the gate and the emitter can never disagree. #170: with the
202
+ * SAME node narrowing; #173: with the SAME declared `expected` port type. */
203
+ portIsStatic(node, comp, plan, typedNodes, expected, asBinding, narrowed) {
204
+ try {
205
+ this.probe(node, comp, plan, typedNodes, expected, { asBinding, narrowed });
206
+ return true;
207
+ }
208
+ catch (e) {
209
+ if (!(e instanceof GeneratorFailure))
210
+ throw e;
211
+ return false;
212
+ }
213
+ }
214
+ /** the `as` element binding of a map/fanout node's element ports, or undefined when the over source does
215
+ * not resolve (an uncovered node). */
216
+ elemBinding(comp, as, over, typedNodes, plan) {
217
+ const r = resolveOver(comp, over, typedNodes, plan);
218
+ return r === null ? undefined : { name: as, ref: r.elemRef, plan };
219
+ }
220
+ /**
221
+ * coveredMapNode — the covered map shape. A `map` node whose:
222
+ * - over is a static ref (to a prior node's typed collection field OR an input array with elemType),
223
+ * - every element port is static (lowers to its declared port type in the element scope),
224
+ * - element outType is declared (a compound / opaque-wire element for a component map; any type the
225
+ * declared materializer builds for a pure-transform map — #225),
226
+ * - relationKind connection or absent (every Error Policy Kind is covered).
227
+ * A `map...into` ALWAYS has a well-defined unproduced value for the into field (#177/#182/#232 — the type
228
+ * gate `mapIntoHoldsUnproduced` rejects anything else before an emitter sees it), so the augmented list is
229
+ * homogeneous by construction, EXACTLY run_behavior's applyInto.
230
+ */
231
+ coveredMapNode(n, bodyIds, comp) {
232
+ if (n === null || typeof n !== "object" || !("map" in n))
233
+ return false;
234
+ const m = n.map;
235
+ if (m.relationKind !== undefined && m.relationKind !== "connection")
236
+ return false;
237
+ // A map node's outType is its ELEMENT type (authoring.ts recordMap); a map WITHOUT outType is uncovered.
238
+ // bc#164: an OPAQUE ELEMENT (`outType:"value"` on an output-passthrough map — mapNodeElemIsOpaqueWire)
239
+ // IS covered: each element wire is stored AS-IS in the produced list (no de-box, no per-op re-box).
240
+ // #225: a pure-transform map's element is BUILT from the expression natively (no wire, no de-box), so a
241
+ // scalar element type is covered too — a materializer that cannot build it fails closed at emission.
242
+ const outT = n.outType;
243
+ const isTransformMap = mapTransformExpr(m) !== undefined;
244
+ if (outT === undefined)
245
+ return false;
246
+ if (!isTransformMap && typeof outT !== "object" && !mapNodeElemIsOpaqueWire(n))
247
+ return false;
248
+ // `over` element type must be STATICALLY resolvable (resolveOver — a prior node's typed arr field OR an
249
+ // input array with elemType; #177 (A): an OPT input array is covered, its null iterates EMPTY).
250
+ const overE = classifyExpr(m.over);
251
+ if (overE.kind !== "ref")
252
+ return false;
253
+ const head = overE.path[0];
254
+ if (!bodyIds.has(head)) {
255
+ if (overE.path.length !== 1)
256
+ return false;
257
+ const schema = comp.inputPorts?.[head];
258
+ if (schema === undefined || schema.elemType === undefined)
259
+ return false;
260
+ }
261
+ // A pure-transform map (#222) has no ports: its coverage condition is that the element expression
262
+ // materializes to the declared element type, which fails loudly in the emitter's materializer.
263
+ const ports = (m.ports ?? {});
264
+ const plan = planForComp(comp);
265
+ const typedNodes = buildTypedNodes(comp, plan);
266
+ const asBinding = this.elemBinding(comp, n.map.as, m.over, typedNodes, plan);
267
+ const narrowed = nodeNarrowedPaths(comp, n);
268
+ const mSchemas = m.portSchemas;
269
+ for (const p of Object.keys(ports))
270
+ if (!this.portIsStatic(ports[p], comp, plan, typedNodes, inputPortTypeRef(mSchemas?.[p], plan), asBinding, narrowed))
271
+ return false;
272
+ return true;
273
+ }
274
+ /**
275
+ * coveredFanoutNode (v3) — a FANOUT node (first-class `@refs` id-list fan-out) is covered when:
276
+ * - over is a static ref to a PRIOR BODY NODE's typed arr field OR an INPUT array port with elemType,
277
+ * - every element port is static (lowers to its declared port type in the element scope),
278
+ * - relationKind connection; every Error Policy Kind is covered.
279
+ * The fanout lowers to: one deduped batched dispatch → first-seen dedupe (by the elem's dedupeKey field)
280
+ * + dangling drop + implicitSource strip + connection wrap {items, cursor:null}.
281
+ */
282
+ coveredFanoutNode(n, bodyIds, comp) {
283
+ if (n === null || typeof n !== "object" || !("fanout" in n))
284
+ return false;
285
+ const f = n.fanout;
286
+ if (f.relationKind !== "connection")
287
+ return false;
288
+ const overE = classifyExpr(f.over);
289
+ if (overE.kind !== "ref")
290
+ return false;
291
+ const head = overE.path[0];
292
+ if (!bodyIds.has(head)) {
293
+ if (overE.path.length !== 1)
294
+ return false;
295
+ const schema = comp.inputPorts?.[head];
296
+ if (schema === undefined || schema.elemType === undefined)
297
+ return false;
298
+ }
299
+ const ports = f.ports;
300
+ const plan = planForComp(comp);
301
+ const typedNodes = buildTypedNodes(comp, plan);
302
+ const asBinding = this.elemBinding(comp, n.fanout.as, f.over, typedNodes, plan);
303
+ const fSchemas = f.portSchemas;
304
+ for (const p of Object.keys(ports))
305
+ if (!this.portIsStatic(ports[p], comp, plan, typedNodes, inputPortTypeRef(fSchemas?.[p], plan), asBinding))
306
+ return false;
307
+ return true;
308
+ }
309
+ /**
310
+ * coverageRejectReason — null when the component IS a covered native read; otherwise a SPECIFIC
311
+ * human-readable reason naming the exact disqualifier and the offending node id. {@link isCoveredShape}
312
+ * is defined as `coverageRejectReason(c) === null`, so the two can never disagree.
313
+ */
314
+ coverageRejectReason(comp) {
315
+ const crPlan = planForComp(comp);
316
+ const crTypedNodes = buildTypedNodes(comp, crPlan);
317
+ const ep = execPlan(comp);
318
+ if (ep === null)
319
+ return "component is not a straight-line/staged sequential exec plan (no static exec plan)";
320
+ // A parallel-stage member must be a componentRef node so the static parallel orchestration is a clean
321
+ // fan-out — the bounded-concurrency error-precedence protocol is proven for that shape. #114: a
322
+ // bindField relation child IS covered inside a parallel stage (its bound-key skip-gate is preflighted per
323
+ // member from the settled parent BEFORE dispatch). #125/#108: a cond node IS allowed as a parallel-stage
324
+ // member — a pure Expression (no dispatch), evaluated in preflight ascending order. #225: a pure-transform
325
+ // map likewise (no handler, no boxed result).
326
+ for (const [i] of ep.parallelStageOf) {
327
+ const n = comp.body[i];
328
+ if ("cond" in n)
329
+ continue;
330
+ if ("map" in n && mapTransformExpr(n.map) !== undefined)
331
+ continue;
332
+ if (!("component" in n))
333
+ return `node '${n.id}' is a non-componentRef member of a parallel stage (not native-covered)`;
334
+ }
335
+ const bodyIds = new Set(comp.body.map((b) => b.id));
336
+ for (const n of comp.body) {
337
+ // A read of a node that can be unproduced at that point (scp-error.md "Dependency rules for continue":
338
+ // the interpreters read its unproduced value — null, or NULL_REF through it) has no native lowering:
339
+ // the native read takes the node's result as produced. Fail closed.
340
+ const unguarded = unguardedUnproducibleReads(comp, n);
341
+ if (unguarded.length > 0)
342
+ return `node '${n.id}' reads node '${unguarded[0]}', which can be unproduced when '${n.id}' reads it — the unproduced read is not native-covered`;
343
+ if ("cond" in n) {
344
+ // #125: a when(...) control-gate cond is a skip marker with no output data type — no outType needed.
345
+ if (isControlGate(n))
346
+ continue;
347
+ // #108: a DATA-JOIN cond node (Φ merge) is native-covered — its if/then/else compile through the
348
+ // native expression compiler (a non-compilable expression fails closed at emission). It requires
349
+ // outType (the join value is typed — only a control gate is exempt).
350
+ if (n.outType === undefined)
351
+ return `node '${n.id}' cond has no outType (required to de-box the branch join)`;
352
+ continue;
353
+ }
354
+ if ("fanout" in n) {
355
+ if (!this.coveredFanoutNode(n, bodyIds, comp))
356
+ return `node '${n.id}' is a non-covered fanout shape (over an input array without elemType, or a dynamic element port)`;
357
+ continue;
358
+ }
359
+ if ("map" in n) {
360
+ if (!this.coveredMapNode(n, bodyIds, comp))
361
+ return `node '${n.id}' is a non-covered map shape (guard+into heterogeneous, or over an input array without elemType)`;
362
+ continue;
363
+ }
364
+ if (!("component" in n))
365
+ return `node '${n.id}' is not a componentRef, map, or cond node (not native-covered)`;
366
+ const cr = n;
367
+ // Every Error Policy Kind IS covered on a componentRef (`continue` → unproduced, rendered by the
368
+ // produced-aware output lowering; `retry` shares `fail`'s control flow with the Kind named). A relation
369
+ // child WITH bindField IS covered (#86 pt1 / #93 shape 1): unproduced → null / the empty connection.
370
+ if (cr.relationKind !== undefined && cr.relationKind !== "connection")
371
+ return `relationKind '${cr.relationKind}' not native-covered (node '${n.id}')`;
372
+ // #170: a control-gate child's ports may narrow a gate-proven opt ref to non-null (the (a3) gated read).
373
+ const crNarrowed = nodeNarrowedPaths(comp, cr);
374
+ for (const p of Object.keys(cr.ports))
375
+ if (!this.portIsStatic(cr.ports[p], comp, crPlan, crTypedNodes, inputPortTypeRef(cr.portSchemas?.[p], crPlan), undefined, crNarrowed))
376
+ return `node '${n.id}' port '${p}' is not statically resolvable`;
377
+ }
378
+ if (!outputIsNativeLowerable(comp))
379
+ return "output is not natively lowerable";
380
+ return null;
381
+ }
382
+ /** isCoveredShape — a covered read SHAPE (typing-independent). */
383
+ isCoveredShape(comp) {
384
+ return this.coverageRejectReason(comp) === null;
385
+ }
386
+ /** isNativeRaw — a covered read shape that is also fully typed: emitted on the native surface. */
387
+ isNativeRaw(comp) {
388
+ return this.isCoveredShape(comp) && isFullyTyped(comp);
389
+ }
390
+ /**
391
+ * assertCovered — the native surface is native-only and fail-closed: a covered shape that lacks the typed
392
+ * annotations, or any component that is not a covered read, is a LOUD generation failure naming the
393
+ * component and its specific reason (never a silently boxed / interpreted component). Returns the
394
+ * components (all of them, when it returns).
395
+ */
396
+ assertCovered(components) {
397
+ for (const comp of components) {
398
+ if (this.isCoveredShape(comp) && !isFullyTyped(comp))
399
+ throw new GeneratorFailure("UNSUPPORTED_NODE_STRAIGHTLINE", `${this.lang} native: component '${comp.name}' is a covered read shape but lacks outType/outputType on every node — the native emitter de-boxes each RESULT into the node's declared outType, so a covered read MUST be fully typed (bc#45). Add the outType annotations, or generate this component with a literal (interpreter) emitter (typescript / python / php).`);
400
+ }
401
+ const nonNative = components.filter((c) => !this.isNativeRaw(c));
402
+ if (nonNative.length > 0) {
403
+ const rejects = nonNative.map((c) => ` - component '${c.name}': ${this.coverageRejectReason(c) ?? "not a covered native read"}`).join("\n");
404
+ throw new GeneratorFailure("UNSUPPORTED_NODE_STRAIGHTLINE", `${this.surface} (native codegen) surface: ${nonNative.length} component(s) are NOT a covered native read:\n${rejects}\n\n` +
405
+ `The native codegen surface is native-only and fail-closed: it does not silently box or interpret ` +
406
+ `uncovered shapes. Implement native coverage for this shape, fix the spec if the shape is genuinely ` +
407
+ `runtime-dynamic, or generate this component with a literal (interpreter) emitter (typescript / python / php).`);
408
+ }
409
+ return [...components];
410
+ }
411
+ }
412
+ //# sourceMappingURL=native-coverage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-coverage.js","sourceRoot":"","sources":["../../src/generator/native-coverage.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,iBAAiB,EAAE,0BAA0B,EAAmB,MAAM,mBAAmB,CAAC;AAC3H,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,aAAa,EAA+B,MAAM,YAAY,CAAC;AAqBvJ,8DAA8D;AAC9D,MAAM,UAAU,cAAc,CAAC,IAAa;IAC1C,IAAI,IAAI,KAAK,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAClF,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAA+B,CAAC,CAAC;IAC1D,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,KAAK;QAAE,OAAO,IAAI,CAAC;IACxD,MAAM,GAAG,GAAI,IAAgC,CAAC,GAAG,CAAC;IAClD,OAAO,KAAK,CAAC,OA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AC,MAAM,GAAG,CAAC,EAAE,CAAC;YACzB,MAAM,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,CAAC,IAAI,MAAM,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,2BAA2B,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC7I,MAAM,IAAI,gBAAgB,CACxB,+BAA+B,EAC/B,GAAG,IAAI,CAAC,OAAO,8BAA8B,SAAS,CAAC,MAAM,iDAAiD,OAAO,MAAM;gBACzH,mGAAmG;gBACnG,qGAAqG;gBACrG,+GAA+G,CAClH,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,GAAG,UAAU,CAAC,CAAC;IACzB,CAAC;CACF"}
@@ -25,7 +25,7 @@ export interface Compiled {
25
25
  */
26
26
  export interface NativeExprBackend {
27
27
  /** language tag (for error messages). */
28
- lang: "go" | "rust";
28
+ lang: "go" | "rust" | "python" | "php";
29
29
  /** a fresh unique temp identifier for a hoisted fallible result. */
30
30
  freshTemp(): string;
31
31
  /** render a TypeRef to the native type name (renderTypeRef). */