Skip to content

Bound large database comparisons and structure JSON failures - #5064

Merged
Widthdom merged 3 commits into
mainfrom
fix-issue5052
Aug 9, 2026
Merged

Bound large database comparisons and structure JSON failures#5064
Widthdom merged 3 commits into
mainfrom
fix-issue5052

Conversation

@Widthdom

@Widthdom Widthdom commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Short-circuit comparisons of the same SQLite snapshot before row enumeration, including safe URI, symlink, and hard-link aliases.
  • Detect separate sidecar-free byte-identical database copies with fixed-size buffers while retaining existing row and per-row byte budgets for distinct inputs.
  • Return typed, parseable import --check --json budget failures and actionable human diagnostics.

Root cause

Large identical databases always entered the bounded streaming row comparison, so an identical input could exhaust the one-million-row safety budget. The import boundary also treated comparison-budget exhaustion as an unclassified failure. Filesystem identity alone was insufficient for aliases because immutable-mode and path-specific SQLite sidecars can expose different snapshots.

Validation

  • Release solution build: 0 warnings, 0 errors.
  • Focused diff/import suite after the final review fixes: 111 passed on net8.0 and 111 passed on net9.0.
  • Full solution suite: net8.0 passed 11,182 tests with 7 skipped; net9.0 had one unrelated timing assertion failure, and its immediate focused retry passed on net8.0 and net9.0 (Stabilize candidate-ordered serial recovery timing assertion under full-suite load #5063).
  • The repository's current large database now returns identical/exit 0 for a same-path summary diff.
  • Changelog fragment validation: 20 fragments validated.
  • Codex adversarial review completed in two rounds; all reported WAL/alias and recovery-guidance findings were addressed.

Base

This branch is intentionally based on d444cfdb2c660425afda504b9998977cdf15c89e. Newer origin/main commits were not incorporated per maintainer instruction.

Documentation and changelog

  • Updated the English and Japanese sections of DEVELOPER_GUIDE.md and TESTING_GUIDE.md.
  • Added changelog.d/unreleased/5052.fixed.md.

Follow-up

Fixes #5052

@Widthdom
Widthdom marked this pull request as ready for review August 9, 2026 18:01
@Widthdom
Widthdom merged commit bbc446c into main Aug 9, 2026
11 checks passed
@Widthdom
Widthdom deleted the fix-issue5052 branch August 9, 2026 18:01
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.

Make large database comparison paths bounded, fast for identical inputs, and JSON-safe

1 participant