8000 Merge main into v3 (#445, #447 fixes) by adityamukho · Pull Request #450 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

Merge main into v3 (#445, #447 fixes) - #450

Merged
adityamukho merged 5 commits into
v3from
merge/main-into-v3-2026-10-06
Oct 6, 2026
Merged

adityamukho merged 5 commits into
v3from
merge/main-into-v3-2026-10-06

Conversation

@adityamukho
Copy link
Copy Markdown
Collaborator

Merges main into v3 with a merge commit.

Local result: 1,218 passing, 8 ignored. cargo clippy --all-features -- -D warnings is clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_015GgLEs8YozJjYhwPEYgTUn

adityamukho and others added 5 commits October 6, 2026 07:51
Each pending fact was indexed with FactRef { page_id: 0, slot_index }, where
slot_index is its position in the pending list. The position was a
saturating u16, so every fact from position 65,535 on shared one slot and
entity lookups and attribute scans silently lost or duplicated facts. This
affected in-memory databases and file databases before a checkpoint.

slot_index is now a u32, and pending positions are checked rather than
saturated. postcard writes u16 and u32 as the same varint, so v7 index pages
are byte-for-byte unchanged; a test pins this.

Refs #445

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015GgLEs8YozJjYhwPEYgTUn
…erflow

fix(storage): index pending facts past 65,535 correctly (#445)
Open sets the transaction counter from the file's checkpointed count, then
WAL replay skips entries at or below it and calls restore_tx_counter, which
stored the highest tx_count among the facts it had loaded. When every WAL
entry was already checkpointed, nothing was loaded and the counter was reset
to 0, so later transactions reused tx_counts already in the file and :as-of
history was wrong, permanently after the next checkpoint.

restore_tx_counter now only raises the counter (fetch_max).

Refs #447

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015GgLEs8YozJjYhwPEYgTUn
fix(storage): never rewind the tx counter on WAL replay (#447)
Storage code keeps v3's side: FactRef and fact pages are gone on v3, and
v3 already carries the #447 fix. main's #445 behaviour tests are kept
(FactStorage unit test and the edge_cases_test.rs tests).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015GgLEs8YozJjYhwPEYgTUn
@codecov
codecov Bot commented Oct 6, 2026
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@adityamukho
adityamukho merged commit 0110487 into v3 Oct 6, 2026
18 checks passed
@adityamukho
adityamukho deleted the merge/main-into-v3-2026-10-06 branch October 6, 2026 03:58
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

0