Skip to content

fix(workflow): expose runtime helpers in inline workflow code#39

Open
ex3ndr-bot wants to merge 1 commit intomainfrom
fix/workflow-inline-runtime-tools
Open

fix(workflow): expose runtime helpers in inline workflow code#39
ex3ndr-bot wants to merge 1 commit intomainfrom
fix/workflow-inline-runtime-tools

Conversation

@ex3ndr-bot
Copy link
Collaborator

@ex3ndr-bot ex3ndr-bot commented Mar 13, 2026

Summary\n- mark inline executions as task executions for RLM runtime helpers\n- plumb execution-scoped task metadata through executable system messages\n- add regression coverage for inline workflow posting behavior\n\n## Testing\n- pnpm vitest run packages/daycare/sources/engine/modules/tools/background.spec.ts packages/daycare/sources/engine/modules/rlm/rlmRuntimeToolExecute.spec.ts\n

Summary by CodeRabbit

Release Notes

  • Refactor

    • Enhanced task execution handling to support both runtime-executed tasks and static task references. The system now intelligently determines task identity based on available execution context, improving flexibility in how tasks are tracked and executed during workflow operations.
  • Tests

    • Added test coverage for inline workflow task execution metadata tracking.

@coderabbitai
Copy link

coderabbitai bot commented Mar 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e31b2679-5b7c-4e7f-94f7-e595ae363af5

📥 Commits

Reviewing files that changed from the base of the PR and between 53b41be and 0e165bb.

📒 Files selected for processing (4)
  • packages/daycare/sources/engine/agents/agent.ts
  • packages/daycare/sources/engine/agents/ops/agentTypes.ts
  • packages/daycare/sources/engine/modules/tools/background.spec.ts
  • packages/daycare/sources/engine/modules/tools/startBackgroundWorkflowTool.ts

📝 Walkthrough

Walkthrough

Runtime task execution metadata is now supported in system messages. An optional taskExecution field containing taskId and taskVersion is added to system message payloads. Agent execution logic is updated to accept and propagate this metadata, preferring runtime-provided values over static task references.

Changes

Cohort / File(s) Summary
Type System Updates
packages/daycare/sources/engine/agents/ops/agentTypes.ts
Added optional taskExecution?: { taskId: string; taskVersion?: number } field to system_message variant of AgentInboxItem for execution-scoped task metadata.
Agent Execution Logic
packages/daycare/sources/engine/agents/agent.ts
Updated task execution handling to accept either runtime taskExecution or taskReference, preferring runtimeTaskExecution when available. Modifies control flow for system message and code block execution to derive taskId/taskVersion accordingly.
Inline Workflow Tools
packages/daycare/sources/engine/modules/tools/startBackgroundWorkflowTool.ts
Added taskExecution metadata block (taskId: "inline-workflow", taskVersion: 1) to system_message in startInlineWorkflow invocation.
Workflow Tool Tests
packages/daycare/sources/engine/modules/tools/background.spec.ts
Added test case verifying inline workflow code marks execution with taskExecution metadata when runtime helpers are invoked.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A rabbit hops through agent flows,
With metadata that runtime knows—
Task IDs bound to each request,
Inline workflows pass the test!
Execution tracked from start to end,
A better path, my developer friend! 🌟

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: exposing runtime helpers in inline workflow code through task execution metadata.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/workflow-inline-runtime-tools
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant