Skip to content

core: adapt to datascript Int64 values (pin e439cba) - #26

Merged
tiensonqin merged 1 commit into
mainfrom
devin/datascript-int64-adapt
Sep 26, 2026
Merged

tiensonqin merged 1 commit into
mainfrom
devin/datascript-int64-adapt

Conversation

@tiensonqin

Copy link
Copy Markdown
Contributor

Summary

Datascript upstream c39cad1 changed value's Int of int to Int64 of int64 (merged as e439cba in logseq/datascript-ocaml). Main's #main pin picked it up mid-run and broke CI; this PR adapts chat's ~105 Ds.Int call sites and repins datascript to e439cba.

Conversion convention: chat-side domain types stay int; wrap at the Ds.Int64 boundary with Int64.of_int / Int64.to_int. Test literals use the L suffix. Entity ids remain int (Ds.Ref / Ref_to are unchanged upstream).

Notable non-mechanical bits:

  • storage_codec.ml: Value.Int/Int64/Big_int all encode to Ds.Int64; decode accepts Transit.Int, Int64, and Big_int; Ds.Instant round-trips through Tagged ("m", ...).
  • sync_tx.ml: emits Transit.Int64 unconditionally (upstream sends Int64 on the wire).
  • cache_model.ml int_decode: Ds.Int64 → Int64.to_int, keeping created_at : int etc.
  • graph_bootstrap.ml: file/created-at and file/last-modified-at now write Ds.Int64 instead of Ds.Instant — upstream storage.ml demotes Instant to Int64 on read for attrs without :db.type/instant, so storing Instant there no longer round-trips.
  • Or-patterns Ds.Ref eid | Ds.Int eid were split into separate branches since Ref stays int while Int64 is int64.

Supersedes #25 (this branch contains its pin commit, then repins to e439cba).

Local: dune build @shared/native/runtest — 717 tests, all green.

Link to Devin session: https://app.devin.ai/sessions/9a91e201984a4d4f96ce3e0f86ac6668
Open in Devin Desktop: https://app.devin.ai/desktop/session/9a91e201984a4d4f96ce3e0f86ac6668?variant=devin
Requested by: @tiensonqin

@devin-ai-integration

Copy link
Copy Markdown

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

Datascript upstream c39cad1 changed value Int of int to Int64 of int64.
Convert at the boundary: chat domain types stay int, wrapped via
Int64.of_int/Int64.to_int; test literals get the L suffix; sync codec
emits Transit.Int64 unconditionally like upstream. file/created-at and
file/last-modified-at are written as Int64 rather than Instant since
upstream now demotes Instant to Int64 for attrs without
:db.type/instant on storage read.
@devin-ai-integration
devin-ai-integration Bot force-pushed the devin/datascript-int64-adapt branch from 313335c to 2bf4441 Compare September 26, 2026 13:58
@tiensonqin
tiensonqin merged commit 98ee215 into main Sep 26, 2026
3 of 5 checks passed
@tiensonqin
tiensonqin deleted the devin/datascript-int64-adapt branch September 26, 2026 14:30
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.

1 participant