Skip to content

[TS Calls] Register and execute guarded semantic models #365

Description

@CaelmBleidd

Part of #360. Depends on #363 and P0 gate #383.

Goal

Select and execute a small set of guarded semantic models through the unknown-call dispatcher using the simplified contract.

Scope

  • Keep one model object with a stable ID, declarative call target and execution producing guarded successors plus optional residual.
  • Keep one immutable enabled-model catalog. Reject duplicate IDs and overlapping enabled targets; do not use registration order as priority.
  • Match stable call metadata first, then check actual applicability against the state. A name or first possible receiver type is insufficient evidence of a built-in call.
  • Return not-applicable when the whole call is unsupported. A returned plan handles supported inputs and routes its residual complement to the configured fallback.
  • Preserve normal/exceptional completion, aliasing and deferred state changes on the selected successor.
  • Document each model's supported domain and exactness within that domain. Do not require an EXACT/PARTIAL flag when residual presence already determines completeness of the returned plan.
  • Use an intrinsic that actually benefits from an engine operation: migrate the existing Array.shift approximation using symbolic memory memcpy.
  • Leave ordinary Array.pop source semantics to [TS Calls] Execute semantic models written in TypeScript #366.
  • Use the observer from [TS Calls] Record unknown-call decisions #364. Compute outcomes from decisions; preserve one application event plus the separate residual decision.
  • Preserve enabled-set identity for experiments. Tool revision and external source identity belong in run metadata; no per-model version scheme is needed.

Guard/model validation

Built-in models must define disjoint, exhaustive successor/residual guards and correct effects within their supported domain. Check these obligations in focused tests, with concrete TypeScript comparison where applicable. Do not perform an extra global solver-validation query on every model call.

Definition of Done

The gate can be satisfied in the same delivery as this issue; it does not require another implementation PR.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions