#299 · The file conversion test writes a large generated timeline (#296)
- timeline-app
- pull request
Closes #296. **Finding: no bug on main.** `rational_index: invalid mutation or index error (9)` is SQLite's `SQLITE_INTERRUPT` (9): och-convert's per-statement instruction budget (about 20 million VM instructions, `native-store/src/sqlite.rs`) stopped the statement that filled the overview index. #296 was seen with the `och-convert` in the main checkout, built on 11 October, before #199 (17 October) changed the write to load the overview index in bulk, 5,000 times per statement. Every release since v0.1.0 includes #199. Reproduced with `bench/generate.mjs`'s timelines: | Moments | och-convert built 11 Oct | och-convert from main | | --: | --- | --- | | 5,000 | ok | ok (0.8 s) | | 20,000 | error (9) | ok (2.0 s) | | 100,000 | error (9) | ok (7.6 s) | Existing .och files aren't affected: the failure aborted the write (rolled back), so no file was left with a broken index, and nothing needs repairing. **Change:** `test/files.mjs` (run by CI's desktop job against the release binary) now converts the generated 20,000-moment timeline (clustered and coincident times, 2,000 durations, relationships) and reads it back. It passes with main's binary and fails with the 11 October one, so a regression of #199 is caught end to end; until now only the extension's own Python test covered the bulk build. **Separate, not changed here:** the generated *200,000*-moment timeline (with 20,000 durations and relationships and long notes) exceeds och-convert's configured limits rather than this budget: its file is just over the 64 MiB `TIMELINE_FILE_BYTES` default, and it takes about 19 s of the 20 s CPU limit (moments alone: 11.5 s). Those limits are intentional (#202) and documented.
Sources
Open #299 · The file conversion test writes a large generated timeline (#296) in the timeline