Repository navigation
test(compile): name each SQL test cache miss when a delta comparison fails - #1405
Merged
Merged
Conversation
…fails The seeded delta-compile series in test_compile_delta.py sometimes fails in CI because one compile of a delta/full pair re-plans SQL tests and the other does not, from the same copied project. It has not reproduced locally, and the failure text only shows the extra "SQL test planning START" line. - A warm compile's cache-miss debug line now also names each missed record by its key's first 12 characters and its reason, for example "identity_changed=1 (records d11ac5013d79:identity_changed)". - A cache file that exists but yields no records (unreadable, cut short, malformed or simply empty) was silent; it now logs "(the cache file held no usable records)". - When a delta/full comparison fails, the series appends what each side's compile logged about the SQL test cache, so the CI log says which side missed, which records and why. These are synthetic test-project metadata only: record keys and reason labels, with no SQL text or environment. The hit/miss decision itself is unchanged: an artifact whose mtime differs from its record is already compared by digest before it counts as a miss.
kvlonge
enabled auto-merge (squash)
November 10, 2026 21:06
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.
Why
The seeded delta-compile series in
test_compile_delta.pysometimes fails in CI because one compile of a delta/full pair re-plans SQL tests and the other does not, from the same copied project. It has not reproduced locally, and the failure only shows the extra "SQL test planning START" line, so there is nothing to diagnose it from.Changes
identity_changed=1 (records d11ac5013d79:identity_changed).logs/<date>/<run>/diagnostics.jsonl. Record keys and reason labels only; no SQL text or environment.The hit/miss decision is unchanged. No DuckShop edge case: this adds diagnostics only and changes no project shape, data value or lifecycle behaviour.
Verification
test_sql_test_cache_misses.py(resized, rewritten and cut-short caches) and the delta compile series unit tests pass on the rebuilt extension.sqb compilewithout--debugwrites the miss to<project>/logs/<date>/<run>/diagnostics.jsonland not to stderr, which is where the series reads it.sqbpredates the current OpenAPI contract.