Skip to content

[TS PBT] Bind compiler-owned numeric result observations - #584

Open
CaelmBleidd wants to merge 2 commits into
caelmbleidd/pbt-dsl-local-capturefrom
caelmbleidd/pbt-dsl-local-binding
Open

CaelmBleidd wants to merge 2 commits into
caelmbleidd/pbt-dsl-local-capturefrom
caelmbleidd/pbt-dsl-local-binding

Conversation

@CaelmBleidd

@CaelmBleidd CaelmBleidd commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Compiler-owned numeric result observations can now be bound to one original EtsIR assignment after its value is stored. The binder verifies the retained DSL program, reproduces the complete generated wrapper from its recorded module resolutions, checks the original native receipt and input snapshot, and locates the declared numeric stores in both the predicate and diagnostic companion.

val binding = bindDslNumericLocalRelation(compiled, mapping, inference, relation)

An EXACT result carries the original method, post-store assignment, companion assignment, numeric local, original input slot, operand order and compiler descriptor. AMBIGUOUS, UNMAPPED and UNSUPPORTED remain distinct. Wrong ABI/local/node/kind/occurrence, repeated or nested observations, wrong temporal order, unsupported values, changed selected sources and unreproducible compiler metadata cannot activate an exact point. Canonical positional input bindings are shared with the entry mapper and revalidated in full; swapped slots/parameters and changed input names are rejected. Every source hash explicitly selected by the original PBT capture is checked, including a helper when it was selected.

Exactness applies only to this compiler-owned point transport. The original inference keeps its UNVERIFIED executable-build status; source hashes do not establish transitive import/transpilation identity. Arbitrary source names, coordinates or hashes cannot replace the retained compiler program. No machine lifecycle, selector or campaign behavior changes here.

This follows #580 and covers the binding portion of #398. The local auxiliary search and full native hypothesis replay/shrinking are a separate consumer change; this PR does not close #398.

Review scope

5 files, +636/-21: +286/-21 production and +350 tests. The only prerequisite is #580 at bd7e371690ae3cfac2b3f530f4e452fe306b2d38; #576 is not inherited into this PR.

Validation

  • 47 mapper, compiler, DSL capture and exact-binding Kotlin tests passed on the direct [TS PBT] Capture compiler-owned numeric DSL results #580 base, including native FastCheck observations and the real TypeScript frontend.
  • The same change also passed the seven existing entry-refutation tests on a combined dependency checkout before its unused dependency was removed.
  • Strict Detekt passed for every changed Kotlin file; diff checks passed.

No experiment or benchmark campaign was run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant