8000 docs(spec): UDF registration over UniFFI (#180) by adityamukho · Pull Request #730 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

docs(spec): UDF registration over UniFFI (#180) - #730

Merged
adityamukho merged 2 commits into
v3from
docs/180-udf-ffi-spec
Oct 24, 2026
Merged

adityamukho merged 2 commits into
v3from
docs/180-udf-ffi-spec

Conversation

@adityamukho
Copy link
Copy Markdown
Collaborator

Design spec for #180: docs/superpowers/specs/2026-10-24-udf-uniffi-design.md.

  • Additive try_register_predicate / try_register_aggregate taking closures that return Result<_, UdfError>; existing methods unchanged.
  • A failing UDF (Rust Err, or a foreign callback that throws) fails the query with new code QRY-014 — never read as false/nil.
  • The function registry becomes RwLock<Arc<FunctionRegistry>>, snapshotted at query open; no lock is held across a UDF call, so UDFs may query, write, register or checkpoint the same database (INT-001 inside a WriteTransaction unchanged).
  • UniFFI foreign traits MiniGrafPredicate, MiniGrafAggregate, MiniGrafAccumulator for the template, Python, Java, Android and Swift bindings; lifecycle and threading documented.
  • Moves Expose UDF registration in every binding #180 from v3.next to v3.0.0 (done in the core PR).

Part of #180 (spec only).

🤖 Generated with Claude Code

https://claude.ai/code/session_015NBT2Yx9JUQKYvv2CvC9py

Fallible try_register_predicate/try_register_aggregate with UdfError and
QRY-014, a per-query function-registry snapshot so UDFs may call back into
the database, and the UniFFI foreign traits for every UniFFI binding.

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015NBT2Yx9JUQKYvv2CvC9py
@adityamukho
adityamukho merged commit 8f28bb4 into v3 Oct 24, 2026
18 checks passed
@adityamukho
adityamukho deleted the docs/180-udf-ffi-spec branch A9AB October 24, 2026 04:06
@adityamukho adityamukho mentioned this pull request Oct 24, 2026
10 tasks done
@codecov
codecov Bot commented Oct 24, 2026
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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