circagraph
Sign inSign up

openchronology/timeline-app on GitHub

The OpenChronology repository on GitHub, mirrored by och-import-github: issues and pull requests as durations (ongoing while open), what happened to them as moments, plus releases, milestones, commits and branches. The Branches view shows the most recently active branches each in a track of its own.

Source: https://github.com/openchronology/timeline-app

3,131 moments · 2026-10-05 CE 20:21:49 UTC – 2026-11-16 CE 12:10:45 UTC · by @athan · @athan

#581 Measures: totals in the desktop file's SQLite index (#574)

–

  • github
  • github/openchronology/timeline-app
  • github/openchronology/timeline-app#581
  • pull request
  • state:merged

Closes #574 (with #579 and #580), part 3 of #570. Stacked on #577–#580: until they merge, this diff includes their commits. A desktop file's moment index keeps its **measure totals**, as the browser index (#579) and the PostgreSQL trees (#580) do. Overview groups therefore carry the same `totals` in every edition. ## sqlite-rational (vendored) These changes aren't upstream yet; `vendor/README.md` says so, and they should go to athanclark/sqlite-rational before the copy is next updated from there. - **Sums:** rows may carry a `sums` vector of exact rationals, in a new hidden column holding canonical rationals joined by `;`. - Every node totals the vectors per subtree as it totals weights: in inserts, updates (of the sums alone, or of the key), deletes and bulk builds. - A summary row's `sums` is its rows' vectors added, read from whole subtrees. - **`q_sum`:** an exact sum aggregate. - **Older indexes:** an index whose shadow table predates sums keeps working without them, and refuses rows with sums. - **Tests:** the README documents both. Three new tests cover `q_sum`, random edits against hand sums, and an old index. The extension's own tests now run in CI. ## native-store - **Filling:** each bucket's sums are its moments' values per declared measure, using `q_sum` over `metadata.measures`, in name order. - **Sparse saves:** they recount changed times. A change of measure names rebuilds the index. - **Overviews:** they map the sums back to names, and coalesced groups add their totals. - **Older files:** a file saved before this (index layout 2, bumped to 3) is re-indexed when opened, and a whole save remakes an older index. ## Tests A Rust test (`measure_total_tests`) checks every group's totals at four thresholds against hand sums at four points: - after a whole save; - after sparse moves, value edits, deletions and additions; - after the measures are renamed; - on reopening a file marked with the older layout. `cargo test --lib`: 37 pass. The extension's Python suite: 15 pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/circagraph/timeline-app/pull/581

Related

Open #581 Measures: totals in the desktop file's SQLite index (#574) in the timeline

#581 Measures: totals in the desktop file's SQLite index…