Skip to content

feat(coverage): credit shell forms only from their cited cases - #353

Open
kvlonge wants to merge 2 commits into
mainfrom
feat/coverage-shell-links
Open

kvlonge wants to merge 2 commits into
mainfrom
feat/coverage-shell-links

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Why

A refused statement whose refusal names no form counted against every form it linked. Forms nearly every statement uses, such as identifiers, were reported refused because of unrelated refusals elsewhere in the statement, and so could never match.

Changes

  • A [[link]] in form-links.toml may set shell = true. Only the cases a shell form's own required obligations cite credit it.
  • A refused statement counts against a shell form when the refusal names the shell's construct or the whole statement, or when the statement links no other form. A differing statement counts against it only in that last case, so no refusal or difference lands on no form.
  • At load, a shell form must have a required obligation citing a case, and a form's links are all shells or none.
  • PostgreSQL marks one link as a shell:
    • pg.expressions.sql-syntax-lexical.identifier (spelling:identifier): nearly every statement names a column or table. Its credit now comes only from its hand cases h001 and h002.
  • The README in coverage/translation documents the field.

Verification

  • New results tests (14 cases):
    • credit comes only from cited cases;
    • a refusal of the shell's own construct, of the whole statement, or of a statement linking only shells refuses it;
    • a Differs statement linking only shells, or linking only an effect form as a query, counts against it;
    • an all-shell form whose only cited case is refused or differs does not match;
    • both load errors.
  • Mutation checks:
    • crediting shells from every statement fails the tests;
    • blaming no form on an unnamed refusal fails the tests.
  • One independent review and one follow-up on its fixes.
  • Measures over the pinned evidence:
    • PostgreSQL: 462 → 463 of 940 matching. Identifier goes from refused to matching; 2 statements that use only identifiers now credit no form.
    • Unchanged, each baseline holding exactly: Databricks 516/825, SQLite 234/234, Snowflake 85/1183.
  • make check-ci passes.

A [[link]] marked shell = true names forms nearly every statement wraps
others in, such as identifiers. Only the cases a shell form's required
obligations cite credit it; a refusal counts against it when it names its
construct or the whole statement, or when the statement links no other
form, and a differing statement only in that last case. A shell form
needs a cited obligation, and its links are all shells or none.

PostgreSQL marks the identifier link a shell.
A query statement whose only other form takes only effect statements,
and a statement linking only shells refused on a key naming a form it
does not use, now count against their shells, so no refusal or
difference counts against no form.
@kvlonge
kvlonge enabled auto-merge November 30, 2026 18:17

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