Conversation
Speed: the Lua FFI analysis is one lexical scope pass plus a worklist over per-function flow states on a copied syntax tree, linear in locals and functions. Each file's Lua and Rust analysis is stored in the index under a fingerprint of the analyzers and grammars, so a new process reuses it and a changed file is analyzed once. The bridge refreshes only for Lua and Rust files of projects with both languages, instead of every synthesis input on every save. Visibility: a call into an export that dispatches operations is a transport boundary. The export's callers and impact list its Lua call sites, callees and paths end at the export, and code behind it stops there; viewer rails and MCP labels show transport hops. Soundness: Lua module invalidation by member path, closure writes, loops, breaks, multiple values, goto, metatable reads, parameter scoping and cdef asm labels. Rust first-match arms with guards, cfg arms, or-patterns and wildcards, guard bindings, destructured fields, trait default methods, C-unwind exports and Cargo [[bin]], binary-only and custom-lib targets. The Lua parameter rule applies only where the bridge runs, grammar loading is safe for concurrent callers, and EXTRACTION_VERSION is 28. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
LuaJIT FFI calls currently stop at the Rust boundary, so callers and impact queries miss native handlers. This adds a source-derived bridge from proven FFI receivers to unique C-ABI exports, then follows literal operations through Lua/Rust wrappers to the handler actually selected and invoked.
Operation edges carry each literal operation to its own handler. A call into an export that dispatches operations is kept as a transport edge, and every walk treats it as a boundary: the export's callers and impact list its Lua call sites, callees and paths end at the export, and code behind the export never fans back out to every Lua caller. The implementation handles lexical aliases and module getters, standard Rust conversions, local Cargo/module identity, function-valued dispatch, and selected declarative macros. It rejects shadowed/mutated receivers, ambiguous exports, guarded or
#[cfg]arms and unsupported transforms rather than guessing.Each file's Lua and Rust analysis is stored in the index under a fingerprint of the analyzers and grammars, so a one-off CLI sync re-analyzes only changed files, and the bridge refreshes only for Lua and Rust files of projects with both languages. Projects without both languages are unaffected, including Lua-only projects' resolution.
Validation against main
6560052(v1.6.2):mcp-writer-lock.test.tsfailed once on a loaded machine and passed three isolated reruns; the bridge does not touch the daemon.Draft: required agent A/B is pending. The Sonnet/high harness attempted two repeats per arm for nine questions, but all 36 attempts hit an account usage-limit/API 429 before tool use. No task timing or adoption results are claimed. A large positive Lua/Rust corpus is also still unverified.
The validation record documents coverage, indexing and sync cost, the pending benchmark, conservative analysis limits and two pre-existing ordinary Rust graph gaps. Existing indexes need re-indexing after upgrading (
EXTRACTION_VERSION28); Cargo manifest edits also require re-indexing. No version, dependencies or native-kernel code changed.🤖 Generated with Claude Code