Repository navigation
feat(browser): add incomingRefs to BrowserWriteTransaction (#925) - #927
Merged
Merged
Conversation
BrowserWriteTransaction.incomingRefs(target, maxLinks, maxRecords) exposes the bounded incoming-reference lookup of write transactions (#924) in the browser. It shares db::incoming_refs with the native transactions and returns a plain object discriminated by status, with exact 32-bit budgets. The transaction methods now take shared receivers behind a per-transaction guard, so a user function that calls back into its own transaction gets INT-001 instead of wasm-bindgen's recursive-borrow error. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H2a7QnK1UQ7thygqxPzRfQ
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This was referenced Nov 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
BrowserWriteTransaction.incomingRefs(target, maxLinks, maxRecords), the browser form of the bounded incoming-reference lookup of write transactions (#924). Part of #925.{ status: 'complete', links, recordsExamined }or{ status: 'exhausted', budget, recordsExamined }, typed as a discriminated union onstatus. An exhausted result has nolinks.0..=2^32-1; anything else, and an invalid UUID, isAPI-017. A finished transaction or closed database isAPI-018.db::incoming_refs, with the native transactions and does not build the staged read view.tx_count, starts no flush and still answers after a failed IndexedDB flush.Behaviour change: a user function that calls
execute,commit,rollbackorincomingRefson the transaction running it now getsINT-001. Before, the existing methods failed with wasm-bindgen's recursive-borrow error. The methods take shared receivers behind a per-transaction guard.No native API, file-format, WAL, grammar, error-code or dependency change.
Type of change
Size
distbinary, Rust 1.99.1 (gate 1,280,000)distbinary, Rust 1.100.0_bg.wasm, Rust 1.94.0Tests
Firefox: 103 main-thread and 136 dedicated-worker tests pass. Native: 2,190 passed, 0 failed, 23 ignored.
wasm32-wasip1: 1,233 passed. Clippy (native,wasm32browser,wasm32-wasip1) and fmt are clean. Chrome and Safari were not run locally. Details:docs/testing/925-browser-incoming-refs.md.Notes for reviewer
wasm.ymlgains a step that type-checks the generated declarations (tests/browser/incoming_refs.ts).docs/superpowers/specs/2026-11-29-925-incoming-ref-parity-design.md.🤖 Generated with Claude Code
https://claude.ai/code/session_01H2a7QnK1UQ7thygqxPzRfQ