Skip to content

fix: set caller_already_converted for re-exporter adapter chains#81

Merged
avrabe merged 1 commit intomainfrom
fix/reexporter-caller-already-converted
Apr 2, 2026
Merged

fix: set caller_already_converted for re-exporter adapter chains#81
avrabe merged 1 commit intomainfrom
fix/reexporter-caller-already-converted

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Apr 2, 2026

Summary

  • For adapters FROM a re-exporter TO the resource definer, set caller_already_converted=true on borrow params
  • The re-exporter's handle table code (ht_rep) already extracts rep from the handle — the downstream adapter must not call resource.rep again
  • Without this, 3-component resource chains would double-extract the rep, producing corrupt handles

Part of #69, closes #73. Task 6 (#74, resource graph propagation) is already implemented on main.

Test plan

  • 276 tests pass, 0 failures
  • No regressions — only affects adapter sites where from_component is a re-exporter

🤖 Generated with Claude Code

When an adapter goes FROM a re-exporter TO the resource definer, the
re-exporter's generated code already extracts rep via its handle table
(ht_rep). The downstream adapter must not call resource.rep again.

Mark borrow params with caller_already_converted=true for all adapter
sites where from_component is a re-exporter and the callee defines
the resource.

Part of #69, closes #73.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@avrabe avrabe merged commit 01220f8 into main Apr 2, 2026
4 checks passed
@avrabe avrabe deleted the fix/reexporter-caller-already-converted branch April 2, 2026 01:01
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.

Fix adapter caller_already_converted for re-exporter chains

1 participant