/** GENERATED — do not edit by hand. * * Source of truth: packages/core/src/eligibility-taxonomy.json (human-edited). * Regenerate with: node scripts/generate-eligibility-taxonomy-module.mjs * * Grammar-sovereignty phase 2 (taxonomy AUTHORITY inversion): this typed * `as const` is the PRODUCTION authority source the eligibility classifier * validates its emitted reason strings against — it replaced the former * runtime `node:fs` JSON read. A sync test pins this const to the JSON. */ export declare const ELIGIBILITY_TAXONOMY: { readonly $schema: "declarative eligibility taxonomy — production authority (phase 2)"; readonly description: "CURRENT behavior of the native-eligibility classifier, transcribed from native-eligibility-ast.ts / closure-eligibility.ts / instanceof-rhs.ts. Reason-keyed rows (verdict eligible|ineligible) are snapshot-verified against the golden corpus AND consumed in production as the authority for emitted reasons (native-eligibility-ast.ts reject(), via the generated eligibility-taxonomy.generated.ts — no fs at runtime); contextual rows (verdict contextual, when:[imperative]) describe surface constructs whose verdict depends on shape predicates a flat row cannot evaluate — the phase-2.5 (deterministic-row extraction) backlog."; readonly rows: [{ readonly construct: "bare-block"; readonly verdict: "ineligible"; readonly reason: "bare-block"; readonly rationale: "A bare `{ … }` block statement has no body-stmt form."; }, { readonly construct: "block-bodied-arrow"; readonly verdict: "contextual"; readonly rationale: "A block-bodied arrow is eligible only when every statement is in the closure accept set (let/const/return/expr/if) with no rejected construct (this/await/loop/…); otherwise one of the closure-* reasons. Verdict depends on the whole block."; readonly when: ["imperative"]; }, { readonly construct: "break-labeled"; readonly verdict: "ineligible"; readonly reason: "break-labeled"; readonly rationale: "A labeled `break` has no body-stmt form."; }, { readonly construct: "break-outside-loop"; readonly verdict: "ineligible"; readonly reason: "break-outside-loop"; readonly rationale: "A `break` outside any loop context."; }, { readonly construct: "closure-assign-value-position"; readonly verdict: "ineligible"; readonly reason: "closure-assign-value-position"; readonly rationale: "A value-position assignment (e.g. const y = (x = 5)) inside a block-bodied arrow."; }, { readonly construct: "closure-await"; readonly verdict: "ineligible"; readonly reason: "closure-await"; readonly rationale: "An `await` inside a block-bodied arrow — v1 closures are synchronous."; }, { readonly construct: "closure-break-continue"; readonly verdict: "ineligible"; readonly reason: "closure-break-continue"; readonly rationale: "A `break`/`continue` inside a block-bodied arrow."; }, { readonly construct: "closure-class"; readonly verdict: "ineligible"; readonly reason: "closure-class"; readonly rationale: "A class declaration/expression inside a block-bodied arrow."; }, { readonly construct: "closure-destructure"; readonly verdict: "ineligible"; readonly reason: "closure-destructure"; readonly rationale: "A destructuring declaration inside a block-bodied arrow."; }, { readonly construct: "closure-incdec-value-position"; readonly verdict: "ineligible"; readonly reason: "closure-incdec-value-position"; readonly rationale: "A value-position ++/-- (e.g. arr.push(x++)) inside a block-bodied arrow."; }, { readonly construct: "closure-labeled"; readonly verdict: "ineligible"; readonly reason: "closure-labeled"; readonly rationale: "A labeled statement inside a block-bodied arrow."; }, { readonly construct: "closure-loop"; readonly verdict: "ineligible"; readonly reason: "closure-loop"; readonly rationale: "Any loop (for/for-of/for-in/while/do) inside a block-bodied arrow — v1 closures reject loops."; }, { readonly construct: "closure-nested-function"; readonly verdict: "ineligible"; readonly reason: "closure-nested-function"; readonly rationale: "A nested arrow/function/function-declaration inside a block-bodied arrow."; }, { readonly construct: "closure-parse-error"; readonly verdict: "ineligible"; readonly reason: "closure-parse-error"; readonly rationale: "A raw closure block that does not parse as a single function body block."; }, { readonly construct: "closure-spread"; readonly verdict: "ineligible"; readonly reason: "closure-spread"; readonly rationale: "A spread element/assignment inside a block-bodied arrow."; }, { readonly construct: "closure-switch"; readonly verdict: "ineligible"; readonly reason: "closure-switch"; readonly rationale: "A `switch` inside a block-bodied arrow."; }, { readonly construct: "closure-this"; readonly verdict: "ineligible"; readonly reason: "closure-this"; readonly rationale: "A `this` usage (incl. a this-rooted assignment target) inside a block-bodied arrow."; }, { readonly construct: "closure-throw"; readonly verdict: "ineligible"; readonly reason: "closure-throw"; readonly rationale: "A `throw` inside a block-bodied arrow."; }, { readonly construct: "closure-try"; readonly verdict: "ineligible"; readonly reason: "closure-try"; readonly rationale: "A `try` inside a block-bodied arrow."; }, { readonly construct: "closure-uninitialized-decl"; readonly verdict: "ineligible"; readonly reason: "closure-uninitialized-decl"; readonly rationale: "An uninitialised `let`/`const` inside a block-bodied arrow."; }, { readonly construct: "closure-unsupported-assign-target"; readonly verdict: "ineligible"; readonly reason: "closure-unsupported-assign-target"; readonly rationale: "A destructuring/parenthesized assignment target inside a block-bodied arrow (fail-closed)."; }, { readonly construct: "closure-unsupported-operator"; readonly verdict: "ineligible"; readonly reason: "closure-unsupported-operator"; readonly rationale: "An assignment operator outside {=,+=,-=,*=,/=,%=} inside a block-bodied arrow."; }, { readonly construct: "closure-unsupported-stmt-"; readonly verdict: "ineligible"; readonly reason: "closure-unsupported-stmt-"; readonly rationale: "A statement outside the closure accept set (let/const/return/expr/if) inside a block-bodied arrow."; }, { readonly construct: "closure-var"; readonly verdict: "ineligible"; readonly reason: "closure-var"; readonly rationale: "A `var` declaration inside a block-bodied arrow."; }, { readonly construct: "closure-with"; readonly verdict: "ineligible"; readonly reason: "closure-with"; readonly rationale: "A `with` statement inside a block-bodied arrow."; }, { readonly construct: "closure-yield"; readonly verdict: "ineligible"; readonly reason: "closure-yield"; readonly rationale: "A `yield` inside a block-bodied arrow."; }, { readonly construct: "comments-present"; readonly verdict: "ineligible"; readonly reason: "comments-present"; readonly rationale: "A comment that does not sit at a migratable statement boundary; the migrator would drop it, so the body is rejected."; }, { readonly construct: "continue-labeled"; readonly verdict: "ineligible"; readonly reason: "continue-labeled"; readonly rationale: "A labeled `continue` has no body-stmt form."; }, { readonly construct: "continue-outside-loop"; readonly verdict: "ineligible"; readonly reason: "continue-outside-loop"; readonly rationale: "A `continue` outside any loop context."; }, { readonly construct: "do-while-stmt"; readonly verdict: "ineligible"; readonly reason: "do-while-stmt"; readonly rationale: "A `do…while` statement has no body-stmt form."; }, { readonly construct: "empty"; readonly verdict: "eligible"; readonly rationale: "A whitespace-only body is trivially eligible (classifyHandlerBodyAst returns reason \"empty\")."; }, { readonly construct: "expr-stmt-assignment"; readonly verdict: "ineligible"; readonly reason: "expr-stmt-assignment"; readonly rationale: "A compound assignment operator outside the supported set (e.g. logical &&=/??=)."; }, { readonly construct: "expr-stmt-bad-assign-target"; readonly verdict: "ineligible"; readonly reason: "expr-stmt-bad-assign-target"; readonly rationale: "An assignment target that is not a valid KERN assignment target (e.g. optional-chained)."; }, { readonly construct: "expr-stmt-bad-assign-value"; readonly verdict: "ineligible"; readonly reason: "expr-stmt-bad-assign-value"; readonly rationale: "An assignment value that is not a valid KERN assignment value."; }, { readonly construct: "expr-stmt-bad-expr"; readonly verdict: "ineligible"; readonly reason: "expr-stmt-bad-expr"; readonly rationale: "An expression statement that is not a valid KERN expression (e.g. comma expression)."; }, { readonly construct: "expr-stmt-mutation"; readonly verdict: "ineligible"; readonly reason: "expr-stmt-mutation"; readonly rationale: "A prefix ++/-- whose source text the migrator cannot byte-reproduce (postfix is accepted)."; }, { readonly construct: "expression-statement"; readonly verdict: "contextual"; readonly rationale: "An expression statement is eligible as a plain call/valid expression, a supported (compound) assignment, or a postfix ++/--; otherwise one of the expr-stmt-* reasons. Verdict depends on the expression shape."; readonly when: ["imperative"]; }, { readonly construct: "for-of-async-entry"; readonly verdict: "ineligible"; readonly reason: "for-of-async-entry"; readonly rationale: "A `for await` key-only/value-only entry binding — unsupported."; }, { readonly construct: "for-of-async-object-entries"; readonly verdict: "ineligible"; readonly reason: "for-of-async-object-entries"; readonly rationale: "A `for await` over Object.entries(...) — unsupported async-entry shape."; }, { readonly construct: "for-of-bad-expr"; readonly verdict: "ineligible"; readonly reason: "for-of-bad-expr"; readonly rationale: "The for-of iterable expression is not a valid KERN expression."; }, { readonly construct: "for-of-bad-type"; readonly verdict: "ineligible"; readonly reason: "for-of-bad-type"; readonly rationale: "A for-of binding type annotation that is not a valid KERN type annotation."; }, { readonly construct: "for-of-destructure"; readonly verdict: "ineligible"; readonly reason: "for-of-destructure"; readonly rationale: "A for-of object-destructuring binding (only [k]/[k,v]/[,v] array patterns lift)."; }, { readonly construct: "for-of-destructure-type"; readonly verdict: "ineligible"; readonly reason: "for-of-destructure-type"; readonly rationale: "A type annotation on a for-of destructuring binding is unsupported."; }, { readonly construct: "for-of-empty-body"; readonly verdict: "ineligible"; readonly reason: "for-of-empty-body"; readonly rationale: "An empty for-of block body has nothing to emit."; }, { readonly construct: "for-of-init"; readonly verdict: "ineligible"; readonly reason: "for-of-init"; readonly rationale: "A for-of declarator carrying an initializer."; }, { readonly construct: "for-of-loop"; readonly verdict: "contextual"; readonly rationale: "A `for…of` is eligible only as a const, single-declarator, non-empty braced loop over a valid iterable with a supported binding shape; otherwise one of the for-of-* reasons. Verdict depends on header + body shape."; readonly when: ["imperative"]; }, { readonly construct: "for-of-multi-decl"; readonly verdict: "ineligible"; readonly reason: "for-of-multi-decl"; readonly rationale: "A for-of with more than one declarator."; }, { readonly construct: "for-of-non-block"; readonly verdict: "ineligible"; readonly reason: "for-of-non-block"; readonly rationale: "A non-block for-of body (`for (...) stmt;`); `each` always braces (strict mode)."; }, { readonly construct: "for-of-non-const"; readonly verdict: "ineligible"; readonly reason: "for-of-non-const"; readonly rationale: "A for-of whose binding is not `const`."; }, { readonly construct: "for-of-non-decl"; readonly verdict: "ineligible"; readonly reason: "for-of-non-decl"; readonly rationale: "A for-of whose initializer is not a variable declaration list."; }, { readonly construct: "for-of-sync-pair"; readonly verdict: "ineligible"; readonly reason: "for-of-sync-pair"; readonly rationale: "A sync key-only/value-only binding not over Object.entries(...) (only entries=true emits those modes)."; }, { readonly construct: "for-stmt"; readonly verdict: "ineligible"; readonly reason: "for-stmt"; readonly rationale: "A C-style `for` / `for-in` statement has no body-stmt form."; }, { readonly construct: "foreign-by-design"; readonly verdict: "ineligible"; readonly reason: "foreign-by-design"; readonly rationale: "Host-interop surface (res/process/db/req?., import(), useEffect, fetch, new Pool/AbortController) — stays a foreign boundary."; }, { readonly construct: "handler-body"; readonly verdict: "contextual"; readonly rationale: "The whole handler body is eligible only when it parses, is not a host-interop/template/comment boundary, and every top-level statement is eligible. The aggregate verdict is the conjunction of all per-statement verdicts."; readonly when: ["imperative"]; }, { readonly construct: "if-bad-cond"; readonly verdict: "ineligible"; readonly reason: "if-bad-cond"; readonly rationale: "The if-condition is not a valid KERN expression."; }, { readonly construct: "if-non-block-else"; readonly verdict: "ineligible"; readonly reason: "if-non-block-else"; readonly rationale: "A non-block, non-else-if else-branch (`else stmt;`) would lose byte-equivalence (strict mode)."; }, { readonly construct: "if-non-block-then"; readonly verdict: "ineligible"; readonly reason: "if-non-block-then"; readonly rationale: "A non-block then-branch (`if (c) stmt;`) would lose byte-equivalence; the emitter always braces (strict mode)."; }, { readonly construct: "if-statement"; readonly verdict: "contextual"; readonly rationale: "An `if` is eligible only with a valid condition AND braced (or else-if) branches whose statements are all themselves eligible; otherwise if-bad-cond / if-non-block-then / if-non-block-else. Verdict depends on branch shape."; readonly when: ["imperative"]; }, { readonly construct: "instanceof-expression"; readonly verdict: "contextual"; readonly rationale: "An `instanceof` is eligible when its RHS is an identifier outside the reject set or a qualified member name; otherwise one of the instanceof-rhs-* reasons. Verdict depends on the RHS shape."; readonly when: ["imperative"]; }, { readonly construct: "instanceof-rhs-not-a-type-name"; readonly verdict: "ineligible"; readonly reason: "instanceof-rhs-not-a-type-name"; readonly rationale: "An instanceof RHS that is not an identifier or qualified member name (call/literal/binary)."; }, { readonly construct: "instanceof-rhs-unsupported-builtin"; readonly verdict: "ineligible"; readonly reason: "instanceof-rhs-unsupported-builtin"; readonly rationale: "A built-in RHS with no verified cross-target host mapping (Object/Date/Map/Set/…)."; }, { readonly construct: "instanceof-rhs-wrapper-rejected"; readonly verdict: "ineligible"; readonly reason: "instanceof-rhs-wrapper-rejected"; readonly rationale: "A primitive-wrapper RHS (String/Number/Boolean) — the wrapper-parity trap; fail-closed."; }, { readonly construct: "ok"; readonly verdict: "eligible"; readonly rationale: "Every top-level statement (and nested if/try branch) maps to a body-statement form the migrator can emit."; }, { readonly construct: "return-bad-expr"; readonly verdict: "ineligible"; readonly reason: "return-bad-expr"; readonly rationale: "The returned expression is not a valid KERN expression."; }, { readonly construct: "return-template-escapes"; readonly verdict: "ineligible"; readonly reason: "return-template-escapes"; readonly rationale: "A returned template literal carrying a TS-only escape that diverges cross-target."; }, { readonly construct: "return-template-multiline"; readonly verdict: "ineligible"; readonly reason: "return-template-multiline"; readonly rationale: "A returned template literal containing a raw newline."; }, { readonly construct: "switch-stmt"; readonly verdict: "ineligible"; readonly reason: "switch-stmt"; readonly rationale: "A `switch` statement has no body-stmt form."; }, { readonly construct: "template-literal-initializer"; readonly verdict: "contextual"; readonly rationale: "A template-literal const/return is eligible when single-line with only cross-target-safe escapes; otherwise *-template-multiline / *-template-escapes. Verdict depends on the literal contents."; readonly when: ["imperative"]; }, { readonly construct: "template-placeholder"; readonly verdict: "ineligible"; readonly reason: "template-placeholder"; readonly rationale: "A {{ ident }} mustache placeholder in an unparseable body — a templating boundary, not a lift gap."; }, { readonly construct: "throw-bad-expr"; readonly verdict: "ineligible"; readonly reason: "throw-bad-expr"; readonly rationale: "The thrown expression is not a valid KERN expression."; }, { readonly construct: "try-destruct-catch"; readonly verdict: "ineligible"; readonly reason: "try-destruct-catch"; readonly rationale: "A destructuring catch binding (`catch ({ e })`) cannot map to the body-stmt catch name."; }, { readonly construct: "try-statement"; readonly verdict: "contextual"; readonly rationale: "A `try` is eligible with catch and/or finally, an identifier-named catch binding, and eligible branch bodies; a destructuring catch is try-destruct-catch and a catch/finally-less try is a parse error. Verdict depends on clause shape."; readonly when: ["imperative"]; }, { readonly construct: "ts-parse-error"; readonly verdict: "ineligible"; readonly reason: "ts-parse-error"; readonly rationale: "The body fails to parse as TypeScript and matches no foreign/template boundary — not migratable."; }, { readonly construct: "unsupported-stmt-"; readonly verdict: "ineligible"; readonly reason: "unsupported-stmt-"; readonly rationale: "Any other statement kind (import/export-default-less/enum/interface/labeled/debugger/…) surfaces its SyntaxKind name."; }, { readonly construct: "var-bad-expr"; readonly verdict: "ineligible"; readonly reason: "var-bad-expr"; readonly rationale: "The initializer expression is not a valid KERN expression."; }, { readonly construct: "var-bad-type"; readonly verdict: "ineligible"; readonly reason: "var-bad-type"; readonly rationale: "The declared type annotation is not a valid KERN type annotation (round-trip-unsafe)."; }, { readonly construct: "var-destructure"; readonly verdict: "ineligible"; readonly reason: "var-destructure"; readonly rationale: "A destructuring binding whose shape the migrator cannot emit (incl. uninitialised destructure)."; }, { readonly construct: "var-destructure-bad-expr"; readonly verdict: "ineligible"; readonly reason: "var-destructure-bad-expr"; readonly rationale: "A destructuring initializer that is not a valid KERN expression."; }, { readonly construct: "var-destructure-computed"; readonly verdict: "ineligible"; readonly reason: "var-destructure-computed"; readonly rationale: "A computed property name ([k]) in a destructuring pattern is unsupported."; }, { readonly construct: "var-destructure-default"; readonly verdict: "ineligible"; readonly reason: "var-destructure-default"; readonly rationale: "A default value (= 1) on a destructuring element is unsupported."; }, { readonly construct: "var-destructure-empty"; readonly verdict: "ineligible"; readonly reason: "var-destructure-empty"; readonly rationale: "An empty destructuring pattern ({} / []) binds nothing."; }, { readonly construct: "var-destructure-nested"; readonly verdict: "ineligible"; readonly reason: "var-destructure-nested"; readonly rationale: "A nested destructuring pattern is unsupported."; }, { readonly construct: "var-destructure-rest"; readonly verdict: "ineligible"; readonly reason: "var-destructure-rest"; readonly rationale: "A rest element (...rest) in a destructuring pattern is unsupported."; }, { readonly construct: "var-multi-decl"; readonly verdict: "ineligible"; readonly reason: "var-multi-decl"; readonly rationale: "A declaration list with more than one declarator cannot map to a single body-stmt."; }, { readonly construct: "var-non-const"; readonly verdict: "ineligible"; readonly reason: "var-non-const"; readonly rationale: "A `var` declaration; only `const`/`let` lift."; }, { readonly construct: "var-template-escapes"; readonly verdict: "ineligible"; readonly reason: "var-template-escapes"; readonly rationale: "A template-literal initializer carrying a TS-only escape (e.g. \\u{NNNN}) that diverges cross-target."; }, { readonly construct: "var-template-multiline"; readonly verdict: "ineligible"; readonly reason: "var-template-multiline"; readonly rationale: "A template-literal initializer containing a raw newline cannot sit in a KERN attribute value."; }, { readonly construct: "variable-declaration"; readonly verdict: "contextual"; readonly rationale: "A `let`/`const` is eligible only when single-declarator, identifier- or simple-pattern-named, with a valid type and a valid (or template) initializer; otherwise one of the var-* reasons. Verdict depends on declarator shape."; readonly when: ["imperative"]; }, { readonly construct: "while-bad-cond"; readonly verdict: "ineligible"; readonly reason: "while-bad-cond"; readonly rationale: "The while-condition is not a valid KERN expression."; }, { readonly construct: "while-empty-body"; readonly verdict: "ineligible"; readonly reason: "while-empty-body"; readonly rationale: "An empty while block body has nothing to emit."; }, { readonly construct: "while-loop"; readonly verdict: "contextual"; readonly rationale: "A `while` is eligible only with a valid condition and a non-empty braced body; otherwise while-bad-cond / while-non-block / while-empty-body. Verdict depends on body shape."; readonly when: ["imperative"]; }, { readonly construct: "while-non-block"; readonly verdict: "ineligible"; readonly reason: "while-non-block"; readonly rationale: "A non-block while body (`while (c) stmt;`); the emitter always braces (strict mode)."; }]; };