Skip to content

Fix ABI record lookup for qualified paths - #29622

Open
1sgtpepper wants to merge 6 commits into
ProvableHQ:masterfrom
1sgtpepper:fix/29615-abi-record-location
Open

Fix ABI record lookup for qualified paths#29622
1sgtpepper wants to merge 6 commits into
ProvableHQ:masterfrom
1sgtpepper:fix/29615-abi-record-location

Conversation

@1sgtpepper

@1sgtpepper 1sgtpepper commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Motivation

ABI generation classified composites by terminal name, so a module struct could be mistaken for a same-named record. Resolve composites by their complete (program, path) identity, including direct interface record prototypes.

Fixes #29615.

Compatibility

Leo source syntax and the ABI schema are unchanged. The fix changes only the Record versus Struct classification for qualified composites, including program and interface ABI output. Concrete lookup covers the current program, imported Leo programs, Aleo stubs, and libraries. Interface ABI conversion classifies direct record prototypes only; it does not add parent-interface record prototypes to a child interface, and inherited interface member behavior is unchanged.

Test Plan

  • Exact-location unit coverage for local, imported Leo, Aleo, and library composites, including wrong-program, sibling-module, missing-item, and module-qualified-Aleo rejection cases.
  • End-to-end CLI fixture checking the corrected Record/Struct classification in both program and interface ABI output.
  • cargo +nightly fmt --all -- --check
  • git diff --check
  • bash -n tests/tests/cli/test_abi_record_identity/COMMANDS
  • CircleCI: code-quality, leo-executable, test-linux, test-macos, test-windows.

Related PRs

#29623 fixes the related dynamic-interface location bug independently; this PR targets master and does not depend on it.

@1sgtpepper
1sgtpepper force-pushed the fix/29615-abi-record-location branch 2 times, most recently from 678f836 to 05eaca0 Compare August 6, 2026 14:05
@1sgtpepper
1sgtpepper force-pushed the fix/29615-abi-record-location branch from caf5e18 to 4cf276a Compare August 6, 2026 16:05
@1sgtpepper
1sgtpepper marked this pull request as ready for review August 7, 2026 09:25
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.

[Bug] ABI misclassifies a module struct as a record

1 participant