Repository navigation
test: pin encapsulated write, latin1 fallback, and CS multi-value length behavior - #526
Merged
Merged
Conversation
…gth behavior Co-Authored-By: Claude Fable 5 <[email protected]>
|
🎉 This PR is included in version 1.0.0-beta.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
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.
Another installment of the regression bank: suites that document what the writer and reader already do correctly on this branch, with the still-broken cases checked in as
it.skipentries carrying their issue numbers. Nothing in the library changes here — the point is that these behaviors can't quietly regress while the engine work proceeds, and each skip is an executable to-do for the fix passes.test/issues/issue293-encapsulated-write.test.jscovers writing encapsulated pixel data — the DICOM layout where compressed frames are stored as a list of fragments rather than one contiguous block. Five upstream reports are pinned. #293: odd-length frames must be padded inside each frame's final fragment, not with a single pad byte at the end of the whole tag (pydicom parity). #159: writing 120 frames of 64 KB completes in bounded time and size — upstream, per-fragment concatenation was quadratic and froze the browser tab. #161: an OW element inside a sequence item writes without the old "Cannot read property 'fragmentMultiframe' of undefined" crash. #90: a sequence that was read with a defined length is legally rewritten with undefined length; semantic equality is the pinned contract, and byte-identity of the length encoding is a documented non-goal of the eager writer. #340 is the suite's KNOWN GAP: RLE Lossless requires exactly one fragment per frame, but the default write re-fragments frames larger than 20 KB, so that pin is skipped — while the workaround contract,write({ fragmentMultiframe: false })preserving one fragment per frame, is pinned green. The structural assertions parse the writer's output with an independent byte walker (test/issues/part10Walker.js), so the writer isn't grading its own homework.test/issues/issue297-latin1-fallback.test.jstargets mobile and embedded JS runtimes (react-native, Hermes without full ICU) wherenew TextDecoder("latin1")throws. dcmjs currently constructs that decoder at module load, so on those runtimes the library fails at import time and never even reachesreadFile. That whole scenario is the suite's skipped KNOWN GAP #297; a control test pins that the same file parses fine under a normal TextDecoder.test/issues/issue487-cs-multivalue-length.test.jspins the length contract for CS (Code String — 16 characters max per backslash-separated component). Some vendors ship private tags declared CS with much longer values, and upstream there was no escape hatch to copy them through. The pinned contract: reads are lenient, the default write throws an error that names the offending value, and{ allowInvalidVRLength: true }writes it as-is.Everything unskipped is green against this branch today; the two skips (#340 and #297) wait on their fixes.
🤖 Generated with Claude Code