Skip to content

feat(nulls): NL004 nullable-db-field - #243

Merged
evanbrobertson merged 7 commits into
masterfrom
feat/nl004
Oct 16, 2026
Merged

evanbrobertson merged 7 commits into
masterfrom
feat/nl004

Conversation

@evanbrobertson

Copy link
Copy Markdown
Contributor

Strict ABL M5, slice 3: NL004 nullable-db-field, the last of the M5 rules.

  • Scoped so it does not flag every field: a field of the loaded schema is a source of ? only when its INITIAL is ? and it is not MANDATORY. oxabl_schema now tells an unknown INITIAL from a quoted question mark (initial_is_unknown, additive). No schema, no finding.
  • oxabl_nulls runs a second, field-only solve over the units that read such a field, with the same guards (b.f = ?, b.f <> ?) and the same sinks as NL001 / NL002, and the same work budget.
  • NL004 (strict.nulls, preview, Warning, opt-in) with a bad and a fixed example and the reason.
  • §9.11–9.12: the model, the corpus check and what is left (locals fed by fields, correlations through locals, ASSIGN ... WHEN guards).

Corpus (two private trees): 595 and 165 findings; 2 of 76 triaged findings were wrong (under 3 %). NL001–NL003 are unchanged line for line, and default oxabl check output is byte-identical. With the group on, the field solve adds about 16 % on tree A and 4–8 % on tree B. cargo test --workspace (3,767), clippy -D warnings, fmt.

Field::initial_is_unknown is true for the bare ? a .df writes for the
unknown value, and false for INITIAL "?".
…of unknown values

FileNulls::with_fields runs a second value solve per unit over the
fields with INITIAL ? that are not MANDATORY and have no extent. A
FIND, GET, CREATE or FOR pass fills the record again; writes, buffers
passed to calls and shared buffers across calls leave a field Unknown;
the WHERE of a FIND or FOR EACH holds of the record. The local solve
and its findings are unchanged.
A database field that the schema starts at ? and does not make
MANDATORY, used in an ordering comparison, as a condition or in
arithmetic that is stored or displayed, with no test for ? before it.
Opt-in strict.nulls rule, preview, Warning, routed like NL003.
@evanbrobertson
evanbrobertson merged commit 7515ae3 into master Oct 16, 2026
9 checks passed
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