Commit 349c6db
committed
fix: reject orphan attachments in generic decoder (SPEC 16.5)
A .field attachment whose name is neither a ^-marked column of its row nor a
>-containing field name (SPEC 7.4.6.1.4) is now rejected as orphan_attachment,
instead of being silently absorbed as an undeclared extra field. The old
leniency (introduced in the v2.2.1 >-field work, which over-broadly disabled the
v2.1.0 orphan reject) was a lossless-round-trip hole: a stray .field decoded to a
record shape no encoder produces, injecting a field onto the last-parsed row.
The legitimate >-named bare attachment still decodes. Verified against the shared
conformance fixtures (016 now rejects; flatten/016 still round-trips).1 parent dd9d7d8 commit 349c6db
2 files changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
521 | 521 | | |
522 | 522 | | |
523 | 523 | | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
524 | 529 | | |
525 | 530 | | |
526 | 531 | | |
| |||
541 | 546 | | |
542 | 547 | | |
543 | 548 | | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
544 | 557 | | |
545 | 558 | | |
546 | 559 | | |
| |||
0 commit comments