Skip to content

Diagram: colour an inferred species' diagram with an entity it lacks - #961

Merged
adamjohnwright merged 1 commit into
mainfrom
fix/render-mouse-token
Nov 14, 2026
Merged

adamjohnwright merged 1 commit into
mainfrom
fix/render-mouse-token

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

A single-PR fix. It belongs to spec 010 (the render service in place of Java's exporters) and was found by pdf-export spec 002 T020.

The bug

A mouse analysis report lost 4 of its 25 figures to the render service's 500. On this host, with a small over-representation token, R-MMU-8864260, R-MMU-8878159, R-MMU-8848021 and R-MMU-1227986 each answered 500 after 45 s. Without a token they answered 200. Their human counterparts rendered with or without a token. The render service's log said page.waitForSelector: Timeout 45000ms exceeded: the render page never became ready and never reported an error.

Cause

An inferred species' diagram uses the human layout. An entity with no counterpart in that species has no graph data, and the diagram service logs Missing graph data for node for it. When the analysis colouring ran, it read such an entity's leaves as [node.data('graph')], which is [undefined], and then read .identifier from undefined. The TypeError was thrown inside the subscription that colours the diagram, so appliedAnalysis was never set. The render page then waited for colouring that never came: its own 60 s deadline was longer than the service's 45 s timeout, so the service gave up first and answered 500. The same throw also left the pathway browser's mouse diagrams uncoloured under an analysis, and no notice was shown.

Fix

The colouring of one entity is now nodeExpression (diagram/node-expression.ts). An entity with no graph data counts as not hit ([undefined]), which is how an entity whose graph data has no identifier is already treated. Every other case behaves as before. The DeltaSignal overlay already guarded against this case.

Checks

  • node-expression.spec.ts was first run against the old logic. The no-graph-data case failed with the same TypeError the page raised.
  • A scratch build of this branch was run behind a render service started from the branch on its own loopback port. All four figures came back 200, coloured, in 3–4 s.
  • Java's exporter on this host draws all four with the token, so this removes a difference rather than adding one. No row is needed in documentation/declared-differences.md.

🤖 Generated with Claude Code

An inferred species' diagram is the human layout, and an entity with no
counterpart in that species has no graph data. Colouring the analysis read
it as a leaf and threw inside the subscription, so the diagram was never
coloured and the render page never ready: the render service timed out and
answered 500 (mouse R-MMU-8864260, R-MMU-8878159, R-MMU-8848021 and
R-MMU-1227986 with any token, pdf-export spec 002 T020). Such an entity is
now not hit, as one whose graph data has no identifier.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adamjohnwright
adamjohnwright merged commit 95c90b2 into main Nov 14, 2026
8 checks passed
@adamjohnwright
adamjohnwright deleted the fix/render-mouse-token branch November 14, 2026 04:17
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.

1 participant