Skip to content

fix: refuse validation feedback on a primitive variable (unloadable project) - #2766

Merged
ako merged 3 commits into
mainfrom
fix/feedback-on-primitive
Dec 2, 2026
Merged

ako merged 3 commits into
mainfrom
fix/feedback-on-primitive

Conversation

@ako

@ako ako commented Dec 2, 2026

Copy link
Copy Markdown
Owner

Check-gap sweep 6, f142 (#1258). Exec wrote this one into a project that MxBuild could not load.

The defect

With $S a String, validation feedback $S/Name message 'x' passed check -p. Exec then stored the feedback's attribute as the bare name Name, because exec qualifies a bare member with the variable's entity and a String has none. A stored attribute reference is Module.Entity.Attribute and nothing else. MxBuild 11.16.1 therefore failed while loading the project, before any validation ran:

Validation feedback in has an invalid value '' for property Attribute. The text 'Name' is not a valid AttributeIdentifier.

Fix

  • Primitive variables: check (MDL118, alongside delete/commit/rollback of a primitive) and exec refuse validation feedback on a variable of a primitive type, with one shared message.
  • Backstop: exec also refuses any feedback attribute it would store unqualified, whatever left the entity unknown. An unqualified reference can never load, so the writer refuses that shape rather than only today's cause.

Evidence

  • Test first: TestValidationFeedbackOnPrimitive asserts that check -p and exec refuse with the same words, for a String parameter and a declared Integer. Its control, feedback on an object, passes both.
  • Stub proof: stubbing either half makes its two cases fail again.
  • End to end: f142 re-run with the new binary is rejected by check -p and refused by exec, so nothing is written.
  • False-positive sweep: check over every example script reports nothing new. exec of the 11 example scripts with validation feedback is unchanged.
  • Local gate: make ci-local passed.

Generated by Claude Code

…roject)

`validation feedback $S/Name` with $S a String passed check -p, and exec
stored the feedback's attribute as the bare name `Name`: there is no entity
to qualify it with. A stored attribute reference is Module.Entity.Attribute,
so MxBuild 11.16.1 could not load the project ("The text 'Name' is not a
valid AttributeIdentifier"). Check-gap sweep 6, f142.

- check (MDL118) and exec refuse validation feedback on a variable of a
  primitive type, in one message.
- exec also refuses, as a backstop, any feedback attribute it would store
  unqualified, whatever left the entity unknown.

Re-run end to end on the f142 fixture: check -p rejects it and exec refuses
it, so nothing unloadable is written. Over the 11 example scripts with
validation feedback, check and exec are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82tETa46YQmMS58pQjL
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82tETa46YQmMS58pQjL
@ako
ako marked this pull request as ready for review December 2, 2026 21:40
@ako
ako merged commit f82a185 into main Dec 2, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants