Seam gate red on main: bare %% line breaks docs/ux/flows/p6-members-idip.mermaid parse #1071

Closed
opened 2026-08-31 15:40:09 +00:00 by matou-build-agent · 2 comments

Main is red. The seam gate (ci.yml → scripts/seam-smoke.sh, stage
Docs: every mermaid diagram block parses (#343)) fails on main at 517216a4 and will
keep failing on every subsequent push until the diagram source is fixed.

Failing run: https://git.matou.nz/Matou/idss/actions/runs/15221 (exit 1,
mermaid-parse check FAILED — 1 of 61 block(s) will not parse).

Root cause

docs/ux/flows/p6-members-idip.mermaid (new in 66b4ac1a, the DDR 0217 design commit)
has a bare %% line at line 8 — an empty comment, no trailing content:

7  %% control plane signs nothing. The kanidm-path P6 flow is untouched.
8  %%
9  %% Cross-linking contract: every node names a screen (wireframe set

mermaid's comment stripper only removes comment lines with at least one character
after %%
. The bare %% on line 8 survives stripping, while lines 9–11 are removed
along with their newlines — so the surviving %% is glued onto the diagram header and
the parser sees:

Parse error on line 1:
%%flowchart TB
^
Expecting 'NEWLINE', 'SPACE', 'GRAPH', got 'NODE_STRING'

Confirmed by bisecting the file with the repo's own checker against the vendored
mermaid (docs/architecture/vendor/mermaid.min.js — the same parser
docs/architecture/index.html loads, so Forgejo renders this diagram broken too):

  • as committed → FAIL
  • sed '8d' (drop the bare %%) → ✓ 1/1 block(s) parse
  • sed '8s/^%%$/%% ./' (give the comment any content) → ✓ 1/1 block(s) parse

The gate is behaving correctly — the diagram genuinely does not parse. No other block
in the repo is affected (60/60 parse at d6865d3d).

Fix

  1. In docs/ux/flows/p6-members-idip.mermaid, make line 8 a non-empty comment
    (%% —) or delete it. Re-run node scripts/check-mermaid.mjs → expect 61/61.
  2. While there: the checker's failure hint in scripts/check-mermaid.mjs names only
    the stray-; cause. Add the bare-%% cause — it is the second way a diagram dies
    at line 1 and the message currently sends the reader hunting for a semicolon that
    isn't there.
  3. Add a docs/GOTCHAS.md entry (Symptom → Cause → Rule) for the bare-%% hazard,
    per ADR 0160, in the same commit as the fix.

Provenance

Filed by the swarm healer. Incident signature 933612b60e72, evidence
/tmp/matou-heal-Matou-idss.UoU3G9. Not repaired in place: docs/ux/flows/ is a
design-contract artifact outside the healer's harness-infra repair allowlist, and this
is a human-authored design commit.

**Main is red.** The seam gate (`ci.yml` → `scripts/seam-smoke.sh`, stage `Docs: every mermaid diagram block parses (#343)`) fails on `main` at 517216a4 and will keep failing on every subsequent push until the diagram source is fixed. Failing run: https://git.matou.nz/Matou/idss/actions/runs/15221 (exit 1, `mermaid-parse check FAILED — 1 of 61 block(s) will not parse`). ## Root cause `docs/ux/flows/p6-members-idip.mermaid` (new in 66b4ac1a, the DDR 0217 design commit) has a **bare `%%` line** at line 8 — an empty comment, no trailing content: ``` 7 %% control plane signs nothing. The kanidm-path P6 flow is untouched. 8 %% 9 %% Cross-linking contract: every node names a screen (wireframe set ``` mermaid's comment stripper only removes comment lines with **at least one character after `%%`**. The bare `%%` on line 8 survives stripping, while lines 9–11 are removed along with their newlines — so the surviving `%%` is glued onto the diagram header and the parser sees: ``` Parse error on line 1: %%flowchart TB ^ Expecting 'NEWLINE', 'SPACE', 'GRAPH', got 'NODE_STRING' ``` Confirmed by bisecting the file with the repo's own checker against the vendored mermaid (`docs/architecture/vendor/mermaid.min.js` — the same parser `docs/architecture/index.html` loads, so Forgejo renders this diagram broken too): - as committed → FAIL - `sed '8d'` (drop the bare `%%`) → `✓ 1/1 block(s) parse` - `sed '8s/^%%$/%% ./'` (give the comment any content) → `✓ 1/1 block(s) parse` The gate is behaving correctly — the diagram genuinely does not parse. No other block in the repo is affected (60/60 parse at d6865d3d). ## Fix 1. In `docs/ux/flows/p6-members-idip.mermaid`, make line 8 a non-empty comment (`%% —`) or delete it. Re-run `node scripts/check-mermaid.mjs` → expect 61/61. 2. While there: the checker's failure hint in `scripts/check-mermaid.mjs` names only the stray-`;` cause. Add the bare-`%%` cause — it is the second way a diagram dies at line 1 and the message currently sends the reader hunting for a semicolon that isn't there. 3. Add a `docs/GOTCHAS.md` entry (Symptom → Cause → Rule) for the bare-`%%` hazard, per ADR 0160, in the same commit as the fix. ## Provenance Filed by the swarm healer. Incident signature `933612b60e72`, evidence `/tmp/matou-heal-Matou-idss.UoU3G9`. Not repaired in place: `docs/ux/flows/` is a design-contract artifact outside the healer's harness-infra repair allowlist, and this is a human-authored design commit.
Author
Member

swarm-claim host=elitebook-distributed-server-03 run=15233
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=15233 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #1071 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1071,
  "status": "success",
  "commits": [
    "b0a77180"
  ],
  "changed_files": [
    "docs/ux/flows/p6-members-idip.mermaid",
    "scripts/check-mermaid.mjs",
    "docs/GOTCHAS.md"
  ],
  "tests": [
    {
      "command": "node scripts/check-mermaid.mjs",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Line 8 bare %% made a non-empty comment or deleted; re-run expects 61/61": "docs/ux/flows/p6-members-idip.mermaid line 8 `%%` → `%% —`; `node scripts/check-mermaid.mjs` → 61/61 block(s) parse (exit 0)",
    "check-mermaid.mjs failure hint adds the bare-%% cause beside the stray-; cause": "scripts/check-mermaid.mjs failure hint now names both causes",
    "docs/GOTCHAS.md entry (Symptom→Cause→Rule) for the bare-%% hazard per ADR 0160, same commit": "docs/GOTCHAS.md #143 ⭐, Symptom → Cause → Rule, in commit b0a77180"
  },
  "summary": "Gave the bare `%%` on line 8 of p6-members-idip.mermaid content so the seam gate parses 61/61, named the bare-%% cause in the checker hint, and added GOTCHAS #143.",
  "reason": "",
  "blockers": []
}
**close-report** for #1071 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1071, "status": "success", "commits": [ "b0a77180" ], "changed_files": [ "docs/ux/flows/p6-members-idip.mermaid", "scripts/check-mermaid.mjs", "docs/GOTCHAS.md" ], "tests": [ { "command": "node scripts/check-mermaid.mjs", "exit_code": 0 } ], "criteria": { "Line 8 bare %% made a non-empty comment or deleted; re-run expects 61/61": "docs/ux/flows/p6-members-idip.mermaid line 8 `%%` → `%% —`; `node scripts/check-mermaid.mjs` → 61/61 block(s) parse (exit 0)", "check-mermaid.mjs failure hint adds the bare-%% cause beside the stray-; cause": "scripts/check-mermaid.mjs failure hint now names both causes", "docs/GOTCHAS.md entry (Symptom→Cause→Rule) for the bare-%% hazard per ADR 0160, same commit": "docs/GOTCHAS.md #143 ⭐, Symptom → Cause → Rule, in commit b0a77180" }, "summary": "Gave the bare `%%` on line 8 of p6-members-idip.mermaid content so the seam gate parses 61/61, named the bare-%% cause in the checker hint, and added GOTCHAS #143.", "reason": "", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#1071
No description provided.