feat(prepass): name the delivered excerpt nobody named, never refuse it [skip-docs]

GREEN for order 20260910T051343Z (P10). `unnamed_excerpts` reports every
delivered excerpt carrying no `title`, BY CONCEPT ID and in payload order --
ids, never a count, because "3 of 4 are unnamed" cannot be taken back to a
producer and "these three concepts are" can (ko-(y), one level down). It is
carried on `PrepassDeclaration` (DEFAULTED -- the `skipped_links` half, since
an empty trace here is an honest POSITIVE statement) and into
`{run_id}-prepass.json`, where a reader already looks for the denominators.

Absence ALONE, mirroring okf's `excerpt_unnamed` exactly: `title: ""` is a
name the producer chose badly, and reclassifying it would be repair.

Load-bearing MEASURED, five mutations all red against the WHOLE suite, green
control 1577 passed / 5 skipped (from 1570/5, superset, 0 removed), golden
demo-transcript.stdout BYTE-UNCHANGED (shasum -a 1 of the CONTENT =
ea8c534773acdbe41ae68f2c55724d69aaf8be4f): M1 the rule finds nothing (3 red) .
M2 it flags every excerpt (4, incl. the known-positive control) . M3 an empty
title counts as an absence (1 -- that arm ALONE) . M4 it never reaches the
declaration (2) . M5 it stops at the dataclass (1 -- the artefact arm ALONE).

Replay measured in the same session: both K2 payloads re-cut with okf consume
(PATH okf 0.7.0) into scratchpad/p10/, old files untouched. `okf check` goes
rc 1 / 8 and 12 findings -> rc 0 / 0 findings on both, 15 rules, known-negative
{} still rc 1 / 9. DIVERGENCE from the order's premise (ix): the denominators
did NOT move (629/621/8 and 629/617/12) because PATH okf 0.7.0 carries neither
--stem-prefix nor --source-quota. UNORDERED FINDING: the cut's CONTENT is a
different one -- the open arm no longer delivers the price schedule, delivered
text 141 470 -> 76 824 chars. Observed, not diagnosed.

docs/2026-09-10-p10-konform-k2-payload.md

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-09-10 08:03:38 +02:00
commit d8dadbf236
2 changed files with 227 additions and 0 deletions

View file

@ -665,6 +665,7 @@ class PrepassDeclaration:
delivered: int
withheld_rules: tuple[tuple[str, int], ...]
rest_reachable: bool
unnamed_excerpts: tuple[str, ...] = ()
def withheld_rule_counts(payload: PrepassPayload) -> tuple[tuple[str, int], ...]:
@ -685,6 +686,24 @@ def withheld_rule_counts(payload: PrepassPayload) -> tuple[tuple[str, int], ...]
return tuple(sorted(counts.items()))
def unnamed_excerpts(payload: PrepassPayload) -> tuple[str, ...]:
"""Every delivered excerpt carrying no ``title``, BY CONCEPT ID, in payload order.
okf's checker names this ``excerpt_unnamed`` (SS 8) and measured 20 of them across this
repository's two K2 payloads. On po's side the same absence was SILENT: ``_excerpt_header``
appends the ``title:`` field only when it is present and says nothing otherwise, so a payload
whose producer named nothing rendered exactly like one that had nothing to add.
Ids, never a count: "3 of 4 excerpts are unnamed" cannot be taken back to a producer, and
"these three concepts are" can -- ``BudgetExceeded``'s ko-(y) rule one level down.
**Absence only, mirroring okf's rule exactly.** An excerpt whose producer wrote ``title: ""``
HAS been named, badly; reclassifying that would be repair, and the header already renders it
as ``title: `` where an absent one renders nothing at all.
"""
return tuple(excerpt.concept_id for excerpt in payload.excerpts if excerpt.title is None)
def declaration_of(payload: PrepassPayload, *, rest_reachable: bool) -> PrepassDeclaration:
"""The declaration a verified payload supports, for the arm that consumed it.
@ -701,6 +720,7 @@ def declaration_of(payload: PrepassPayload, *, rest_reachable: bool) -> PrepassD
delivered=payload.denominators.delivered,
withheld_rules=withheld_rule_counts(payload),
rest_reachable=rest_reachable,
unnamed_excerpts=unnamed_excerpts(payload),
)
@ -720,4 +740,9 @@ def declaration_payload(declaration: PrepassDeclaration) -> Mapping[str, object]
# whether the consumer could still open the base would leave a reader unable to tell a
# bounded run from a seeded one -- the same undeclared claim, one level up.
"rest_reachable": declaration.rest_reachable,
# Which delivered excerpts nobody named. It DEFAULTS to empty (the ``skipped_links``
# half, never ``cost_baseline_anchored``'s): an empty list here is an honest POSITIVE
# statement -- every delivered excerpt was named -- so omission cannot be mistaken for
# a fact we failed to record.
"unnamed_excerpts": list(declaration.unnamed_excerpts),
}