fix(capabilities): gate ibis-sqlite MA multiplier durations — clean BackendCapabilityError (item 99) - #301
Merged
discreteds merged 4 commits intoAug 18, 2026
Conversation
…t error on ibis-sqlite (item 99)
…qlite MA wrappers (item 99)
…s facts, regenerate coverage docs (item 99)
discreteds
deleted the
bugfix/ibis-sqlite-timestampbucket-raw-error-leak
branch
August 18, 2026 06:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes backlog item 99: the last raw-error leak in the datetime rounding surface.
dt.truncate("2d")/round_dt("3h")/ceil_dt("12mo")/floor_dt("2w")onibis-sqlitereached ibis'sTimestampBucket(multiple > 1), which has no sqlite compilation rule — raising a raw nativeOperationNotDefinedErrorinstead of the cleanBackendCapabilityErrorthe capability spine promises. Every other backend/dialect honored the multiplier or raised the declared error; ibis-sqlite was the sole silent leak.Root cause
unitoption ("2d"); the multiplier is derived later by the backend body viaparse_ma_unit. There is nomultipleoption on the MA node.capability_for(MA_FKEY, "unit", ..., option_value="2d"). The existing ibis-sqlite facts incapabilities/datetime/options.pyare exact-value facts for the single-unit domain ("1h","1q", …) —"2d"matched nothing, so the call passed through tox.bucket().round_temporal/round_calendar) already gatemultipleon ibis-sqlite (rounding.py); only the MA-wrapper path was ungated.Fix
DURATION_MULTIPLIERvalue-class facts (param="unit", ibis,ibis-sqlite) forTRUNCATE/ROUND/CEIL/FLOORincapabilities/datetime/value_classes_ma.py. The visitor option gate resolves value-class facts, so the cleanBackendCapabilityErrornow fires at build time."1d"-style single units do not match the class predicate (multiplier ≥ 2) — unaffected.test_option_fact_integrity.pynow exempts class facts whose(backend, dialect)the 4-fixture matrix cannot instantiate (mirrors the existing_MATRIX_UNREACHABLE_DIALECT_FACTSexact-arm precedent), with a new staleness guard.TestMaMultiplierIbisSqliteGatebuilds a real ibis-sqlite backend — 4 multiplier durations raiseBackendCapabilityError, 4 single-unit durations still compile/evaluate (no over-gating). RED→GREEN: the tests failed with the rawOperationNotDefinedErrorbefore the facts landed.KNOWN_GAPSentry (added when the gap was only disclosed) is retired — the fact supersedes it. Coverage docs regenerated.Verification
23119 passed, 81 skipped, 3470 xfailed(baseline +13 = the new gate tests).test_datetime_rounding.py,test_option_fact_integrity.py,test_datetime_value_class_dispatch.py,test_arg_types_datetime.py,test_datetime_unit_dispatch.py,test_expression_coverage_doc.py,test_capability_value_class_gate.py.test_expression_coverage_doc.py).truncate('2d')raisedOperationNotDefinedError: Compilation rule for 'TimestampBucket' operation is not defined→ nowBackendCapabilityError;truncate('1d')unchanged.Spec:
mountainash-central/04.planning/mountainash/superpowers/specs/2026-08-18-ibis-sqlite-timestampbucket-raw-error-leak-design.mdPlan:
mountainash-central/04.planning/mountainash/superpowers/plans/2026-08-18-ibis-sqlite-timestampbucket-raw-error-leak.md