@cosyte/astm 0.0.20 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +124 -0
- package/README.md +11 -6
- package/dist/index.cjs +24 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +148 -100
- package/dist/index.d.ts +148 -100
- package/dist/index.mjs +24 -18
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -444,6 +444,10 @@ this file is maintained by hand (Changesets handles the version bump and publish
|
|
|
444
444
|
that could ever protect conformant traffic, and refusing it is the over-refusal that sank a
|
|
445
445
|
criterion measured and rejected for this same family. The widened predicate **cannot** refuse an
|
|
446
446
|
escape-clean stream: every position it now rejects already raises an escape deviation of its own.
|
|
447
|
+
**Both sentences in this paragraph are scoped later in this same release**, under "The companion
|
|
448
|
+
universal is false where the declaration names the escape character in a splitting role too": they
|
|
449
|
+
hold wherever the escape role is a character distinct from the three splitting roles, and not where
|
|
450
|
+
it is not. They are kept as written because the measurement this entry records starts from them.
|
|
447
451
|
|
|
448
452
|
**That remaining silence is a TRADE, and it is not a claim that nothing was lost there.** On the
|
|
449
453
|
excluded tail the gained boundary is exactly as real, and it is not merely under-reported: it is
|
|
@@ -1072,6 +1076,126 @@ this file is maintained by hand (Changesets handles the version bump and publish
|
|
|
1072
1076
|
|
|
1073
1077
|
### Documented
|
|
1074
1078
|
|
|
1079
|
+
- **The corpus that certifies the contested-alignment correction never observed one of the three
|
|
1080
|
+
codes it certifies, and three of the figures the correction quotes were asserted only as "more
|
|
1081
|
+
than zero".** `PRE-EXISTING`, all three named by the refuter passes on the preceding slice and
|
|
1082
|
+
backlogged there rather than closed. No guard moves: no runtime code is added, removed or renamed,
|
|
1083
|
+
no split changes, no extracted value moves, no stream's disposition changes, and no exported
|
|
1084
|
+
surface moves.
|
|
1085
|
+
- **The companion corpus wired only the repeat and component roles, so the
|
|
1086
|
+
`ASTM_RECORD_ALIGNMENT_SHIFTED_FIELDS` orphan population was outside it.** Which role a
|
|
1087
|
+
declaration puts the swept character in decides where the collision is; which delimiter the
|
|
1088
|
+
contested reading gains a boundary on decides which of the three codes fires. They are
|
|
1089
|
+
independent axes, and both arms of that corpus held the second one fixed by keeping the
|
|
1090
|
+
contested construct inside a single field of the carrier. Measured, that corpus observes
|
|
1091
|
+
`ASTM_RECORD_ALIGNMENT_SHIFTED_FIELDS` **zero** times, which is now asserted rather than left to
|
|
1092
|
+
be noticed. Two field arms sweep it: the collision stays in the repeat or component role, where
|
|
1093
|
+
it is expressible, while the gained boundary is on the field separator, which the swept
|
|
1094
|
+
character never is. That is what puts a field-code orphan in reach even though the field role
|
|
1095
|
+
cannot collide with the escape role. The arms pin their own figures: the distinct arm is 1,296
|
|
1096
|
+
tuples where 432 fire and **0** are orphans, the colliding arm is 1,296 tuples where 360 fire
|
|
1097
|
+
and **144** are orphans, and every one of those 144 carries
|
|
1098
|
+
`ASTM_RECORD_DELIMITER_ROLE_COLLISION` and is refused by the widest profile the safety gate
|
|
1099
|
+
permits, before and after. `H|F^F` with `C|1|I|FFF|F|G` is one of them, written out in full. The
|
|
1100
|
+
union assertions that carry the correction now read over all four arms, and on the wider
|
|
1101
|
+
"any tail code fired" population rather than on the one code each arm was built to observe.
|
|
1102
|
+
- **Three figures could drift with the suite staying green.** The report-count corpus asserted its
|
|
1103
|
+
firing population, its under-stating class and its over-stating class as "more than zero", so a
|
|
1104
|
+
corpus that had quietly lost nine tenths of each would still have passed. They are pinned now
|
|
1105
|
+
(3,072 firing, 1,568 carrying one warning on a displacement of two, 320 carrying two warnings on
|
|
1106
|
+
a displacement of one, 64 in the tie class), together with the whole joint distribution of
|
|
1107
|
+
report count against displacement, so any cell that moves reds the suite and names itself.
|
|
1108
|
+
Pinning the table surfaced a fact none of the three figures carried: **there is no cell at zero
|
|
1109
|
+
reports and zero displacement.** Every tuple this code says nothing about is displaced anyway,
|
|
1110
|
+
by one or by two, which is the standing exclusion for a recognized tail doing what it is for and
|
|
1111
|
+
is the silent third direction in which counting warnings fails.
|
|
1112
|
+
- **The retired universal, and the sites this entry changed.** The three test files that were
|
|
1113
|
+
recorded, plus `alignment-unrecognized-tail.test.ts` and
|
|
1114
|
+
`alignment-criterion-population.test.ts`, which word the same fact differently, plus the
|
|
1115
|
+
corollary about the escape companion at the "refuses NOT ONE escape-clean stream" tests in the
|
|
1116
|
+
first three. Each is cut or scoped rather than re-qualified in fresh words: the unqualified
|
|
1117
|
+
sentence is gone, the corpus's own bound (it holds the escape role at `&`) is stated in its
|
|
1118
|
+
place, and what that bound is worth is named at the file that measures it. The predicate's own
|
|
1119
|
+
implementation site in `src/common/escapes.ts` is scoped too, and the claim in the doc block on
|
|
1120
|
+
the private `headsInterpretableSequence` that it was "the single place that says what happens
|
|
1121
|
+
there" is deleted rather than repaired, having already been false against the README. Neither string reaches `dist/index.d.ts`, and no
|
|
1122
|
+
behaviour, no warning code and no documented surface moves. The paragraph earlier in this
|
|
1123
|
+
release that states it unqualified is kept as written, because the measurement it records starts
|
|
1124
|
+
from it, and now says where it is scoped.
|
|
1125
|
+
|
|
1126
|
+
- **Two claims the contested-alignment codes rest on were false, and both were on consumer
|
|
1127
|
+
surfaces.** `PRE-EXISTING`, both named by the third refuter pass on the tail-residue slice and
|
|
1128
|
+
backlogged there rather than closed. No guard moves, no code is added, removed or renamed, no
|
|
1129
|
+
split changes, no extracted value moves, and no stream's disposition changes. The remedy is the
|
|
1130
|
+
claim, for the fifth time in this family.
|
|
1131
|
+
- **The companion universal is false where the declaration names the escape character in a
|
|
1132
|
+
splitting role too.** The three tail codes rest on a defence against over-refusal: firing
|
|
1133
|
+
requires an escape character heading no sequence this codec can interpret, and the package
|
|
1134
|
+
already reports each of those, so a stream whose escaping raises nothing can never be refused.
|
|
1135
|
+
That was written and asserted as a universal over the whole firing population. Every corpus in
|
|
1136
|
+
this family fixes the escape role at `&`, so none of them could see the case that breaks it. On
|
|
1137
|
+
a colliding set one byte both opens a sequence and ends a segment, the split claims it first,
|
|
1138
|
+
and neither escape report ever sees a sequence to raise: a tail code fires with **neither**
|
|
1139
|
+
companion. Measured on the committed corpus in
|
|
1140
|
+
`test/records/alignment-companion-universal.test.ts`, whose figures that file pins so they can be
|
|
1141
|
+
re-derived: the distinct arm is 2,304 tuples, 1,536 fire, **0** are orphans; the collides arm is
|
|
1142
|
+
1,008 tuples, 648 fire, **288** are orphans, and **0** orphan in either arm lacks
|
|
1143
|
+
`ASTM_RECORD_DELIMITER_ROLE_COLLISION`. The defence
|
|
1144
|
+
therefore survives in the form it was needed in (no stream whose escaping **and** whose
|
|
1145
|
+
declaration are both clean is refused by a tail code) and not in the form it was written in.
|
|
1146
|
+
**That replacement is scoped to the STREAM and does not hold per message**: the collision is
|
|
1147
|
+
reported once per set change rather than once per record, so a second header re-declaring the
|
|
1148
|
+
same colliding set raises nothing while the tail codes in its message fire again, leaving a
|
|
1149
|
+
consumer that scopes warnings to a message looking at one of the three codes standing entirely
|
|
1150
|
+
alone. Also measured, and stated because "three splitting roles" reads as three reachable
|
|
1151
|
+
collisions: the **field** role cannot collide with the escape role at all, because the
|
|
1152
|
+
declaration is the three characters after the field separator and stops at the next one, so
|
|
1153
|
+
such a header terminates itself one character short and is refused.
|
|
1154
|
+
- **"One place further right" understates.** It is a floor, not a figure, and it was already
|
|
1155
|
+
known to be wrong in one direction (the tie class, where the offset is zero). It is wrong in
|
|
1156
|
+
the other direction too, and every corpus in this family fixes the axis that shows it: they
|
|
1157
|
+
carry exactly one contested construct per record. The competing reading resumes a character
|
|
1158
|
+
further on at each contested position, so it falls further out of step and the gap widens once
|
|
1159
|
+
per construct. `A&Z&|&BX&Z&|&F&C` reads **three** fields against **one**, and a chain of n
|
|
1160
|
+
constructs displaces by n, measured to n = 6. **The number of warnings is not the displacement
|
|
1161
|
+
either, in either direction**: over 3,072 firing tuples on a two-construct corpus, one warning
|
|
1162
|
+
sits on a displacement of two in 1,568 of them (a gained boundary whose tail is a recognized
|
|
1163
|
+
mnemonic is excluded from the report and still displaces) and two warnings sit on a
|
|
1164
|
+
displacement of one in 320 (one of the constructs is a tie). A consumer cannot recover the
|
|
1165
|
+
offset by counting, and the corrected surfaces say to read the raw line instead. The practical
|
|
1166
|
+
consequence is that one code covers two opposite outcomes: on
|
|
1167
|
+
`R|1|^^^687|28.6&F&|&Z&U/L||||F` the sender's trailing `F` lands **in** the status slot and
|
|
1168
|
+
reads as `final`, while on `R|1|^^^687|28.6&Z&|&BX&Z&|&F&U/L||||F` the same displacement runs
|
|
1169
|
+
twice, the `F` overshoots, and the status reads `unspecified`.
|
|
1170
|
+
- **Every other surface now names the KIND of cost and leaves the MAGNITUDE to one paragraph.**
|
|
1171
|
+
That is the rule the tail-residue slice paid three refuter passes for: a paraphrase at each sink
|
|
1172
|
+
is a separate claim that goes stale on its own, and seven copies of one had survived two sweeps.
|
|
1173
|
+
Both corrected statements live on `ShiftedFieldsSink`, which is exported and therefore reaches
|
|
1174
|
+
`dist/index.d.ts`, and which all three warning factories already point at. The magnitude was
|
|
1175
|
+
being paraphrased in **three** different vocabularies ("one place further right", "shifts every
|
|
1176
|
+
later field one place", "moves one slot along"), which is why the first sweep of this slice
|
|
1177
|
+
missed most of them; a newline-folded grep over all three found nineteen, in
|
|
1178
|
+
`src/common/escapes.ts`, `src/common/warnings.ts` (including the three `WARNING_CODES` registry
|
|
1179
|
+
entries and the three runtime messages), `src/profiles/safety.ts`,
|
|
1180
|
+
`src/profiles/reference-corpus.ts` (a runtime string), `src/records/parse.ts`,
|
|
1181
|
+
`src/records/tokenize.ts`, `README.md`, `docs-content/troubleshooting.md`,
|
|
1182
|
+
`docs-content/quickstart.md` and `docs-content/limitations.md`. All of them are corrected. The
|
|
1183
|
+
three runtime **messages**, which no gate in this repo reads for truth, now say the displacement
|
|
1184
|
+
is not fixed, name its three values, and tell the operator that counting warnings does not give
|
|
1185
|
+
it.
|
|
1186
|
+
- **"At least one place" was rejected as the replacement wording**, although it was the obvious
|
|
1187
|
+
one: it contradicts the tie class named in the same sentence, where the displacement is zero.
|
|
1188
|
+
Every corrected surface says the displacement is **not fixed** and names its three values
|
|
1189
|
+
instead.
|
|
1190
|
+
- **Both were RED before and are GREEN after, against the retired assertions verbatim.**
|
|
1191
|
+
`alignment-shifted-fields.test.ts` asserted `leftmost.length === competing.length + 1` and
|
|
1192
|
+
`alignment-unrecognized-tail.test.ts` asserted an escape companion on every firing tuple; on the
|
|
1193
|
+
swept axes the first reads 10 against an expected 9 and the second reads false. Both files now
|
|
1194
|
+
scope those assertions to the corpus that measures them instead of stating them as universals.
|
|
1195
|
+
Pinned in `test/records/alignment-companion-universal.test.ts` and
|
|
1196
|
+
`test/records/alignment-offset-rephasing.test.ts`, each sweeping the axis its family's corpora
|
|
1197
|
+
hold fixed, each carrying a negative control that is run rather than declared.
|
|
1198
|
+
|
|
1075
1199
|
- **A header delimiter-declaration surplus loses all 31 of the C0/`DEL` characters that can reach
|
|
1076
1200
|
it, and the published surfaces stated the preservation rule without that exception.**
|
|
1077
1201
|
`PRE-EXISTING`; the
|
package/README.md
CHANGED
|
@@ -244,7 +244,10 @@ gained repeat or component boundary does reach a modeled slot, and each of those
|
|
|
244
244
|
its own below. It stays silent in exactly one case,
|
|
245
245
|
where the trailing escape character heads a sequence this reader RECOGNIZES: that is the escape
|
|
246
246
|
mechanism working, and refusing it would refuse well-formed traffic. That is the only tail on which
|
|
247
|
-
a stream's escaping can be clean,
|
|
247
|
+
a stream's escaping can be clean, and so the only exclusion, **wherever the escape role is a
|
|
248
|
+
character distinct from the three splitting roles**. Where a header names the escape character in a
|
|
249
|
+
splitting role too, these codes can fire with neither escape report beside them, and what refuses the
|
|
250
|
+
stream is `ASTM_RECORD_DELIMITER_ROLE_COLLISION` instead. **That silence is a trade
|
|
248
251
|
and not a claim that nothing was lost there**: the gained field boundary is exactly as real, and on
|
|
249
252
|
that tail it is `warnings: []`, so `R|1|^^^687|28.6&F&|&F&U/L||||F` reads nine fields against the
|
|
250
253
|
competing alignment's eight and hands back a status of `final` with nothing reported at all. Read
|
|
@@ -285,8 +288,10 @@ read as more repeats at all, and that class was already refused by
|
|
|
285
288
|
survive a re-emit either: catch it on the first read.
|
|
286
289
|
|
|
287
290
|
**And where that gained boundary is a COMPONENT boundary, nothing leaves the record and the slots
|
|
288
|
-
MOVE.** Components are modeled inside a field, so every component after the gained boundary sits
|
|
289
|
-
|
|
291
|
+
MOVE.** Components are modeled inside a field, so every component after the gained boundary sits
|
|
292
|
+
further right than the competing alignment puts it, by a displacement that is **not fixed**: one
|
|
293
|
+
place where the field carries a single contested construct, one more for each additional one, and
|
|
294
|
+
none at all on the tie class. Counting warnings does not give it. On the canonical set,
|
|
290
295
|
`R|1|&F&^&GLU^L^687|28.6|U/L||||F` reads a Universal Test ID of four components, so `L` is the coding
|
|
291
296
|
scheme and `687` the vendor's local code; the competing alignment reads three, and `687` is the
|
|
292
297
|
**coding scheme**. A code-system selector and a vendor's local code are not the same thing.
|
|
@@ -407,15 +412,15 @@ outside it:
|
|
|
407
412
|
where the leftmost alignment lets a delimiter split that a competing alignment would have held,
|
|
408
413
|
gains a boundary instead of losing one and raises `ASTM_RECORD_AMBIGUOUS_ESCAPE_ALIGNMENT`, also
|
|
409
414
|
not tolerable. Where that gained boundary is a **field** boundary and the reading taken resumes on
|
|
410
|
-
an escape character heading no sequence it can interpret, every later field shifts
|
|
415
|
+
an escape character heading no sequence it can interpret, every later field shifts and a
|
|
411
416
|
result's units
|
|
412
417
|
and status are read out of slots the other alignment does not put them in: that raises
|
|
413
418
|
`ASTM_RECORD_ALIGNMENT_SHIFTED_FIELDS`, not tolerable either. Where it is a **repeat** boundary
|
|
414
419
|
nothing shifts, but the field is read out of its first repeat alone, so a gained first boundary
|
|
415
420
|
truncates a value and costs a test identity or a patient name the components that sat after it:
|
|
416
421
|
that raises `ASTM_RECORD_ALIGNMENT_TRUNCATED_FIELD`, not tolerable either. Where it is a
|
|
417
|
-
**component** boundary nothing leaves the record and every component after it moves
|
|
418
|
-
|
|
422
|
+
**component** boundary nothing leaves the record and every component after it moves along the
|
|
423
|
+
component list, so a coding scheme, a vendor local code or a given name is read out of a position the other
|
|
419
424
|
alignment does not put it in: that raises `ASTM_RECORD_ALIGNMENT_SHIFTED_COMPONENTS`, not
|
|
420
425
|
tolerable either.
|
|
421
426
|
|
package/dist/index.cjs
CHANGED
|
@@ -273,9 +273,12 @@ var WARNING_CODES = {
|
|
|
273
273
|
* Two escape alignments of the same bytes disagreed about a **field** boundary, the reading taken
|
|
274
274
|
* kept it, and the escape character that reading resumes on **heads no sequence this codec can
|
|
275
275
|
* interpret**, so the boundary was bought with bytes this reading cannot read while the competing
|
|
276
|
-
* alignment is exactly the reading that can. Every field after that point sits
|
|
277
|
-
* right than the competing alignment puts it,
|
|
278
|
-
*
|
|
276
|
+
* alignment is exactly the reading that can. Every field after that point sits further
|
|
277
|
+
* right than the competing alignment puts it, by a displacement that is **not fixed**: one place
|
|
278
|
+
* on a record carrying a single contested construct, one more for each additional one, and none
|
|
279
|
+
* at all **on the one class named at the end of this entry**, where the two readings instead read
|
|
280
|
+
* the same number of fields in different places. Counting these warnings does not give it; see
|
|
281
|
+
* {@link ShiftedFieldsSink}.
|
|
279
282
|
*
|
|
280
283
|
* **The shift is the harm, and on a result record it reaches the status slot.** Measured on the
|
|
281
284
|
* canonical set, `R|1|^^^687|28.6&F&|&U/L||||F` reads **9** fields under the reading taken and
|
|
@@ -320,7 +323,8 @@ var WARNING_CODES = {
|
|
|
320
323
|
* taken interprets a construct and leaves nothing unread: under a set naming the field separator
|
|
321
324
|
* `F`, `28.6&F&F&F&U/L` is that separator escaped, written, and escaped again, entirely well
|
|
322
325
|
* formed, and refusing it would be an over-refusal. That is the only tail on which a stream's
|
|
323
|
-
* escaping can be clean,
|
|
326
|
+
* escaping can be clean, on the declarations {@link ShiftedFieldsSink} scopes that to, which is
|
|
327
|
+
* why it is the only exclusion. Where the tail heads a sequence
|
|
324
328
|
* whose body is *unrecognized*, the reading taken consumes a triple it cannot read, preserved
|
|
325
329
|
* verbatim and never guessed at, the field shift is the same shift, and **this reports it**.
|
|
326
330
|
* Consuming a triple is not interpreting one.
|
|
@@ -398,8 +402,8 @@ var WARNING_CODES = {
|
|
|
398
402
|
*
|
|
399
403
|
* **Two further deliberate bounds, both stated rather than left to be found.**
|
|
400
404
|
* - **Only the repeat role.** The **component** role reaches a modeled slot too, and differently:
|
|
401
|
-
* there the components stay in the record and move
|
|
402
|
-
* coding scheme and a given name as a middle name. That is measured and is now reported by
|
|
405
|
+
* there the components stay in the record and move along the component list, so a local code
|
|
406
|
+
* reads as a coding scheme and a given name as a middle name. That is measured and is now reported by
|
|
403
407
|
* {@link WARNING_CODES.ASTM_RECORD_ALIGNMENT_SHIFTED_COMPONENTS}, a third code on the same tail
|
|
404
408
|
* test wired to the component split. It is still not covered **here**, because wiring a sink to
|
|
405
409
|
* another split is another criterion, which is why it took its own population measurement.
|
|
@@ -408,8 +412,8 @@ var WARNING_CODES = {
|
|
|
408
412
|
* this codec *recognizes*, it interprets a construct and the repeats are the ones the sender
|
|
409
413
|
* wrote: under a set naming the repeat separator `F`, `28.6&F&F&F&U/L` is that separator
|
|
410
414
|
* escaped, written, and escaped again, entirely well formed, and refusing it would be an
|
|
411
|
-
* over-refusal. That is the only tail on which a stream's escaping can be clean,
|
|
412
|
-
* is the only exclusion. Where the tail heads a sequence whose body is *unrecognized*, the
|
|
415
|
+
* over-refusal. That is the only tail on which a stream's escaping can be clean, on the
|
|
416
|
+
* declarations {@link ShiftedFieldsSink} scopes that to, which is why it is the only exclusion. Where the tail heads a sequence whose body is *unrecognized*, the
|
|
413
417
|
* reading taken consumes a triple it cannot read, preserved verbatim and never guessed at, the
|
|
414
418
|
* truncation is the same truncation, and **this reports it**.
|
|
415
419
|
* - **That remaining silence is a TRADE, not a claim that nothing was lost.** On the excluded tail
|
|
@@ -444,10 +448,11 @@ var WARNING_CODES = {
|
|
|
444
448
|
* {@link WARNING_CODES.ASTM_RECORD_ALIGNMENT_TRUNCATED_FIELD}, on the third and last splitting
|
|
445
449
|
* role, and what it costs is a third thing again, which is why it is a third code.
|
|
446
450
|
*
|
|
447
|
-
* **The components are neither shifted out of the record nor dropped from it: they MOVE
|
|
448
|
-
*
|
|
449
|
-
* every component after it exactly as a gained field boundary shifts every later field,
|
|
450
|
-
* on the one class named at the end of
|
|
451
|
+
* **The components are neither shifted out of the record nor dropped from it: they MOVE along the
|
|
452
|
+
* component list.** A field's components are modeled *inside* it, so a gained component boundary shifts
|
|
453
|
+
* every component after it exactly as a gained field boundary shifts every later field, by the
|
|
454
|
+
* displacement {@link ShiftedFieldsSink} states, **except on the one class named at the end of
|
|
455
|
+
* this entry**, where the two readings instead read the same
|
|
451
456
|
* number of components in different places. Nothing leaves the record and nothing changes field
|
|
452
457
|
* number; what changes is which modeled slot each component lands in, and those slots are named
|
|
453
458
|
* things:
|
|
@@ -499,7 +504,8 @@ var WARNING_CODES = {
|
|
|
499
504
|
* *recognizes*, it interprets a construct and the components are the ones the sender wrote: under
|
|
500
505
|
* a set naming the component separator `F`, `GLU&F&F&F&L` is that separator escaped, written, and
|
|
501
506
|
* escaped again, entirely well formed, and refusing it would be an over-refusal. That is the only
|
|
502
|
-
* tail on which a stream's escaping can be clean,
|
|
507
|
+
* tail on which a stream's escaping can be clean, on the declarations
|
|
508
|
+
* {@link ShiftedFieldsSink} scopes that to, which is why it is the only exclusion. Where the
|
|
503
509
|
* tail heads a sequence whose body is *unrecognized*, the reading taken consumes a triple it
|
|
504
510
|
* cannot read, preserved verbatim and never guessed at, the slots move exactly as far, and **this
|
|
505
511
|
* reports it**.
|
|
@@ -685,21 +691,21 @@ function ambiguousEscapeAlignment(position) {
|
|
|
685
691
|
function alignmentShiftedFields(position) {
|
|
686
692
|
return {
|
|
687
693
|
code: WARNING_CODES.ASTM_RECORD_ALIGNMENT_SHIFTED_FIELDS,
|
|
688
|
-
message: "A field boundary here is one of two escape alignments the bytes carry, and the reading that took it resumes on an escape character heading no sequence this reader can interpret, which the other alignment uses to close one. The two readings disagree, and both consume every byte, so neither is forced.
|
|
694
|
+
message: "A field boundary here is one of two escape alignments the bytes carry, and the reading that took it resumes on an escape character heading no sequence this reader can interpret, which the other alignment uses to close one. The two readings disagree, and both consume every byte, so neither is forced. How far the later fields are displaced is NOT fixed: one place where the record carries a single contested construct, one more for each additional one, and none at all on one measured class, where the sequence past the boundary carries the field separator itself and the two readings read the same number of fields with different contents. So a result's units and status may be read out of slots the sender did not put them in. Counting these warnings does not give the displacement. Read the raw line. The reading was kept and every byte is preserved.",
|
|
689
695
|
position
|
|
690
696
|
};
|
|
691
697
|
}
|
|
692
698
|
function alignmentTruncatedField(position) {
|
|
693
699
|
return {
|
|
694
700
|
code: WARNING_CODES.ASTM_RECORD_ALIGNMENT_TRUNCATED_FIELD,
|
|
695
|
-
message: "A repeat boundary here is one of two escape alignments the bytes carry, and the reading that took it resumes on an escape character heading no sequence this reader can interpret, which the other alignment uses to close one. The two readings disagree, and both consume every byte, so neither is forced.
|
|
701
|
+
message: "A repeat boundary here is one of two escape alignments the bytes carry, and the reading that took it resumes on an escape character heading no sequence this reader can interpret, which the other alignment uses to close one. The two readings disagree, and both consume every byte, so neither is forced. How many more repeats this field is read as is NOT fixed: one where the record carries a single contested construct, one more for each additional one, and none at all on one measured class, where the sequence past the boundary carries the repeat separator itself. Its modeled value and components are taken from the first repeat alone, so where that boundary is the first one the rest of the field leaves every modeled slot. Counting these warnings does not give the difference. Read the raw line. The reading was kept and every byte is preserved.",
|
|
696
702
|
position
|
|
697
703
|
};
|
|
698
704
|
}
|
|
699
705
|
function alignmentShiftedComponents(position) {
|
|
700
706
|
return {
|
|
701
707
|
code: WARNING_CODES.ASTM_RECORD_ALIGNMENT_SHIFTED_COMPONENTS,
|
|
702
|
-
message: "A component boundary here is one of two escape alignments the bytes carry, and the reading that took it resumes on an escape character heading no sequence this reader can interpret, which the other alignment uses to close one. The two readings disagree, and both consume every byte, so neither is forced.
|
|
708
|
+
message: "A component boundary here is one of two escape alignments the bytes carry, and the reading that took it resumes on an escape character heading no sequence this reader can interpret, which the other alignment uses to close one. The two readings disagree, and both consume every byte, so neither is forced. How far the later components of this field are displaced is NOT fixed: one place where the field carries a single contested construct, one more for each additional one, and none at all on one measured class, where the sequence past the boundary carries the component separator itself and the two readings read the same number of components with different contents. So a test identity's coding scheme and local code, or a patient's given and middle names, may be read out of slots the sender did not put them in. Counting these warnings does not give the displacement. Read the raw line. The reading was kept and every byte is preserved.",
|
|
703
709
|
position
|
|
704
710
|
};
|
|
705
711
|
}
|
|
@@ -1328,7 +1334,7 @@ var referenceCorpus = defineAstmProfile({
|
|
|
1328
1334
|
tolerate: [
|
|
1329
1335
|
{
|
|
1330
1336
|
code: "ASTM_UNKNOWN_ESCAPE_SEQUENCE",
|
|
1331
|
-
rationale: "The OSS reference stack (python-astm codec.py, firsthand-verified) treats '&' as literal data and never decodes escape sequences, so streams from that ecosystem carry non-standard '&\u2026&' bodies our escape-aware tokenizer flags. The body is preserved byte-for-byte in the value. NOT always non-clinical, and this is measured rather than assumed: where the body is a delimiter, that delimiter never became a field boundary, so `28.6&|&U/L` reads as one value with no units and no final status. That subset now also raises ASTM_RECORD_DELIMITER_SWALLOWED_BY_ESCAPE, which this profile cannot tolerate, so tolerating this code no longer hides it. The same holds for the mirror case, where a sequence ends where another could have begun and a delimiter splits that the other alignment would have held: that raises ASTM_RECORD_AMBIGUOUS_ESCAPE_ALIGNMENT, which this profile cannot tolerate either. Where that gained boundary is a field boundary and the reading taken resumes on an escape character heading no sequence this reader can interpret, every later field shifts and a result's units and status move with it, which raises ASTM_RECORD_ALIGNMENT_SHIFTED_FIELDS, untolerable here as well. Where that same gained boundary is a repeat boundary, nothing shifts but the field is read out of its first repeat alone, so a value truncates and a test identity empties, which raises ASTM_RECORD_ALIGNMENT_TRUNCATED_FIELD, untolerable here too. Where it is a component boundary, nothing leaves the record and no field number changes, and every component after it moves
|
|
1337
|
+
rationale: "The OSS reference stack (python-astm codec.py, firsthand-verified) treats '&' as literal data and never decodes escape sequences, so streams from that ecosystem carry non-standard '&\u2026&' bodies our escape-aware tokenizer flags. The body is preserved byte-for-byte in the value. NOT always non-clinical, and this is measured rather than assumed: where the body is a delimiter, that delimiter never became a field boundary, so `28.6&|&U/L` reads as one value with no units and no final status. That subset now also raises ASTM_RECORD_DELIMITER_SWALLOWED_BY_ESCAPE, which this profile cannot tolerate, so tolerating this code no longer hides it. The same holds for the mirror case, where a sequence ends where another could have begun and a delimiter splits that the other alignment would have held: that raises ASTM_RECORD_AMBIGUOUS_ESCAPE_ALIGNMENT, which this profile cannot tolerate either. Where that gained boundary is a field boundary and the reading taken resumes on an escape character heading no sequence this reader can interpret, every later field shifts and a result's units and status move with it, which raises ASTM_RECORD_ALIGNMENT_SHIFTED_FIELDS, untolerable here as well. Where that same gained boundary is a repeat boundary, nothing shifts but the field is read out of its first repeat alone, so a value truncates and a test identity empties, which raises ASTM_RECORD_ALIGNMENT_TRUNCATED_FIELD, untolerable here too. Where it is a component boundary, nothing leaves the record and no field number changes, and every component after it moves along the component list, so a test identity's coding scheme and local code and a patient's given and middle names are read out of positions the other alignment does not put them in, which raises ASTM_RECORD_ALIGNMENT_SHIFTED_COMPONENTS, untolerable here as well. Each of those three shift claims has one measured exception, where the sequence past the boundary carries the splitting delimiter itself: the two readings then read the same number of segments in different places, nothing moves index, and the record was already refused by ASTM_RECORD_DELIMITER_SWALLOWED_BY_ESCAPE. All three carry the same tail bound and stay silent in exactly one case, where the escape character past the boundary heads a sequence this reader RECOGNIZES, which is the escape mechanism working. How often that happens on this corpus is NOT measured and must not be guessed at: the firsthand grounding above is of the DECODE path only, and a relayed stream can still carry a device-written mnemonic. Tolerating this code does not quiet those three, and their absence is not a statement that nothing was lost."
|
|
1332
1338
|
}
|
|
1333
1339
|
]
|
|
1334
1340
|
});
|
|
@@ -2902,7 +2908,7 @@ function concatBytes3(chunks) {
|
|
|
2902
2908
|
}
|
|
2903
2909
|
|
|
2904
2910
|
// src/index.ts
|
|
2905
|
-
var VERSION = "0.0.
|
|
2911
|
+
var VERSION = "0.0.21";
|
|
2906
2912
|
|
|
2907
2913
|
exports.ALL_ASTM_WARNING_CODES = ALL_ASTM_WARNING_CODES;
|
|
2908
2914
|
exports.AMBIGUOUS_CODES = AMBIGUOUS_CODES;
|