+{"area": "mdl/visitor", "date": "2026-10-27", "symptom": "`alter workflow M.W { set (Annotation: '…'); }` was refused (\"a workflow has no property Annotation\"), and so was `set (Annotation: '…') on X`, though CREATE writes both notes (header `annotation '…'`, `@annotation '…'`); the refusal did not name the CREATE spellings, so an eval agent concluded workflow notes were unsupported. Written without the braces it was diagnosed as \"`set (annotation` is a session command\". Underneath: the header clause wrote the workflow's own Annotation, which Studio Pro shows nowhere, and describe never read the start activity's, so a Studio Pro note on the start was dropped by describe -> replay", "cause": "The ALTER key tables and the wfmutator setters were never given the notes CREATE had since ako/mxcli#707, and #707 put the start's note in Workflows$Workflow.Annotation: both it and WorkflowActivity.annotation are in the metamodel from 9.15.0, so the metamodel could not say which one Studio Pro shows. The braceless form: the old per-action grammar takes `set display '…'` unbraced, so the parser tried it, failed at `(`, and recovered into the session command `set <name> = <value>`", "file": "`mdl/visitor/visitor_alter_workflow.go` (keys), `mdl/backend/wfmutator/mutator.go` (`setStartNote`, `setNote`), `mdl/backend/modelsdk/workflow_read.go` (start activity's note), `sdk/workflows/workflow.go` (`StartNote`), `mdl/executor/cmd_workflows.go` + `cmd_workflows_write.go` (describe, CREATE), `mdl/visitor/visitor.go` (braces hint), `mdl/visitor/visitor_session_commands.go` (stand down on a failed line)", "fix": "The start's note is StartWorkflowActivity.Annotation: CREATE writes the header clause there, the reader reads it (and the workflow's own, for workflows written before), describe prints StartNote(). `Annotation` is an ALTER workflow key (the start's note; it also clears the workflow's own) and an activity key; `''` stores null; `on Start` is the workflow key; an end is refused. setNote writes {$ID, $Type: Workflows$Annotation, Description}, keeps an edited note's $ID, and refuses a document with no Annotation slot. The braceless line gets a hint showing the braced statement; the session-command refusal stands down on a line that already has a syntax error", "insight": "**When the metamodel has two slots for one concept, ask the editor which one it draws.** Workflow.annotation and the start activity's are both in the 9.15.0 metamodel; the answer was in mxbuild's own `ide-client/workflow-editor/editor.js` — four views render the note badge (ActivityView, BoundaryEventView, EventSubProcessView, StartActivityView), each from its own element, and the Workflow view renders none. Ten minutes of grep settled what #707 had to guess, and turned an ALTER feature into a describe data-loss fix: a Studio Pro start note was silently dropped by every describe -> replay. **A recovery-made statement's error outranks the real one in the reader's eyes** because it reads as a diagnosis: guard visitor errors on recovered trees with `syntaxErrorLines`. **A missing slot is information** — every type with a note stores `Annotation: null` when empty (11.15.0), so refuse rather than add one", "refs": ["ako/mxcli#1717", "ako/mxcli#707"]}
0 commit comments