8000 Expose the #924 incoming-ref lookup in every remaining binding · Issue #925 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

Expose the #924 incoming-ref lookup in every remaining binding #925

Done

Description

@adityamukho

#924 adds a bounded, typed incoming-reference lookup to the core write transactions (WriteTransaction and OwnedWriteTransaction). Its mission also exposes it in minigraf-java (MiniGrafWriteTransaction.incomingRefs), because the JVM is the first known consumer (LDBC SNB v2 DEL7). The other bindings don't get it in that mission, so v3.0.0 would ship with uneven binding coverage. Two gaps matter most:

  • Android uses the same Kotlin package as JVM from v3.0.0 (io.github.project_minigraf.minigraf). Kotlin code that calls incomingRefs would compile against the JVM jar but not the Android AAR.
  • Python is Tier 1, but it would lack an API that a Tier 2 binding has.

Every earlier binding feature (#180, #181, #824, #872) shipped to all bindings, so this issue restores parity before v3.0.0.

Scope

Expose the #924 lookup on the write-transaction object of each remaining binding: Python, Android, Swift, Node, C, wasm/WASI where a write transaction exists, and binding-template. Keep the contract the #924 spec defines for core and minigraf-java:

  • typed target (entity UUID), two explicit budgets (links returned, records examined);
  • a typed outcome, either complete (links + records examined) or exhausted (which budget, plus records examined), with no partial links and no message parsing needed;
  • the same error codes the binding already uses: invalid argument API-017, finished transaction API-018, callback reentry INT-001.

Each binding pins a core v3 revision that contains #924, adds tests with its consumer test, and updates its README. Docs site: add per-binding examples where the #924 docs page shows the JVM one.

BrowserDb has no owned write-transaction handle like the native bindings, so decide here whether it gets the lookup and in what form. Record the decision in this issue rather than leaving it implied.

Depends on

Activity

  1. added this to the v3.0.0 milestone on Nov 28, 2026
  2. added
    enhancement
    rust
    on Nov 28, 2026
  3. adityamukho commented on Nov 29, 2026

    @adityamukho
    CollaboratorAuthor

    Decisions (2026-11-29):

    • Browser: included. The lookup is on BrowserWriteTransaction (db.beginWrite().incomingRefs(target, maxLinks, maxRecords)), not on BrowserDb, so discover-then-write stays in one transaction. Browser WASM is Tier 1 from v3.0.0, and the transaction shares the staged target index with native ones.
    • WASI: excluded. The WASI package is the auto-commit REPL with no transaction commands (Expose explicit write transactions across all supported language bindings #824). Rust compiled for WASI has incoming_refs.
    • Contract: two mandatory exact budgets with no unlimited sentinel; complete or exhausted, with no partial links; API-017/API-018/INT-001; no new error codes. Ranges: 0..=min(i64::MAX, usize::MAX) for the UniFFI bindings and C, 0..=Number.MAX_SAFE_INTEGER for Node.js, 0..=2^32-1 for the browser.
    • JavaScript shape (Node.js and browser): { status: 'complete', links: [{ source, attribute }], recordsExamined } or { status: 'exhausted', budget: 'links' | 'records', recordsExamined }, typed as a union on status.
    • C shape: an owned MiniGrafIncomingRefs* read through accessors and freed with minigraf_incoming_refs_free; no JSON.
    • UniFFI bindings keep minigraf-java's contract; no Java change.

    Pull requests: #927 (core, browser), project-minigraf/minigraf-python#23, project-minigraf/minigraf-android#22, project-minigraf/minigraf-swift#23, project-minigraf/minigraf-binding-template#15, project-minigraf/minigraf-node#28, project-minigraf/minigraf-c#20, project-minigraf/minigraf-docs#105. The minigraf-wasm PR follows the core merge.

  4. added 9 commits that reference this issue on Nov 29, 2026
  5. adityamukho commented on Nov 29, 2026

    @adityamukho
    CollaboratorAuthor

    The incoming-reference lookup of #924 is now in every remaining binding and in the browser transaction. WASI is excluded, as recorded above. Nothing is released; this is on the v3 branches.

    Repository PR Merge commit Pinned core commit
    core (browser) #927 b6245cc2 (this repository)
    Python project-minigraf/minigraf-python#23 51ca2b95 b6245cc2c6f75d5493bd0d05673477414990c72f
    Android project-minigraf/minigraf-android#22 308c1af0 b6245cc2c6f75d5493bd0d05673477414990c72f
    Swift project-minigraf/minigraf-swift#23 e3d78a16 b6245cc2c6f75d5493bd0d05673477414990c72f
    binding template project-minigraf/minigraf-binding-template#15 46f53a0f b6245cc2c6f75d5493bd0d05673477414990c72f
    Node.js project-minigraf/minigraf-node#28 56a1f6cf b6245cc2c6f75d5493bd0d05673477414990c72f
    C project-minigraf/minigraf-c#20 3f5444ea b6245cc2c6f75d5493bd0d05673477414990c72f
    WASM (browser and WASI) project-minigraf/minigraf-wasm#27 f799e3fe b6245cc2c6f75d5493bd0d05673477414990c72f (the WASI package in the PR's CI was built from the same commit)
    docs site project-minigraf/minigraf-docs#105 1336a649 none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementrust

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0