feat(node): report executor progress, logs and toggles over the side-channel - #601
Conversation
|
Warning Review limit reached
Next review available in: 57 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthrough
ChangesExecutor side-channel integration
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant TaskCallback
participant JsExecutor
participant ExecutorSideChannel
participant Scheduler
participant Storage
TaskCallback->>JsExecutor: report progress or write task log
JsExecutor->>ExecutorSideChannel: send side-channel event
ExecutorSideChannel->>Scheduler: forward event
Scheduler->>Storage: persist progress or task log
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@sdks/node/src/executor.ts`:
- Around line 104-115: Gate dispatcher job processing until the executor
attachment is assigned: update the startup flow around start_executor and the
callbacks middlewareFor, isCancelled, setProgress, and writeTaskLog so no job
can run while attached is undefined. Add a native-ready barrier or otherwise
sequence attach completion before dispatch, and cover immediate dispatch after
attach while preserving the existing callback behavior once attached is
available.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: bedeebd2-7cfc-4e90-a98f-02819a2a44bd
📒 Files selected for processing (7)
crates/taskito-node/src/executor.rssdks/node/src/executor.tssdks/node/src/queue.tssdks/node/src/task-callback.tssdks/node/src/worker.tssdks/node/test/worker/executorAttach.test.tssdks/node/test/worker/executorAttachServer.test.ts
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
ByteVeda/taskito(manual)
|
@CodeRabbit full review |
✅ Action performedFull review finished. |
Part 3 of #589, on top of #599 (core) and #600 (Python). Same shape as the Python side: a task running on an attached Node executor gets its progress, its published partials and its dashboard middleware toggles back, without the executor holding a database connection. Java follows in its own PR.
What changes
crates/taskito-node/src/executor.rs— the bindingJsExecutorholds the session'sExecutorSideChanneland exposes four methods to JS:supportsSideChannel,reportProgress,writeTaskLoganddisabledMiddleware. All fire-and-forget — nothing blocks the calling task, nothing fails its job, and nothing is sent at all when the scheduler advertised noside_channelcapability.supportsSideChannelexists so the shell can say so once rather than silently dropping a progress bar.sdks/node/src/task-callback.ts— the seamssetProgressandwriteTaskLogjoinisCancelledas optional overrides. Each defaults to the storage-backed path a worker uses, and an executor substitutes its own. That keeps one task-callback implementation for both, rather than a second copy that drifts.middlewareFornow takes the job id as well as the task name. An attached executor resolves disables per dispatch — the scheduler attaches the list to the job frame — where a worker resolves them per task name from storage. The worker's implementation ignores the extra argument, with a comment saying why.sdks/node/src/executor.tsandqueue.ts— the wiringExecutorStartParams.middlewareFortakes the disable list rather than reading one, andrunExecutorsupplies the chain-minus-disabled directly instead of constructing aMiddlewareDisableStoreit has no storage to query. Progress and task logs route through the attached executor.Tests
sends progress and logs to a scheduler that advertised the side-channelskips a middleware the dispatch says is disabledputs progress and published partials into storage via the schedulerhonours a dashboard middleware toggle on an attached executorThe last two are in
executorAttachServer.test.ts, gated onTASKITO_SERVER_BIN: they run a realtaskito-serverand assert on the rows that land in storage rather than on frames.Verification
cargo test --workspace,cargo clippy --all-targets --all-features -- -D warningsandcargo fmt --checkare clean. On the Node side,build:native,build:ts,build:dashboard,pnpm typecheckandpnpm lintare clean, andpnpm testpasses 650 with 6 skipped. The sixTASKITO_SERVER_BIN-gated tests, which CI skips, were run separately against a real server three times — 6/6 each.Refs #589.
Summary by CodeRabbit
New Features
Bug Fixes
Tests