Skip to content

Fix Build and test CI failures from CSharpDB integer overflow in index schema - #11

Merged
MaxAkbar merged 3 commits into
masterfrom
copilot/fix-build-and-test-job
Aug 10, 2026
Merged

Fix Build and test CI failures from CSharpDB integer overflow in index schema#11
MaxAkbar merged 3 commits into
masterfrom
copilot/fix-build-and-test-job

Conversation

Copilot AI commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

The Build and test workflow was failing because index writes/read predicates were coercing large values (UTC ticks, trigram codes, hashed token IDs) into INTEGER, which overflowed under current CSharpDB type handling. This updates the index schema to use 64-bit storage where required and forces stale schema rebuilds.

  • Schema correction for large numeric fields

    • Bumped IndexDatabase.CurrentSchemaVersion from 25 to 26 to trigger rebuild of incompatible local index DBs.
    • Changed affected columns from INTEGER to BIGINT in index DDL:
      • time/tick fields (*_utc_ticks)
      • file_trigrams.trigram_code
      • file_metadata_tokens.id (hash-derived, 63-bit range)
  • Regression coverage

    • Added CurrentSchemaStoresUtcTicksAsBigInt to ensure current schema accepts and matches large tick values in persisted rows.
internal const string CurrentSchemaVersion = "26";

await db.ExecuteAsync(
    "CREATE TABLE IF NOT EXISTS file_trigrams (root_id INTEGER, trigram_code BIGINT, file_id INTEGER)", cancellationToken);

await db.ExecuteAsync(
    "CREATE TABLE IF NOT EXISTS file_metadata_tokens (id BIGINT PRIMARY KEY, root_id INTEGER, file_id INTEGER, token TEXT)", cancellationToken);

Copilot AI and others added 2 commits August 10, 2026 18:16
Co-authored-by: MaxAkbar <13856299+MaxAkbar@users.noreply.github.com>
Co-authored-by: MaxAkbar <13856299+MaxAkbar@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job Build and test Fix Build and test CI failures from CSharpDB integer overflow in index schema Aug 10, 2026
Copilot AI requested a review from MaxAkbar August 10, 2026 18:21
@MaxAkbar
MaxAkbar marked this pull request as ready for review August 10, 2026 18:28
@MaxAkbar
MaxAkbar merged commit ea70798 into master Aug 10, 2026
1 check failed
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.

2 participants