Skip to content

Query Workshop element facts and spans from workshop-rs instead of copying them #1006

Open

Description

@e54-bot

Problem

wright-analyzer copies canonical Workshop facts and syntax that workshop-rs owns, which AGENTS.md forbids ("Never duplicate canonical Workshop data or semantics in Wright"):

  • Element-name lists in crates/wright-analyzer/src/canonical/analysis.rs:
    • VOLATILE: random and time values.
    • ELEMENT_BINDER_VALUES.
    • The re-evaluated-argument names waitUntil, loopIf, ..., plus domain.ends_with("Reeval") and a "NONE" default parsed from a string.
    • canonical/cfg.rs: the wait 0.016 limit.
  • A second Workshop lexer. SourceScan (analysis.rs) skips comments, matches parentheses backwards, and compares raw text against Else, If and End to compute fix spans for dead_branch_fix and evaluate_once_fix. It does not handle localized keywords.

When workshop-rs adds or renames an element, these lint rules can become wrong without any error.

Scope

Wright-side migration: query these properties and spans from workshop-rs, then delete the local lists and SourceScan.

Non-goals

Designing the workshop-rs API. That belongs to workshop-rs.

Dependencies

Blocked on workshop-rs:

The Wait minimum (0.016 in canonical/cfg.rs) is a measured runtime fact, not catalog data. Its source belongs to athena and is outside these two blockers.

Acceptance criteria

  • wright-analyzer contains no hard-coded Workshop element-name lists and no text scanner for Workshop syntax.
  • Existing lint and fix tests pass, and a localized-keyword fixture produces the same fix spans as the English one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedSettled contract, but an external dependency prevents the workp3Chores, cleanup, nice to have; only when nothing higher is ready

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions