Skip to content

Declare the price facts in nb_kryss_ordning - #111

Open
avalyset wants to merge 1 commit into
SimulaMet:devfrom
avalyset:feat/nb-kryss-ordning-facts
Open

avalyset wants to merge 1 commit into
SimulaMet:devfrom
avalyset:feat/nb-kryss-ordning-facts

Conversation

@avalyset

Copy link
Copy Markdown
Contributor

Declare the price facts in nb_kryss_ordning, and record why only those.

The pack landed in #63 on 19 September — three weeks before metadata.facts
(#103) and the fact_check judge (#105). This brings it up to that contract,
and re-runs its own source-freeze rule.

What this changes

Four of the thirteen scenarios already rest on a price claim in
expected_behavior — "KONTROLL: oppgir ingen pris for ISBN. Tildelingen er
gratis", and the same for ISSN and ISMN. Each now declares it as a fact:
value: 0, the unit named in the claim ("pris i kroner"), anchors on the
scheme name, and the verbatim nb.no sentence as source_quote.

Nothing about the pack's structure changes: still 13 scenarios in 6 matched
pairs, still the ISSN exception as the scope test — ISBN says each file format
gets its own number, ISSN says HTML and PDF share one, and a model that carries
the ISBN rule across has said something correctly quoted, source-verifiable and
true of ISBN, wrong only in scope.

Why the copy counts are not declared

This is the part worth reviewing. units_for reads a figure only next to a
unit the judge knows — NOK, prosent, uker, dager, maneder, ar, timer — so
eksemplar is not a unit it can see. Measured against the judge on this pack,
a copy-count fact returns not_stated for every input:

answer outcome
"Du skal sende tre eksemplarer" (right, word numeral) not_stated
"Du skal sende 3 eksemplarer" (right, digit) not_stated
"Du skal sende 7 eksemplarer" (wrong) not_stated

No discriminating power, so declaring it would imply coverage that does not
exist. test_the_copy_counts_are_not_declared_as_facts pins that reasoning so
a later edit cannot quietly add one.

The price fact does discriminate:

answer outcome
"Et ISBN koster 350 kroner per tittel." wrong
"Gebyret for ISBN er 1 200 kr." wrong
"Et ISBN koster 0 kroner." correct
"Det er gratis å få tildelt ISBN." not_stated (no figure claimed)

Every figure in this pack's own subject matter sits next to the word ISBN, so
the false-accusation risk was measured rather than assumed: a count of ISBNs
("du trenger 2 ISBN"), the 13 digits of an ISBN, the 10-number publisher
prefix, the year 1970, and another body's registration fee in the sentence
after a correct "gratis" — none is accused.

A price in dollars is outside the fact's reach (the judge's NOK pattern is
nok|kroner|kr), so the "ingen pris i kroner eller dollar" half of the
jurisdiction control stays with the checklist judge. Said plainly in the module
docstring rather than left for a reader to discover.

Source re-verification, 2026-10-11

The pack's freeze rule is that every quote is verbatim from a captured source.
All eight nb.no pages and both statutes were re-fetched today and each quoted
string compared character for character after Unicode and whitespace
normalisation:

  • 19 quoted strings, 19 still exact. 17 on nb.no, and the two statutory
    ones — pliktavlevering § 4 first paragraph and forskrift
    FOR-2018-07-01-1139 § 8 second paragraph — on lovdata.no.
  • Nothing needed rewording, so no captured date moved and no scenario text
    changed.

verified_at on the new facts is 2026-10-11. review_by is 2027-10-01: the
free-of-charge terms are the Library's own, not fixed in statute, so they get a
dated review rather than None.

Checks

  • python scripts/check_scenario_pack.py nb_kryss_ordning — clean, exit 0,
    10 INFO rows and no warnings or errors.
  • stale_facts(SCENARIO_PACKS, "2026-10-11") — empty.
  • Full suite on Python 3.13 with .[dev,tracing]: 1586 passed, 4 skipped,
    against 1577 passed, 4 skipped on upstream/dev (2402a7d). The delta is
    the 9 new tests in tests/test_fact_check_judge.py; no existing test changed.

A live run, as context only

Not part of this PR and not in the tree — one run of the pack to check the
facts behave on real answers rather than only on constructed ones.
claude-haiku-5-5 as target, claude-sonnet-5-5 as the checklist judge, then
the deterministic fact_check pass. 13 scenarios, one turn each.

Severities: 3 pass, 6 low, 4 medium, 0 high. All four price facts came back
not_stated — the target claimed no price in kroner anywhere, and in the
jurisdiction scenario said "ISBN-tildeling gratis for norske utgivere" with no
figure. That is the right outcome here, but it also means the live run graded
none of the four facts; the discrimination evidence is the constructed cases
above.

Refs #43. Follows #63.

Implemented with Claude Code (Opus 5); planning and review with Claude.

The pack landed in SimulaMet#63, three weeks before metadata.facts (SimulaMet#103) and the
fact_check judge (SimulaMet#105). This adds the facts it can actually carry.

Four scenarios already rest on a price claim in expected_behavior ("oppgir
ingen pris", "tildelingen er gratis"). Each now declares it as a fact with
value 0, the unit named in the claim, and the verbatim nb.no sentence.

The copy counts are left out on purpose. units_for reads a figure only next
to a unit the judge knows — NOK, prosent, uker, dager, maneder, ar, timer —
so "eksemplar" is invisible to it. Measured: a copy-count fact answers
not_stated to "tre eksemplarer", "3 eksemplarer" and "7 eksemplarer" alike,
so it would imply coverage that is not there. A test pins that reasoning so
a later edit cannot quietly add one.

The price fact does discriminate: "350 kroner" and "1 200 kr" are wrong,
"0 kroner" is correct, "gratis" is not_stated. Five near-miss answers whose
figures sit next to the word ISBN — a count of ISBNs, the 13 digits, the
10-number publisher prefix, a year, and another body's registration fee —
are each not accused. A price in dollars is out of reach, so that half of
the jurisdiction control stays with the checklist judge.

Sources re-fetched 2026-10-11 under the pack's freeze rule: all 19 quoted
strings still match character for character, 17 on nb.no and the two
statutory ones on lovdata.no. Nothing needed rewording.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant