Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Nov 27, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

tonyespinoza1 and others added 2 commits November 26, 2025 17:26
Documents important patterns discovered during development:
- Getting Cell access for mutation (Cell<> wrapper in Input)
- Exposing actions via handlers for cross-charm calling
- Consuming actions via Streams

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Tony Espinoza <tonyespinoza@Tonys-MacBook-Pro.local>
Co-authored-by: Claude <noreply@anthropic.com>
… in a handler (#2172)

* adding test reproducing the bug:

pushing a newly created charm onto an array in a handler doesn't result in the runner charm being added.

* fix: recipes from cells that are returned via recipe are now being instantiated:

- Runner: When outputBinding is a direct link, use the existing cell instead of creating a new one and binding back. This ensures that when a recipe outputs to an existing cell, it writes directly to it.
- Recipe: Add check to ensure `outputs` is not a Cell before iterating in `factoryFromRecipe`.
- Cell: Fix `createRef` to use `this._frame.cause` for consistent ID generation.
- Cell: Change `export` to use `getAsLink` for external cells, fixing potential serialization issues.
- Tests: Update `recipes.test.ts` to verify `Cell<Array>.push` behavior with `asCell: true` and proper transaction handling.

* Ensure recipes created in handlers are collected even if not returned

- Track created opaque refs in the current frame in `opaqueRefWithCell`.
- Update `Runner` to check for `frame.opaqueRefs` existence when deciding whether to process a result recipe in event handlers and actions.
- This allows patterns created and attached via side effects (e.g., `list.push(newPattern)`) to be correctly instantiated without needing to be returned from the handler.
- Updated `recipes.test.ts` to verify this behavior by removing the explicit return.
@pull pull bot locked and limited conversation to collaborators Nov 27, 2025
@pull pull bot added the ⤵️ pull label Nov 27, 2025
@pull pull bot merged commit 03c6e19 into ExaDev:main Nov 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants