Repository navigation
fix(runtime): harden ad hoc execute and package invoke - #1309
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (17)
📝 WalkthroughWalkthroughAd hoc ChangesExecute runtime changes
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant ExecuteCaller
participant runBundledModuleWithRegistry
participant createExecuteExecutor
participant DynamicWorker
participant PackageInvokeTools
ExecuteCaller->>runBundledModuleWithRegistry: start execute with AbortSignal
runBundledModuleWithRegistry->>createExecuteExecutor: pass signal
createExecuteExecutor->>DynamicWorker: evaluate with deadline
DynamicWorker->>PackageInvokeTools: invoke with active signal
ExecuteCaller-->>createExecuteExecutor: timeout or abort
createExecuteExecutor-->>DynamicWorker: abort evaluation
PackageInvokeTools-->>DynamicWorker: stop cooperative nested work
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🔎 Preview deployed: https://kody-pr-1309.kody-a99.workers.dev Worker: Mocks:
|
Intent
Resolve field-report findings K-04, K-05, K-07, and K-08 so ad hoc execute can use npm dependencies, dynamic package invocation fails fast on malformed input, removed helpers are truly absent, and timeout outcomes do not imply side effects were rolled back.
Summary
package.jsonwithlatestdependencies before bundle preparation; modules without bare imports retain the existing one-file source set.packages.invokekeys and list the accepted camel-case contract.packages.checkandpackages.invokeCheckedteaching stubs from the execute runtime helper.idempotencyKey/run_getrecovery.Testing
npm run validate: passed.System changes
System recap — extends existing primitives (medium risk)
Mode: recap · Base:
main@1916ffe· Head:fe48666Classification: extends — changes execute bundling, package invocation validation/cancellation, and timeout contracts without adding a primitive.
Primitives touched
mcp-servercapabilities-executepackage-runtimeSystem map
Ad hoc execute discovers npm dependencies before bundling; runtime package calls carry the execute deadline into nested package execution.
Legend: green = composes (wiring only) · amber = extended by this PR · red = new primitive · gray = context (unchanged, included only when an edge crosses it).
Before / after
packages.invokeexistsConductor report
Track C report: STATUS(done); PR merged at
e52578a9655d14bfaaab5c9aa8f429faf142aa0e; production deploy succeeded; evidence:npm run validateand all PR CI green, CodeRabbit completed with no actionable comments, 1,942 node/Workers tests and 7 Playwright tests passed in the push gate; remains: no Track C work, while sibling-owned package-app/history references account for remaininginvokeCheckedsearch hits.Summary by CodeRabbit