Find a sub-pathway's parent diagram in the ancestors just fetched - #372
Merged
Merged
Conversation
A pathway with no diagram of its own is drawn in its nearest ancestor's. The diagram fetched the pathway's ancestors to find it, then looked in the event's own copy instead -- which the page fills from a fetch of its own. When the diagram's fetch won that race, the copy was still empty, no parent was found, and the pathway was reported missing: in the embed, about one load in three of R-HSA-69541 gave a diagramerror and no drawing. It looks in what it fetched now, and in the event's copy only if that came back empty. The embed spec now holds the page's copy back (the request with a query; the diagram's has none), the order that lost: it failed 3 of 3 before, and passes 5 of 5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A pathway with no diagram of its own is drawn in its nearest ancestor's diagram.
The bug. The diagram fetched the pathway's ancestors to find that ancestor, then looked in the event's own copy of them instead. The page fills that copy from a separate fetch of its own. When the diagram's fetch won the race, the copy was still empty, so no parent was found and the pathway was reported missing. In the embed, about one load in three of R-HSA-69541 gave a
diagramerrorand no drawing. It was already onmain: 1 of 5 runs failed there.The fix. It now looks in the ancestors it fetched, and falls back to the event's copy only if that fetch came back empty.
The test. The embed spec now holds back the page's copy, which is the losing order. The page's request carries a query string and the diagram's doesn't, so the test can tell them apart. It failed 3 of 3 before the fix and passes 5 of 5 with it. This also removes the intermittent failure from CI.
Checks: full e2e 333 passed with the 7 listed skips, unit tests 601, gates pass.
🤖 Generated with Claude Code