Skip to content

Audit contextual Workshop semantics and strengthen executable conformance #135

Description

@Teakowa

Goal

Audit contextual Workshop semantics that are not fully represented by nominal parameter types or one-per-feature witnesses, and graduate every material finding into the smallest durable owner-side contract: executable tests, implementation fixes, or concise language documentation where needed.

Context

#87 established exhaustive per-feature Workshop conformance from the externally audited native surface. That suite proves that supported leaves have attributable valid cases and checks signatures, domains, rejection behavior, emission, round-trip semantics, and locale behavior where applicable.

A remaining gap is semantic distinctions within a feature or parameter context. Workshop permits context-dependent behavior such as numeric/boolean interchangeability in some positions, while similar-looking contexts can behave differently. For example, Wait(True, Ignore Condition) is accepted even though the duration is numerically interpreted, and OverPy explicitly models 0 -> False / 1 -> True replacements for selected argument positions. These facts must not be generalized into a global Boolean == Number rule.

Trusted sources for this audit include upstream OverPy documentation/source/tests, OSTW/DeltinScript behavior and documentation, and established Workshop documentation/Wiki material. Live-client validation is not required when those sources already establish the semantic contract; it remains useful only for conflicting, seasonal, undocumented, or otherwise unresolved behavior.

Intermediate extraction, comparison, and generated audit data should remain local/ephemeral. The repository should not gain another long-lived evidence database, compatibility harness, or generated semantic inventory solely to support this work.

Scope

  • Audit trusted external sources for contextual Workshop semantics that can affect parsing, validation, canonical WIR, semantic comparison, emission, static analysis, or safe source transformation.
  • Include at least:
    • numeric/boolean contextual acceptance and substitution behavior such as 0/False and 1/True;
    • null and other context-specific replacement/equivalence behavior where upstream sources establish it;
    • operator/comparison truthiness and coercion distinctions;
    • action/value parameter positions whose accepted behavior is wider or narrower than a nominal type label suggests;
    • context-specific exceptions such as Wait Until behavior where ordinary truthiness assumptions are not sufficient.
  • Compare audited findings against the current catalog/signatures, WIR representation, validation, semantic equivalence, and existing conformance/regression tests.
  • Use real, structurally valid Workshop programs as witnesses. An Action witness must execute in a valid rule action context; a Value/operator witness must appear in an appropriate semantic position.
  • Cover materially distinct accepted/rejected semantic branches rather than selecting one representative value for a union-like or context-sensitive parameter and treating the whole contract as covered.
  • Reuse shared structural invariants where the same rule applies across many features; add feature/context-specific cases where behavior materially differs.
  • For every material uncovered distinction, add the smallest durable executable test and fix the canonical workshop-rs behavior when the implementation disagrees with the established contract.
  • Keep audit extraction/generation tooling local unless a concrete independent long-term use justifies committing it.

Non-goals

  • No new checked-in evidence database, semantic-facts inventory, compatibility subsystem, or generic conformance framework.
  • No requirement to preserve temporary agent audit output or generated comparison artifacts in Git.
  • No live Overwatch client requirement for behavior already established by trusted upstream/documented sources.
  • No game-runtime simulator.
  • No global Boolean/Number, Null/Number, or other coercion hierarchy unless the audited Workshop behavior actually establishes such a global rule.
  • No duplication of OPY or DEL/OSTW source-language semantics in workshop-rs.
  • No requirement for byte/text identity where observable semantics are preserved.
  • No unrelated catalog, parser, WIR, or test cleanup.

Acceptance criteria

  • The selected trusted sources are audited for contextual coercion/equivalence behavior relevant to the declared Workshop surface.
  • Every material semantic distinction discovered by the audit is either already protected by an appropriate executable test or results in a focused new test before this issue closes.
  • Tests use valid Workshop structural contexts and assert the applicable semantic contract rather than only checking that a spelling/catalog entry exists.
  • Materially distinct accepted domains or contextual alternatives receive distinct coverage; one sampled argument does not stand in for all known branches.
  • Shared category/structural invariants are not mechanically duplicated per feature unless there is an independent failure mode.
  • Known context-specific exceptions remain distinguishable and are not erased by an over-broad normalization/coercion rule.
  • Any implementation changes remain in the canonical Workshop owner boundary and are justified by the audited semantic contract.
  • No new long-lived evidence/compatibility data subsystem is introduced; temporary audit data remains ephemeral.
  • Existing Add exhaustive category and per-feature Workshop semantic conformance tests #87 per-feature conformance and corpus/round-trip coverage remain intact and are strengthened rather than replaced.

Dependencies / relationships

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

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions