Skip to content

Facade refusals don't say what to write: an agent following the spec guessed the grammar for an hour #3129

Closed

Description

@ehartford

Part of #3115.

In the postal-mcp transcript the user (an agent) read §16.2b and still guessed, because refusals state the rule broken but not the form that works: "a case states an integer C type ('c_long', 'curl_off_t', an enum) or 'str'", "a retained pointer case's type is caller-managed storage", "param 0 ... receives a modeled resource; a resource is passed by the value that owns it, never fixed", "function 'Easy.new' is already defined".

Every facade refusal should end with the spelling that is accepted for the user's intent, or, when the grammar has none, say so plainly and name the issue tracking the gap (e.g. "an out-pointer case has no form yet: #3119; present this function through a with function over a raw call"). The same for the generated-code failures (#3114's unknown type: BorrowedPart should never reach the user as a compile error in generated text).

Done when: each facade diagnostic in SemaFacade.w carries a help line with an accepted spelling or a tracking issue; a fixture per diagnostic checks the help text.

Activity

  1. added a commit that references this issue on Nov 17, 2026
  2. ehartford commented on Nov 17, 2026

    @ehartford
    ContributorAuthor

    #3405 lands the first part: every refusal in src/SemaFacade.w now ends with a help line (224 gained one), 156 existing fixtures expect theirs, and ten new fixtures cover refusals that had none. Still open: about 85 refusals have no fixture that checks their help line. They are being written in batches.

  3. added a commit that references this issue on Nov 17, 2026
  4. ehartford commented on Nov 17, 2026

    @ehartford
    ContributorAuthor

    #3406 merged: 47 more fixtures, each pinning a contract refusal's help line, and a compiler panic fixed on the way (argv param 7 on a three-parameter callback indexed out of bounds in the renderer; now refused). 55 of the 208 help lines still have no fixture; three of those are compiler-defect reports no program should reach. Continuing in batches.

  5. ehartford commented on Nov 17, 2026

    @ehartford
    ContributorAuthor

    #3412 merged: 21 more fixtures. 32 of the 208 help lines still have no fixture. Noted on the way: the parser's own contract refusals (for example 'a variadic callback names its paired selector') print no help line; they are outside the checker's 208.

  6. ehartford commented on Nov 18, 2026

    @ehartford
    ContributorAuthor

    Two more fixtures on a local branch (facade-help-fixtures, lands with the next battery): a parameter both fixed and a userdata; nullable on a callback item's other pointer. A fresh count over SemaFacade.w's 256 help lines finds 52 with no fixture, of which 22 are 'this is a compiler bug' lines no contract can reach by design, leaving about 28.

    One class cannot be pinned as written: where the parser refuses the same shape first (param N fixed 1.5), the checker's copy with the help line is never reached and the parser's message has no help line. The parser has no way to attach one; that is the fix, not a fixture.

  7. ehartford commented on Nov 20, 2026

    @ehartford
    ContributorAuthor

    Five more fixtures written (2026-11-20, local branch facade-help-fixtures, to ride the next battery), each pinning the refusal and its help line: valid on failed on a function whose first parameter receives no resource; a handle operation that states more than a lend; rename on a call presented under its C name; callback_thread any with no callback; abandon naming a function with a second parameter. A rough scan (longest fixed fragment of each help text against the facade tests) still finds about a hundred help lines whose text no test contains, of which about 22 are 'this is a compiler bug' lines no contract reaches.

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