Repository navigation
Commit both encodings of five renders, for pgb to parse - #78
Merged
Merged
Conversation
The two repositories are one contract in two halves and nothing checked that they agreed. A wire-format break reached the frontend as an error card at best and a silently wrong picture at worst. So both encodings of all five real subgraphs are committed under tests/fixtures/exchange/ — the band payload /seqtubemap?format=bands returns and the document the same request returns without it, out of one render each, under pgb's own file names so that handing them over is a copy rather than a translation. 3.35 MB of payload and 3.22 MB of gzipped document, spanning 90 bp to the two regions at pgb's fetch ceiling. `npm run fixtures:exchange` regenerates them from inputs already committed — no server, no vg, no network — in about two seconds, and deterministically down to the gzip. exchange-fixtures.test.mjs then holds them to the code: the committed payload is what this encoder writes, the committed document is what this emitter writes, and the committed pair describes one picture, checked through pgb's own parser rather than this repository's idea of one. A sixth test nudges a band's far end by a part in 10,000 and asserts the pair check notices, so #25's "demonstrated" is a test rather than a story. Verified against pgb's reader at fde52e3, over all 101,742 bands: band counts, frame, strand names, directions, strand ids and all 1,219 segment boxes equal, abscissae within one Float32 ulp — worst 0.86, which reproduces the figures pgb's own fixture notes record. Against the pairs pgb captured from the live server on the same day, every payload body is byte-identical; the strand names differ because the live walks now append a reference range and the .gfa subgraphs here predate that. Both facts are written down in the fixtures README, with what they mean for anyone reaching for one set to explain the other. Refs #25 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015wyakF7DEbvddMqaL9kSB6
6 tasks
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.
Refs #25.
The two repositories are one contract in two halves — this one produces documents and band payloads,
pgbparses them — and nothing checked that they agreed. A wire-format break reached the frontend as an error card at best and a silently wrong picture at worst.What lands
tests/fixtures/exchange/— both encodings of all five real subgraphs, out of one render each: the band payload/seqtubemap?format=bandsreturns, and the document the same request returns without it. 3.35 MB of payload and 3.22 MB of gzipped document, spanning 90 bp to the two regions atpgb's fetch ceiling. The file names arepgb's, so handing them over is a copy rather than a translation.npm run fixtures:exchange— regenerates them from inputs already committed. No server, novg, no graph data, no network; about two seconds, and deterministic down to the gzip, so a diff here is always something that moved.tests/node/exchange-fixtures.test.mjs— the committed payload is the bytes this encoder writes, the committed document is the text this emitter writes, and the committed pair describes one picture, checked throughpgb's own parser rather than this repository's idea of one. A sixth test nudges band 0'sx1by a part in 10,000 and asserts the pair check notices, so #25's demonstrated is a standing test rather than a story.Docs — the fixtures README says what they are, when to re-generate, and that the copy across goes in the same window;
docs/band-format.mdand the seqtubemap fixtures README point at it.Verified against
pgb's readerThese exact bytes through
parseBandPayload.tsandparseBands.tsatpgbfde52e3, over all 101,742 bands: band count, frame, strand names,pclaiScores, ordinates, directions, strand ids and all 1,219 segment boxes equal; abscissae and widths within one Float32 ulp — worst 0.86, 0.86, 0.44, 0.86, 0.86, which reproduces the figurespgb's own fixture notes record. Altering one float fails both sides: this one names the first differing byte,pgbputs the band 16.59 ulp from where the document does.Against the pairs
pgbcaptured from the live serverSame day, different provenance, and the difference is written down in the README:
documentdimensions and all 1,219 segment boxes;…#0[25397889-25398120]) that the 2026-08-27.gfasubgraphs here predate;pclaiScore, having gained a placement on the server since.What this does not close
#25's remaining criteria are
pgb's. Its reader and test exist (pgb#145), butpgbhas no CI — no.github/at all — so "that test runs inpgb's CI" is still open on that side.Testing
npm test: 132 pass, 0 fail, 2 pre-existing skips. The Python suite is untouched by this change and does not run locally here (fastapinot installed); CI installs it.🤖 Generated with Claude Code
https://claude.ai/code/session_015wyakF7DEbvddMqaL9kSB6