Skip to content

WS2b: a cited fact is executable, fixtures beside fact tests, seeds by footprint - #55

Merged
CaffeinatedCoder merged 2 commits into
release/2.2.0from
build/ws2b-executable-facts
Oct 17, 2026
Merged

CaffeinatedCoder merged 2 commits into
release/2.2.0from
build/ws2b-executable-facts

Conversation

@CaffeinatedCoder

Copy link
Copy Markdown
Owner

WS2b's three rules (concept §6.3b), recorded as decision 107.

1. docs-query check: fact-not-executable-cited

The check fails at the citing line, naming the fact, when a fact without a test is cited by:

  • a refused entry of .claude/probe-axes.md whose reason names KB-NNN
  • a not-promised entry of claims.json whose source is the fact's file or which says fact:KB-NNN
  • an obligation's inapplicable declaration with cite: fact:KB-NNN
  • a Cite.Fact("KB-NNN") or Baseline.Fact("KB-NNN") literal in harness/ or probes/. These are read as text with comments blanked out.

"Without a test" means none, …, no path, a path whose file is missing, or a file that declares no KBNNN class. A Baseline.Fact also needs a fixture:.

Citations found in the repository today (the check's summary prints these counts; RepositoryTests holds floors on both the places read and the citations found):

Kind Places read Citations Facts cited
refused 3 0 none
not-promised 41 2 KB-001, KB-027 (via source)
obligation 11 0 none
harness 87 sources 2 KB-037 twice (HttpBaseline.cs:268, 281)

All 4 are executable, so the check is clean: 0 problems in 725 links, 512 ids, 4 fact citations (0 refused, 2 not-promised, 0 obligation, 2 harness) and 38 facts.

2. Fixtures beside fact tests

  • The fixture. test/CodoMetis.TypeKit.Facts/KBNNN.fixture.json holds the fact id and its answers. Each answer has an id, a kind (document with at, a JSON pointer; status; or exception), a when (axis to value, as a row names them), a value and a note. The entry names the file with a fixture: line.
  • The check. docs-query check adds three rules:
    • fact-fixture-missing: the file is missing.
    • fact-fixture: the file is not beside the test, or belongs to a fact without a test.
    • fact-orphan-fixture: no fact names the fixture.
  • Converted facts. KB-001, KB-026 and KB-027 (documents) and KB-037 (statuses, and the validator's exception) now use fixtures. Each test is a theory over its fixture's answers, so an answer that is never measured fails.
  • The reader. FactFixture is BCL only (a test holds it to that). Its doc comment states the rule the harness will follow for Baseline.Fact:
    • It reads only a fixture that a fact names, and only while the check is clean.
    • It uses the one answer whose every when setting matches the row. No match means the harness measures the framework itself; several matches are a harness error.
    • It compares by kind and never writes a fixture.
  • Not done. The harness is not wired to the fixtures yet.

3. prober seeds by footprint

Without --all, seeds runs only the probes where one of these is true:

  • the seeds identity changed: the probe's identity, its seeds, or the content of their patches
  • the product footprint changed since the commit where every seed was last caught
  • a file the seeds patch changed since that commit
  • no footprint is recorded
  • no run has caught all of the probe's seeds yet

It prints runs P: … or skips P: … with the reason. seeds-last.json gains probes (identity and commit per probe, carried forward for skipped probes), skipped and all, and the schema is updated. A missed seed drops the probe's record, so it is never skipped on the next run. --all runs every probe, and so does --probe P for P.

release.yml and AGENTS.md (Releasing) say the release runs seeds --all, locally before the tag. CI still builds no seed (decision 100), so in release.yml this is a comment, not a step.

Seeds

Rule Seeded defect Caught by
fact-not-executable-cited KB-037's test: line removed (scratch copy) check: HttpBaseline.cs:268 and :281, plus fact-incomplete, fact-fixture, fact-orphan-test
fact-not-executable-cited KB-027's test: pointed at a missing file (scratch copy) check: claims.json:11701, plus fact-untested, fact-fixture, fact-orphan-test
fact-not-executable-cited refused json.DefaultIgnoreCondition=Always cites prose KB-005 check: probe-axes.md:599
fact-not-executable-cited not-promised as-text-refused-in-globalization-invariant-mode sourced from KB-005 check: claims.json:573
fact-not-executable-cited obligation declaration cite: fact:KB-005 check: claims.json:11517
fact-not-executable-cited harness Cite.Fact("KB-005") check: HttpBaseline.cs:281
fact-fixture-missing KB001.fixture.json deleted (scratch copy) check: KB-001 entry line 9
fixture is read KB001 fixture "required": false KB001.The_framework_writes_the_body_the_fixture_holds
fixture is read KB037 fixture status 200 changed to 201 KB037.MVC_answers_as_the_fixture_holds(depth-1-query-unreadable)
seeds: identity identity comparison disabled A_changed_identity_reruns, A_changed_seed_reruns, A_seed_missed_after_a_catch_drops_the_record
seeds: footprint footprint comparison disabled A_changed_product_footprint_reruns
seeds: seeded file patched-file comparison disabled A_change_to_the_file_the_seed_patches_reruns
seeds: --all --all ignored All_ignores_the_record
seeds: missed seed record kept on a miss A_missed_seed_is_never_skipped_next_time, A_seed_missed_after_a_catch_drops_the_record
seeds: skipping never skips An_unchanged_probe_is_skipped_and_says_why, A_change_outside_the_footprint_skips
seeds: no footprint a missing footprint skips A_probe_without_a_recorded_footprint_runs

The rule's unit tests in FactCitationTests also seed each kind in a temporary repository.

Tests (through build-verdict)

DocsQuery.Tests 120 passed · Facts 69 passed, 9 skipped (the TYPEKIT_PG facts) · Prober.Tests 257 passed · Conventions.Tests 1484 passed.

No edits to harness/, probes/ or the tracked claims.json.

🤖 Generated with Claude Code

CaffeinatedCoder and others added 2 commits October 17, 2026 11:11
docs-query check gains fact-not-executable-cited: a refused entry of the
axes file, a not-promised entry or an obligation's inapplicable
declaration in claims.json, or a Cite.Fact/Baseline.Fact literal of the
harness and probe sources that cites a fact without a test fails at the
citing line. No test means none, no file, a missing file or no class of
the fact's id; Baseline.Fact also needs a fixture. The check also holds
fixture: lines (fact-fixture-missing, fact-fixture, fact-orphan-fixture),
and its summary counts citations by kind, with floors in RepositoryTests.

prober seeds without --all runs only the probes whose seeds identity
(probe identity, seeds, patch content), product footprint or seeded file
changed since every seed was caught; seeds-last.json records identity
and commit per probe, a missed seed drops the record, and each skip is
printed with its reason. --all runs everything; the release runs it.

Decision 107 records both, and the fixture convention the Facts commit
follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KB001, KB026, KB027 and KB037 hold their measured answers in
KBNNN.fixture.json beside the test (documents at a JSON pointer, statuses,
an exception at an operation), named by a fixture: line in the entry; each
test is a theory over the fixture's answers. FactFixture, BCL only, reads
them and states the rule the harness will follow when it reads one as
Baseline.Fact (decision 107). FixtureTests holds every copied fixture to a
loadable form and its fact's test class.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CaffeinatedCoder
CaffeinatedCoder merged commit 684372c into release/2.2.0 Oct 17, 2026
13 checks passed
@CaffeinatedCoder
CaffeinatedCoder deleted the build/ws2b-executable-facts branch October 17, 2026 09:37
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