Skip to content

fix(topology): say what to write instead when a line is not understood - #66

Merged
ETWOYA merged 1 commit into
mainfrom
friday/parse-note-names-shapes
Sep 26, 2026
Merged

ETWOYA merged 1 commit into
mainfrom
friday/parse-note-names-shapes

Conversation

@dankoverride

Copy link
Copy Markdown
Collaborator

When /topology/parse can't read a line, its note named the line and nothing else. A model that drew a database as (round) or a gateway as {rhombus} then rewrote the whole diagram at random and retried, re-sending a full-resolution screenshot each pass. That was the fuel for a retry loop in Tessa, IF's AI assistant.

Change

Every not-understood note now carries a remedy that matches the cause:

Cause The note now adds
A rejected shape the shapes that are read ([label], [[label]], [(label)], ((label)), {{label}}), naming round and rhombus as unread
a --> b & c one target per arrow
A trailing ; remove it

Structural causes are looked for only outside labels, so the & in db[R&D] is treated as part of a name.

Parser behaviour is unchanged. The same lines are accepted and rejected, and the note keeps its line not understood, ignored: <line> prefix, which existing tests and any client matching on it rely on.

Tests

Six new cases: round, rhombus, and a bare round node; multi-target; trailing semicolon; an ampersand inside a label. 1,207 of 1,207 pass.

🤖 Generated with Claude Code

The parse note named the bad line and nothing else, so a model that drew a
database as (round) or a gateway as {rhombus} rewrote the whole diagram at
random and retried. That was the fuel for the MakeShoebox retry loop (IF Bug
3357, SP-118): three passes, each re-sending a full-resolution screenshot.

Every not-understood note now carries its remedy, and the remedy follows the
cause:
- a rejected shape names the shapes that are read, and names round and
  rhombus as unread, since those are what models reach for;
- a multi-target edge (a --> b & c) says one target per arrow;
- a trailing semicolon says to remove it.
Structural causes are looked for outside labels only, so an ampersand in
db[R&D] is read as a name, not a second target.

Parser behaviour is unchanged: the same lines are accepted and rejected, and
the note keeps its "line not understood, ignored: <line>" prefix. Reported by
IF.APM.App.Unity.HDRP on the IF coordination bus (#3169).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ETWOYA
ETWOYA merged commit 658ccd2 into main Sep 26, 2026
6 checks passed
@ETWOYA
ETWOYA deleted the friday/parse-note-names-shapes branch September 26, 2026 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants