Skip to content

Checker: never-submitted entries, readings in definition hashes, receipt account state - #39

Merged
kvlonge merged 4 commits into
mainfrom
feat/unobservable-cause
Nov 4, 2026
Merged

kvlonge merged 4 commits into
mainfrom
feat/unobservable-cause

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Three checker changes, gated together.

1. Never-submitted unobservable entries

Adds an optional cause = "not_submitted" to [[unobservable]] entries for obligations whose cases are never submitted, such as side-effecting functions a capture guard holds.

  • Such an entry needs a construct, a reason and at least one case. Its runs and probes must be empty, and each case must still exist with its sql_sha256 and cite the obligation.
  • The obligation reports a new reason, unverifiable_not_submitted. It stays in the denominator and never counts as satisfied.
  • An absent cause keeps today's 603 meaning and rules, including at least one run. Any other value is refused when the file loads.

Tests cover: a never-submitted obligation reporting its own reason; a stale case hash; an entry listing a run (refused); an unknown cause (refused); and a 603 entry without runs (still refused). Mutating the reason mapping or the runs check makes them fail.

2. Readings in the definition hash (D118 follow-up)

A form's definition_sha256 now covers its [[reading]] from coverage/syntax/limits.toml, so editing a reading makes that form's per-form review stale and no other form's. Forms without a reading keep their hash.

  • limits.toml is required. A misspelt table, a form read twice, or a reading of a form that isn't catalogued is refused.
  • grammar_sha256 is the form's grammar hash or prose:<heading>. grammar lines must not be blank, and the list may be empty for a lexical form whose reason explains it. On the catalogue, 30 readings are prose and 12 are lexical. The second commit's message says 54; the correct total is 42.
  • Tests: editing the form's own reading makes its review stale; editing another form's reading leaves it current. Mutating the hash to ignore readings fails the first test.
  • Rollout, measured on catalogue 72ccd4f, evidence 6ffe5bf and audit 03c9634, comparing main be4dfac's checker with this branch's (same parser tree, 359f8b8a): 64 forms become stale, exactly the forms with a reading under a per-form review. A 65th, object-agg, was already stale. Verified goes from 1,079 to 1,015, satisfied obligations are unchanged, and there are 0 problems.

3. Receipt account_state (D120)

Receipts may carry an optional account_state: account parameters by name, each { "value": string | null, "basis": string }. A null value means the receipt has no usable recorded_at. It is validated (at least one parameter, a non-blank basis, no unknown fields, no account, host, URL or address) and carried onto each case result in family --json, so a phase that differs under another account state can be told apart. It changes no verdict.

Tests cover a valued and a null parameter carried only by their case, a blank basis, an address in the basis, and an unknown field. Mutations that drop the carry-through or the address check make them fail.

All three are documented in docs/syntax-coverage.md.

An [[unobservable]] entry may set cause = "not_submitted" for cases that were
never sent to Snowflake, such as side-effecting calls a capture guard holds.
It has no runs or probes, and its obligation reports
unverifiable_not_submitted instead of unverifiable_internal_error, kept in the
denominator and never satisfied. An absent cause keeps today's 603 meaning;
any other value is refused.
…nt state

A form's definition hash now covers its [[reading]] from limits.toml, so
editing a reading stales that form's per-form review and no other. Forms
without a reading keep their hash. limits.toml is required; a duplicate
reading or one naming an uncatalogued form is refused.

Receipts may carry an optional account_state (D120): account parameters by
name, each with a value (or null) and a basis. It is validated, shown on
each case result, and changes no verdict.
kvlonge added a commit that referenced this pull request Nov 4, 2026
The readings named create-iceberg-table forms that are now
absent_from_source (renamed or split; see aliases.toml). The builder
already ignored them, and the checker change in #39 refuses a reading of
a form that is not catalogued. Obligations and cases are unchanged.
A reading's grammar_sha256 may be a prose heading, as its form's is, and a
lexical form's reading may have no grammar lines when its reason explains
it. 54 readings in the catalogue have one or both.
@kvlonge kvlonge changed the title Let unobservable entries record never-submitted cases Checker: never-submitted entries, readings in definition hashes, receipt account state Nov 4, 2026
@kvlonge
kvlonge merged commit 9c7c3d2 into main Nov 4, 2026

kvlonge commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Folded into #38 under D122 and landed with it in a2c64d6 at the gated tree, with a local gate (make check-merge RECORDER=0, exit 0 on 736cf93). GitHub marks this PR merged because its head is in main.

kvlonge added a commit that referenced this pull request Nov 4, 2026
Basis: main 00e831a (PR #38, #39, #40), catalogue 5f35885,
evidence 469edde, parser tree 08415e1.

- 68 rebinds (ddl 1, expressions 6, functions 59, query 2): #39 put
  [[reading]] grammars into the definition hash; each fingerprint equals
  one an earlier full-read review approved.
- 149 newly approved forms (ddl 71, functions 56, scripting 14,
  expressions 5, query 2, transaction_session 1), read against their
  pinned pages and raw parser trees.
- Not approved: 37 forms with catalogue findings and 1 withhold
  (sf.ddl.drop-sequence: RESTRICT is dropped from the tree).

Checker at 00e831a: valid, 3476 forms; 1239 of 3348 verified.
@kvlonge
kvlonge deleted the feat/unobservable-cause branch November 9, 2026 21:31
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