Skip to content

[1.0] Improve Script host-call diagnostics #359

Description

@jeremi

Context

PR #355 establishes the concise Registry Stack project-authoring contract. The core workflow is complete, but a misspelled built-in Script host call, for example source.gett(...) when source.get(...) exists, currently surfaces as a generic execution error followed by many derivative fixture mismatches.

This bounded usability improvement remains useful before 1.0. The previously proposed source-free Notary starter is removed from this issue by the 2026-07-17 credential trust-boundary decision in #384.

The change must preserve the deliberately small declarative model. It must not revive the removed flow DSL or make source capability availability depend on a product or version label.

Scope

  • Detect an unknown built-in Script host call at preflight or the earliest safe execution stage.
  • For a close misspelling, report the closest accepted signature plus the script path and location when Rhai provides it.
  • Keep the diagnostic bounded and value-free. Never echo subject data, credentials, request bodies, source responses, or internal engine state.
  • Avoid or collapse downstream fixture assertion failures that are solely consequences of the same unknown host call.
  • Add focused tests for typo suggestions, truly unknown calls, diagnostic redaction, and the single-primary-diagnostic path.

Acceptance criteria

  • A single near-miss host call produces one primary actionable diagnostic with the closest accepted signature, rather than a screenful of unrelated fixture-result failures.
  • The diagnostic identifies the authored script and provides a line and column when available.
  • A truly unknown call remains bounded and does not expose values or internal engine details.
  • Product or version metadata does not select Script availability.
  • No compatibility aliases or operation-oriented flow authoring return.
  • The implementation composes with the independent-diagnostic aggregation in [1.0] Aggregate independent Registry project authoring diagnostics #383 without duplicating or cascading the same root cause.

Non-blocking polish

The existing reference-footer and human-scaled byte-limit presentation ideas remain optional polish. They must not enlarge or delay the blocker acceptance above.

Related work

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions