test(accounting): the witnesses see what the formats actually hold (M-1..M-3)

Rows 2 and 3 require the build's inventory to EQUAL the witness's, so what
the witness does not count, nothing can lose visibly. An independent review
put a header and a comment in a docx, measured 0 of either in the bundle,
and the accounting still read "2 of 2 carried".

Thirteen classes are now counted, each with a red test written first:
docx header/footer, comment, endnote and text box (a box's paragraphs are
its own, or the text is booked twice) - pptx speaker note and hidden slide
(`show="0"`, no longer counted as an ordinary slide) - xlsx formula and
hidden sheet (the state lives in `workbook.xml` and is reached through the
relationship id, so the sheet part itself says nothing about it) - odt
header/footer from `styles.xml` and annotation (counted as prose, it made
the accounting demand a reader carry a note the author wrote to themselves)
- STS `mixed-citation`, `mml:math`, `fig` and its caption, measured by the
review at 4.1 % of N200's source text and 3.9 % of N100's.

M-2: the two STS witnesses had ONE role map between them, so row 5 -- "two
witnesses agree" -- could not see a hole in it. `_sts_role_xml` and
`_sts_role_json` are written apart, each for its own delivery, and a test
holds them apart.

M-3: 20 of 63 element types had a count of ZERO in their only fixture. Seven
hand-built documents close it, every element type now occurs at least once
(a test asserts it), and ALL TWENTY documents carry a hand count read off
the fixture's own bytes (four did before). `.xlsx image` -- the operator's
own proposed exception -- could not be exercised at all until now.

Every witness also states WHAT IT STILL DOES NOT COUNT, per file type, and
the gate prints that list on every run.

THE FIXTURE ROWS ARE RED NOW, AND THAT IS THE POINT. Row 2 red on .docx,
.odt, .pptx, .xlsx and .xml; row 3 at u = 25, d = 2 over the new classes,
including a footnote and four spreadsheet cells the build genuinely drops.
`0 claimed and not found` on the same run: nothing the build DOES book as
carried failed the bundle check, so the red is the build's and not the
instrument's.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-09-18 01:53:50 +02:00
commit e5dc21ec2f
Signed by: ktg
SSH key fingerprint: SHA256:JakMjO6FTBBzN0Bhfj9saOoEjaFxlSdYuZQQpM/lF9Q
14 changed files with 1542 additions and 59 deletions

View file

@ -1,5 +1,99 @@
{
"documents": {
"bilde.rtf": {
"elements": {
"cell": 0,
"image": 1,
"paragraph": 2,
"table_row": 0
},
"images": [
{
"kind": "embedded",
"ref": "",
"target": null
}
],
"suffix": ".rtf",
"texts": {
"cell": [],
"image": [
[]
],
"paragraph": [
[
"Figur 84-1 viser prinsippet."
],
[]
],
"table_row": []
},
"witness": "rtf control words"
},
"figur.html": {
"elements": {
"cell": 4,
"heading": 1,
"image": 1,
"list_item": 2,
"paragraph": 1,
"table": 1
},
"images": [
{
"kind": "local",
"ref": "graphics/figur-84-1.png",
"target": "graphics/figur-84-1.png"
}
],
"suffix": ".html",
"texts": {
"cell": [
[
"Klasse"
],
[
"Avvik"
],
[
"A"
],
[
"5 mm"
]
],
"heading": [
[
"Figur 84-1"
]
],
"image": [
[]
],
"list_item": [
[
"Klasse A"
],
[
"Klasse B"
]
],
"paragraph": [
[
"Prinsippet for toleranseklasser."
]
],
"table": [
[
"Klasse",
"Avvik",
"A",
"5 mm"
]
]
},
"witness": "html.parser"
},
"krav-rikt-tekstformat.rtf": {
"elements": {
"cell": 56,
@ -303,7 +397,9 @@
},
"krav-tekstdokument.odt": {
"elements": {
"annotation": 0,
"cell": 56,
"header_footer": 0,
"heading": 1,
"image": 0,
"list_item": 0,
@ -313,6 +409,7 @@
"images": [],
"suffix": ".odt",
"texts": {
"annotation": [],
"cell": [
[
"Dokumentnummer:"
@ -483,6 +580,7 @@
"2,5 cd"
]
],
"header_footer": [],
"heading": [
[
"Kravspesifikasjon for tunnelbelysning"
@ -563,6 +661,86 @@
},
"witness": "odt zip xml"
},
"liste-og-bilde.odt": {
"elements": {
"annotation": 1,
"cell": 2,
"header_footer": 2,
"heading": 1,
"image": 1,
"list_item": 2,
"paragraph": 4,
"table": 1
},
"images": [
{
"kind": "embedded",
"ref": "",
"target": null
}
],
"suffix": ".odt",
"texts": {
"annotation": [
[
"Sjekk denne mot N400 foer utsendelse."
]
],
"cell": [
[
"Type"
],
[
"Gangbru"
]
],
"header_footer": [
[
"Intern arbeidsversjon"
],
[
"Vegdirektoratet"
]
],
"heading": [
[
"Drift av gangbruer"
]
],
"image": [
[]
],
"list_item": [
[
"Rekkverk"
],
[
"Dekke"
]
],
"paragraph": [
[
"Gangbruer inspiseres hvert aar."
],
[
"Rekkverk"
],
[
"Dekke"
],
[
"Se figuren under."
]
],
"table": [
[
"Type",
"Gangbru"
]
]
},
"witness": "odt zip xml"
},
"logg.txt": {
"elements": {
"line": 4,
@ -715,6 +893,85 @@
},
"witness": "markdown lines"
},
"notater-og-skjult.pptx": {
"elements": {
"cell": 4,
"hidden_slide": 1,
"image": 0,
"note": 1,
"paragraph": 2,
"slide": 1,
"table": 2,
"title": 2
},
"images": [],
"suffix": ".pptx",
"texts": {
"cell": [
[
"Post"
],
[
"84.1"
],
[
"Post"
],
[
"84.1"
]
],
"hidden_slide": [
[
"Utgaatt lysbilde",
"Ikke vis dette.",
"Post",
"84.1"
]
],
"image": [],
"note": [
[
"Husk aa nevne at toleranseklassen er skjerpet."
]
],
"paragraph": [
[
"Toleranser er gitt i tabell."
],
[
"Ikke vis dette."
]
],
"slide": [
[
"Prosess 84 Konstruksjoner",
"Toleranser er gitt i tabell.",
"Post",
"84.1"
]
],
"table": [
[
"Post",
"84.1"
],
[
"Post",
"84.1"
]
],
"title": [
[
"Prosess 84 Konstruksjoner"
],
[
"Utgaatt lysbilde"
]
]
},
"witness": "pptx zip xml"
},
"parametre.json": {
"elements": {
"key": 6,
@ -769,6 +1026,8 @@
"prisark.xlsx": {
"elements": {
"cell": 18,
"formula": 0,
"hidden_sheet": 0,
"image": 0,
"row": 9,
"sheet": 2
@ -832,6 +1091,8 @@
"Sum ikke oppgitt"
]
],
"formula": [],
"hidden_sheet": [],
"image": [],
"row": [
[
@ -901,11 +1162,15 @@
"prosess-84-notat.docx": {
"elements": {
"cell": 0,
"comment": 0,
"endnote": 0,
"footnote": 0,
"header_footer": 0,
"heading": 0,
"image": 1,
"paragraph": 2,
"table": 0
"table": 0,
"text_box": 0
},
"images": [
{
@ -917,7 +1182,10 @@
"suffix": ".docx",
"texts": {
"cell": [],
"comment": [],
"endnote": [],
"footnote": [],
"header_footer": [],
"heading": [],
"image": [
[]
@ -930,14 +1198,17 @@
"Etter tabellen gjelder NS-EN 13670."
]
],
"table": []
"table": [],
"text_box": []
},
"witness": "docx zip xml"
},
"prosess-84-presentasjon.pptx": {
"elements": {
"cell": 0,
"hidden_slide": 0,
"image": 1,
"note": 0,
"paragraph": 0,
"slide": 1,
"table": 0,
@ -953,9 +1224,11 @@
"suffix": ".pptx",
"texts": {
"cell": [],
"hidden_slide": [],
"image": [
[]
],
"note": [],
"paragraph": [],
"slide": [
[
@ -974,9 +1247,13 @@
"prosess-84-sts.xml": {
"elements": {
"cell": 0,
"citation": 0,
"figure": 0,
"figure_caption": 0,
"footnote": 0,
"image": 2,
"list_item": 0,
"math": 0,
"paragraph": 2,
"section": 2,
"section_label": 2,
@ -999,12 +1276,16 @@
"suffix": ".xml",
"texts": {
"cell": [],
"citation": [],
"figure": [],
"figure_caption": [],
"footnote": [],
"image": [
[],
[]
],
"list_item": [],
"math": [],
"paragraph": [
[
"Toleranseklasse er gitt i tabell 84-2."
@ -1140,12 +1421,18 @@
"elements": {
"cell": 4,
"heading": 2,
"image": 0,
"image": 1,
"list_item": 2,
"paragraph": 1,
"table": 1
},
"images": [],
"images": [
{
"kind": "local",
"ref": "graphics/tabell-84-2.png",
"target": "graphics/tabell-84-2.png"
}
],
"suffix": ".htm",
"texts": {
"cell": [
@ -1170,7 +1457,9 @@
"Soner"
]
],
"image": [],
"image": [
[]
],
"list_item": [
[
"Inngang"
@ -1194,20 +1483,332 @@
]
},
"witness": "html.parser"
},
"skjult-ark-og-formel.xlsx": {
"elements": {
"cell": 7,
"formula": 1,
"hidden_sheet": 1,
"image": 1,
"row": 3,
"sheet": 1
},
"images": [
{
"kind": "embedded",
"ref": "",
"target": null
}
],
"suffix": ".xlsx",
"texts": {
"cell": [
[
"Post"
],
[
"Enhet"
],
[
"Mengde"
],
[
"Sum"
],
[
"12"
],
[
"24"
],
[
"Kladd"
]
],
"formula": [
[
"B2*2"
]
],
"hidden_sheet": [
[
"Kladd"
]
],
"image": [
[]
],
"row": [
[
"Post",
"Enhet",
"Mengde"
],
[
"Sum",
"12",
"24"
],
[
"Kladd"
]
],
"sheet": [
[
"Post",
"Enhet",
"Mengde",
"Sum",
"12",
"24"
]
]
},
"witness": "xlsx zip xml"
},
"sts-rikt.xml": {
"elements": {
"cell": 4,
"citation": 1,
"figure": 1,
"figure_caption": 1,
"footnote": 1,
"image": 1,
"list_item": 1,
"math": 1,
"paragraph": 5,
"section": 1,
"section_label": 1,
"table": 1,
"table_label": 1,
"title": 1
},
"images": [
{
"kind": "local",
"ref": "figur-84-1.png",
"target": "graphics/figur-84-1.png"
}
],
"suffix": ".xml",
"texts": {
"cell": [
[
"Klasse"
],
[
"IRI"
],
[
"1"
],
[
"1,5"
]
],
"citation": [
[
"NS-EN 13036-1:2010"
]
],
"figure": [
[
"Figur 85-1",
"Maalepunkter langs vegbanen."
]
],
"figure_caption": [
[
"Maalepunkter langs vegbanen."
]
],
"footnote": [
[
"Gjelder ikke gang- og sykkelveger."
]
],
"image": [
[]
],
"list_item": [
[
"Maales hvert 20. meter."
]
],
"math": [
[
"IRI",
"<",
"2"
]
],
"paragraph": [
[
"Dekket skal ha jevnhet etter",
"NS-EN 13036-1:2010",
"."
],
[
"Kravet regnes som",
"IRI",
"<",
"2",
"."
],
[
"Maalepunkter langs vegbanen."
],
[
"Maales hvert 20. meter."
],
[
"Gjelder ikke gang- og sykkelveger."
]
],
"section": [
[
"85",
"Vegdekker",
"Dekket skal ha jevnhet etter",
"NS-EN 13036-1:2010",
".",
"Kravet regnes som",
"IRI",
"<",
"2",
".",
"Figur 85-1",
"Maalepunkter langs vegbanen.",
"Tabell 85-1",
"Klasse",
"IRI",
"1",
"1,5",
"Maales hvert 20. meter.",
"Gjelder ikke gang- og sykkelveger."
]
],
"section_label": [
[
"85"
]
],
"table": [
[
"Tabell 85-1",
"Klasse",
"IRI",
"1",
"1,5"
]
],
"table_label": [
[
"Tabell 85-1"
]
],
"title": [
[
"Vegdekker"
]
]
},
"witness": "xml.etree"
},
"topptekst-og-kommentar.docx": {
"elements": {
"cell": 2,
"comment": 1,
"endnote": 1,
"footnote": 1,
"header_footer": 2,
"heading": 1,
"image": 0,
"paragraph": 3,
"table": 1,
"text_box": 1
},
"images": [],
"suffix": ".docx",
"texts": {
"cell": [
[
"Bredde"
],
[
"3,0 m"
]
],
"comment": [
[
"Unntak: gjelder IKKE gangbruer i tunnel."
]
],
"endnote": [
[
"Kravet ble skjerpet i 2024."
]
],
"footnote": [
[
"Se haandbok N400 kapittel 5."
]
],
"header_footer": [
[
"Statens vegvesen, side 1"
],
[
"Utkast - gjelder ikke etter 2026-01-01"
]
],
"heading": [
[
"Krav til gangbruer"
]
],
"image": [],
"paragraph": [
[
"Gangbruer skal ha rekkverk paa begge sider."
],
[
"Bredde"
],
[
"3,0 m"
]
],
"table": [
[
"Bredde",
"3,0 m"
]
],
"text_box": [
[
"Merk: kravet gjelder ikke midlertidige bruer."
]
]
},
"witness": "docx zip xml"
}
},
"files": {
"graphics/figur-84-1.png": {
"pointed_at_by": [
"figur.html",
"prosess-84-sts.xml",
"prosess-84-web.html"
"prosess-84-web.html",
"sts-rikt.xml"
]
},
"graphics/tabell-84-2.png": {
"pointed_at_by": [
"notat.md",
"prosess-84-sts.xml",
"prosess-84-web.html"
"prosess-84-web.html",
"side.htm"
]
}
},