Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Jan 4, 2026

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 : )

* refactor(runner): extract shared start logic into startCore

Consolidate duplicated code between doStart and startWithTx into a
single startCore method. Extract moduleToRecipe and resolveToRecipe
as class methods.

The startCore method handles:
- Cancel group management
- Node instantiation with optional transaction
- Type watcher setup for recipe changes
- Sync and async recipe loading based on allowAsyncLoad option

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(runner): improve error handling in start methods

- Return false for subpath cells (nothing to start)
- Throw error when no process cell exists
- Throw error when no recipe ID ($TYPE) is set
- Add cleanup on error to remove cancel group from maps
- Add error handling for async recipe loading failures
- Log errors for recipe changes in type watcher (can't propagate from sink)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(runner): start() resolves subpath cells to root

When start() is called on a subpath cell (created via .key()), it now
resolves to the root cell and starts that instead of returning false.

This allows callers to start a charm using any cell reference to it,
not just the root cell.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* no longer wait for charm to start or data to sync (unless using variants)

* simplify await expression in ct-render test

* fix(runner): use logger.error for recipe loading errors after initial start

For recipe changes after initial start, errors are logged via logger.error
since there's no caller to propagate to (the sink callback runs async).
Initial start errors are still propagated to the caller.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fmt

* fix(runner): sync root cell before checking for process cell

When the root cell data isn't synced yet, getSourceCell() returns
undefined because the 'source' property isn't available. Now we
check if the cell needs syncing and retry after sync completes.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(runner): sync cell before checking for process cell

When loading charms from the server, the process cell may not be
immediately available even though other data (like the charm name) is.
This is because getSourceCell() kicks off a sync but doesn't await it.

The fix tries to get the process cell synchronously first (for local
data), and falls back to syncing and retrying if not immediately
available.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(runner): sync cell before checking for process cell

When loading charms from the server, the process cell may not be
immediately available. Check getRaw() to determine if data is synced -
once it has a value, any source cell would already be synced too.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor(runner): clean cascade in doStart

Reorganize start logic into a clear cascade of checks:
1. Resolve subpath → root cell
2. Already started → return true
3. Not synced → sync and retry
4. Data is a link → follow and retry
5. No process cell → error
6. Start the recipe

Also includes: type watcher improvements, link following support,
and recipe ID mismatch checking.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor(runner): move recipe loading to doStart, simplify startCore

- Move recipe availability check and async loading to doStart (step 5)
- startCore is now always synchronous, no allowAsyncLoad option
- Add explicit error when sync returns no data
- Add logging for recipe changes in type watcher

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(runner): use parseLink for robust link following in doStart

Use parseLink() instead of isLink() to properly handle all link formats
(sigil links, cell links, relative paths). The cell context enables
resolution of relative links. Add logging when following links.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(runner): capture previous recipe ID before assignment in log

The log was misleading because currentRecipeId was already set to
newRecipeId before logging. Now captures previousRecipeId first and
logs from/to with both ID and recipe for better debugging.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
@pull pull bot locked and limited conversation to collaborators Jan 4, 2026
@pull pull bot added the ⤵️ pull label Jan 4, 2026
@pull pull bot merged commit 433b1b3 into ExaDev:main Jan 4, 2026
1 check failed
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.

1 participant