Skip to content

fix(3-6): accept Integer default for non-Boolean cells#81

Closed
ruizmaa wants to merge 63 commits into
masterfrom
semantic-errors
Closed

fix(3-6): accept Integer default for non-Boolean cells#81
ruizmaa wants to merge 63 commits into
masterfrom
semantic-errors

Conversation

@ruizmaa
Copy link
Copy Markdown
Contributor

@ruizmaa ruizmaa commented May 27, 2026

fix(3-6): accept Integer default for non-Boolean cells

__check_default_value raised 3-6 for Integer 0 defaults on Item and
TimeInterval cells because no direct promotion path exists between those types.

The fix adds a third acceptance condition: if both types share a common promotion
target (their promotion sets intersect) and neither is Boolean, the default is
valid. In practice this means 0 is accepted as a numeric null sentinel for any
non-Boolean cell type.

Impact

7 operations no longer raise 3-6.

operation_vid code release expression
10353 v8803_m 4.0 with {tB_01.02, default: 0, interval: false}: if (not (isnull ({c0110}))) ...
10684 v8804_m 4.0 with {tB_01.02, default: 0, interval: false}: if ({c0040} != [eba_CT:x318] ...
10355 v8805_m 4.0 with {tB_02.01, default: 0, interval: false}: if ({c0020} = [eba_CO:x3]) ...
10593 v8816_m 4.0 with {tB_02.02, default: 0, interval: false}: {c0080} > {c0070}
10667 v8817_m 4.0 with {tB_05.01, default: 0, interval: false}: if ({c0070} = [eba_CT:x212]) ...
10595 v8821_m 4.0 with {tB_05.01, default: 0, interval: false}: if ({c0020} = [eba_qCO:qx2000]) ...
10654 v8825_m 4.0 with {tB_07.01, default: 0, interval: false}: if {c0050} = [eba_ZZ:x959] ...

Checklist

  • Code quality checks pass (ruff format, ruff check, mypy)
  • Tests pass (pytest) with 100% branch coverage (coverage report --fail-under=100)
  • Documentation updated (if applicable)

Impact / Risk

  • Breaking changes? (public API / CLI / REST endpoints / Django models)
  • Database schema or migration concerns?
  • Notes for release/changelog?

Notes

ruizmaa added 30 commits May 14, 2026 17:14
andres-sole and others added 28 commits May 25, 2026 12:22
The refactor to call_args-based assertions dropped the "called exactly
once" check. Restores it at both call sites without requiring the
assertion to know about the new output_path keyword arg.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
A2 - Extend `sub` to accept multiple substitutions
A12 - Relax `time_shift` `numberPeriods` to accept integer expressions
A1 - Relax `not` to prefix unary operator (no mandatory parentheses)
…directional

fix(3-6): accept String default for cells whose type promotes to String
@ruizmaa ruizmaa requested a review from a team May 27, 2026 10:10
@ruizmaa ruizmaa closed this May 27, 2026
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.

3 participants