Repository navigation
fix(spec): gate --strict on failures outside a known-failures list - #140
Merged
Merged
Conversation
The spec job failed on every run of main for three reasons, each fatal on its own. Cases that share a description within a file shared one baseline key, so a single passing prepare_database case made each failing sibling a regression. The second and later cases with a description now carry their ordinal in the key. --strict failed the run on any failing case. It now fails only on a failing case that testdata/spec_known_failures.txt does not list, and --update-baseline rewrites that list alongside the baseline. compliance/pico_timestamp held a case BigQuery accepts under a file-level unsupported_in_bigquery annotation. The case moves to the engine's PARSE_TIMESTAMP spec with the value measured from BigQuery. Fixes #139 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
4 of 5 tasks
incidentist
approved these changes
Nov 13, 2026
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.
Fixes #139
The
specjob has failed on every run ofmain. This PR makeszig build spec -- --strictexit 0 on the current tree while still failing on a new regression, a new failing case, or a staleunsupported_in_bigqueryannotation.This PR:
caseKeysinentrypoints/spec/spec_runner.zig). Many compliance files hold several cases described asprepare_database; they shared one key, so one passing case made every failing sibling a regression. That accounted for 102 of the 103 regressions. First occurrences keep their existing key.--strictfail only on a failing case thattestdata/spec_known_failures.txtdoes not list.--update-baselinenow rewrites that list alongsidetestdata/spec_baseline.txt.compliance/pico_timestamp, whose file-level annotation says BigQuery rejects it.Everything else is the regenerated lists and the docs that describe them.
What BigQuery does
SELECT PARSE_TIMESTAMP("%Y-%m-%dT%H:%M:%E*S%Ez", "2017-01-01T13:54:59.123456789012345Z")returns2017-01-01 13:54:59.123456 UTC(recidiviz-bigquery-sandbox, 2026-11-12). BigQuery accepts the query and drops the digits past the microsecond.What the emulator did
The engine already returned that instant. The case was reported as stale because it sat under an annotation covering picosecond literals, the
precisionnamed argument and braced STRUCT constructors, none of which it uses.Spec cases
testdata/specs/zigquery/functions/timestamp/parse_timestamp.zon, "parse timestamp with %E*S drops fractional digits past the microsecond".testdata/specs/googlesql/compliance/pico_timestamp.zon,parse_timestamp_truncates_beyond_precision.Where to look
IN UNNESTover NULL and empty arrays, FLOAT64 NaN and infinity read back as NULL, RANGE frames over NUMERIC and BIGNUMERIC, andEXCEPT ALL/INTERSECT ALL. Each needs its own issue.in_queries :: in_clause_not_in_null_selector_empty_unnest_is_null. It passed only whileNOTgrouped incorrectly; 3195f05 fixed the grouping and exposed theIN UNNESTbug above.tools/spec_import.pyre-imports the compliance suite it may restore the removedpico_timestampcase. I did not check how the importer treats removed cases.Checks
zig build testzig build test-serverzig build spec -- --strict(5413 pass, 0 regressions, 0 unlisted failures, 0 stale)zig fmt --check build.zig entrypoints(withtoolsincluded it trips locally on the git-ignored vendored ephor package undertools/ephor/zig-pkg/)🤖 Generated with Claude Code