Skip to content

Expose SDK runtime action client - #456

Merged
unbraind merged 3 commits into
mainfrom
sdk-runtime-action-client
Jul 6, 2026
Merged

unbraind merged 3 commits into
mainfrom
sdk-runtime-action-client

Conversation

@unbraind

@unbraind unbraind commented Jul 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Exposes runAction and PmClient from the SDK runtime/barrel so integrations can execute pm actions in-process without spawning the CLI.
  • Moves the MCP action dispatch path onto the SDK runtime surface so MCP tools and SDK consumers share the same implementation.
  • Documents the runtime SDK usage and expands SDK/docs/MCP regression coverage, including extension activation/deactivation around workspace contracts.

PM tracking

Verification

  • node scripts/run-tests.mjs test -- tests/unit/sdk/sdk-index.spec.ts tests/integration/mcp-handshake.spec.ts tests/unit/mcp/mcp-server-branch-residual.spec.ts
  • node scripts/run-tests.mjs test -- tests/unit/docs-examples/sdk-app-embedding.spec.ts tests/unit/docs-examples/sdk-contract-consumer.spec.ts
  • pnpm typecheck
  • pnpm build
  • pnpm lint (ESLint, jscpd 0 clones, static quality gate)
  • pnpm quality:docs-skills
  • pnpm security:scan
  • pnpm audit --audit-level moderate
  • pm validate --check-resolution --check-history-drift (history drift ok; existing closed-item resolution metadata warnings remain)
  • pnpm changelog:pm && pnpm changelog:pm:check
  • node scripts/run-tests.mjs coverage -> 264 files, 5424 tests, 100% statements/branches/functions/lines
  • Installed-package smoke in a fresh temp consumer: packed @unbrained/pm-cli, installed it, imported @unbrained/pm-cli/sdk/runtime, initialized a tracker, and used PmClient/runAction for create/list/search/get/update/context/direct-context/close.
  • node scripts/release/sentry-telemetry-gate.mjs --json --telemetry-mode best-effort --sentry-window-days 14 --max-critical 0 --max-high 0 passed with recent critical/high Sentry counts at 0 and telemetry rows present.
  • greptile review --agent --branch origin/main ran before push. The CLI returned cached review 88db4c20-531f-4c98-8148-df5f43caf6d2; both returned comments were already fixed in the pushed head (src/mcp/server.ts no duplicate helper; src/sdk/runtime.ts deactivates after activation).

External state checked

  • No open Dependabot, code scanning, or secret scanning alerts via GitHub APIs before PR creation.
  • pm-changelog latest available npm version is 2026.6.30; package-owned changelog generation/check passed with that version.
  • CodeFactor public page reported Rating A and no issues when checked before PR creation.

Summary by cubic

Expose an in-process action client in the SDK so integrations can run pm actions without spawning the CLI; MCP tools now use the same dispatcher. Adds workspace contracts caching and typed action alias support, with tighter dispatch and safer example parsing.

  • New Features

    • PmClient and runAction are exported from @unbrained/pm-cli/sdk/runtime and re-exported in @unbrained/pm-cli/sdk; MCP pm_run and narrow tools use this dispatcher; docs add usage, shared SDK/MCP activation serialization, and per-call runtime overrides.
    • Supports typed action aliases (list-* status, ctx, task lifecycle, and package-* flows) via the shared runtime path.
    • Workspace contracts memoization with clearWorkspaceContractsCache to reset long‑lived hosts.
  • Bug Fixes

    • Dispatch fixes: corrected plan top-level dispatch from narrow tool calls and routed aliases through the runtime.
    • Hardening: replaced regex sanitization with a linear scanner; guarded SDK runtime test hooks to test environments only; wrapped example JSON parsing with contextual errors and handled empty pm contracts stdout.

Written for commit 8c40979. Summary will update on new commits.

Review in cubic

Promote the shared pm action dispatcher into the public SDK runtime as runAction and PmClient so programmatic integrations can execute pm actions without spawning the CLI.

Route MCP pm_run and narrow tools through the SDK dispatcher, document the new surface, cover it with focused SDK/MCP/docs-example tests, and refresh pm-changelog plus tracker evidence.

Verification: pnpm typecheck; pnpm build; pnpm lint; pnpm quality:docs-skills; pnpm security:scan; node scripts/run-tests.mjs coverage (100/100/100/100); installed-package temp smoke; pnpm changelog:pm:check; pm validate --check-resolution --check-history-drift.
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @unbraind, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai

coderabbitai Bot commented Jul 5, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a public SDK execution surface (PmClient and runAction), routes MCP pm_run through it, updates docs/examples/tests and release config, and closes the linked PM tracking records with updated ADR metadata.

Changes

SDK execution surface and MCP integration

Layer / File(s) Summary
PM tracking records and ADR closure
.agents/pm/features/pm-xzhz.toon, .agents/pm/history/pm-xzhz.jsonl, .agents/pm/decisions/pm-muhw.toon, .agents/pm/history/pm-muhw.jsonl
Adds the feature/history records for pm-xzhz and closes pm-muhw with updated lifecycle metadata.
SDK runtime API and client surface
src/sdk/runtime.ts, src/sdk/index.ts
Adds the public runtime action/client types, PmClient, runAction, input normalization, extension activation flow, cache handling, and explicit SDK barrel re-exports.
Extension activation and action dispatch
src/sdk/runtime.ts
Adds the serialized activation queue, dynamic action dispatch, and runtime test-hook plumbing.
Public SDK exports and workspace contract cache
src/sdk/index.ts, src/sdk/workspace-contracts-cache.ts
Replaces wildcard SDK re-exports with explicit named exports and adds workspace-contract cache memoization and invalidation helpers.
MCP wiring and release config
src/mcp/server.ts, eslint-suppressions.json, scripts/release/sdk-import-boundary-baseline.json, scripts/release/static-quality-gate.mjs
Routes MCP pm_run through the SDK runtime, narrows test-only access, updates the import allowlist, removes one suppression, and tightens the ESLint suppression budget.
Docs, examples, and regression tests
docs/SDK.md, docs/examples/sdk-app-embedding/*, docs/examples/sdk-contract-consumer/*, CHANGELOG.md, tests/unit/docs-examples/*, tests/unit/mcp/mcp-server-branch-residual.spec.ts, tests/unit/sdk/sdk-index.spec.ts, tests/integration/mcp-dynamic-package-actions.spec.ts
Documents the new SDK surface, adds JSON parsing helpers to the embedding examples, broadens example mocks, and updates SDK/MCP regression coverage for runtime behavior and cache handling.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant MCPServer
  participant runAction
  participant withActiveExtensions
  participant SDK_ACTION_HANDLERS

  MCPServer->>runAction: pm_run args
  runAction->>withActiveExtensions: serialized dispatch
  withActiveExtensions->>SDK_ACTION_HANDLERS: built-in action
  SDK_ACTION_HANDLERS-->>runAction: result
  runAction-->>MCPServer: result
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR implements #439 by adding PmClient/runAction, reusing the shared runtime path, and covering the SDK/MCP/docs flow.
Out of Scope Changes check ✅ Passed The changes are tied to SDK export, dispatch, docs, tests, and supporting release metadata; no clearly unrelated scope stands out.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title concisely captures the main change: exposing an SDK runtime action client.
Description check ✅ Passed The description directly matches the changeset by summarizing the SDK runtime, MCP dispatch, docs, and regression updates.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@unbraind

unbraind commented Jul 5, 2026

Copy link
Copy Markdown
Owner Author

@greptileai review

@unbraind

unbraind commented Jul 5, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@unbraind

unbraind commented Jul 5, 2026

Copy link
Copy Markdown
Owner Author

/gemini review

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Jul 5, 2026 •

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@unbraind

unbraind commented Jul 5, 2026

Copy link
Copy Markdown
Owner Author

Bot follow-up note after the first trigger round:

  • Gemini returned only a daily quota-limit warning, so there are no actionable Gemini code findings in this round.
  • Sourcery returned only a weekly diff-character rate-limit review, so there are no actionable Sourcery code findings in this round.
  • CodeRabbit initially reported a rate limit, then acknowledged the manual @coderabbitai full review trigger; I am waiting on the CodeRabbit status before treating that review as complete.
  • Hound and CodeFactor are green so far.

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Your plan includes PR reviews subject to rate limits. More reviews will be available in 45 minutes.

Comment thread src/sdk/runtime.ts Fixed
@greptile-apps

greptile-apps Bot commented Jul 5, 2026 •

Copy link
Copy Markdown

Greptile Summary

This PR exposes the pm action runner through the public SDK runtime. The main changes are:

  • Adds runAction and PmClient for in-process SDK action execution.
  • Routes MCP tool calls through the shared SDK runtime dispatcher.
  • Adds workspace-contract registration caching with an explicit clear API.
  • Documents SDK runtime usage and updates embedding examples.
  • Expands SDK, MCP, docs-example, alias, and activation lifecycle tests.

Confidence Score: 5/5

Safe to merge with low risk.

The shared dispatcher, alias handling, activation lifecycle, cache behavior, and public export boundaries are covered by focused tests and installed-package smoke evidence. No blocking correctness or security issues were identified.

No files require special attention.

T-Rex T-Rex Logs

What T-Rex did

  • Built the SDK-runtime smoke test bundle with pnpm build and confirmed the process exited with code 0.
  • Packed the runtime into a tarball and installed it into a fresh consumer, both finishing with exit code 0.
  • Ran the SDK runtime smoke test, and the Node process sdk-runtime-smoke.mjs exited with code 0, including an import proof and TRACE output for each runtime action.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
src/sdk/runtime.ts Introduces the public runAction/PmClient execution surface, shared action dispatch, alias handling, extension activation serialization, and workspace-contract cache integration.
src/mcp/server.ts Routes MCP tool dispatch through SDK runAction while preserving warnings, serialization, and guarded test hooks.
src/sdk/index.ts Adds explicit public barrel exports for PmClient, runAction, and related runtime types.
src/sdk/workspace-contracts-cache.ts Adds a bounded workspace extension-registration memo with rejected-entry eviction and explicit clearing.
docs/SDK.md Documents runtime SDK imports, runAction/PmClient usage, cache behavior, and per-call controls.
tests/unit/sdk/sdk-index.spec.ts Adds SDK export, alias, PmClient, workspace cache, and production test-hook coverage.
tests/unit/mcp/mcp-server-branch-residual.spec.ts Adds MCP tests for normalization, plan dispatch, residual branches, and test hook guards.
tests/integration/mcp-dynamic-package-actions.spec.ts Covers dynamic package action alias dispatch through the shared MCP/SDK path.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant SDK as SDK consumer / PmClient
participant MCP as MCP tool handler
participant Runtime as sdk/runtime runAction
participant Queue as extensionActivationQueue
participant Ext as workspace extensions
participant Cmd as pm command runner

SDK->>Runtime: "runAction({ action, options })"
MCP->>Runtime: "runAction({ ...args, action })"
Runtime->>Runtime: normalize action + apply aliases
Runtime->>Queue: enqueue activation/dispatch cycle
Queue->>Ext: loadExtensions + activateExtensions
Ext-->>Queue: active registries / command handlers
Queue->>Runtime: dispatchAction(action, args, global, activeExtensions)
alt native action
    Runtime->>Cmd: runCreate/runList/runPlan/etc.
else extension action
    Runtime->>Ext: runActiveCommandHandler(command, options)
end
Cmd-->>Runtime: result
Ext-->>Runtime: extension result
Queue->>Ext: reset registries + deactivateExtensions
Runtime-->>SDK: result
Runtime-->>MCP: resultContent(result, warnings)
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant SDK as SDK consumer / PmClient
participant MCP as MCP tool handler
participant Runtime as sdk/runtime runAction
participant Queue as extensionActivationQueue
participant Ext as workspace extensions
participant Cmd as pm command runner

SDK->>Runtime: "runAction({ action, options })"
MCP->>Runtime: "runAction({ ...args, action })"
Runtime->>Runtime: normalize action + apply aliases
Runtime->>Queue: enqueue activation/dispatch cycle
Queue->>Ext: loadExtensions + activateExtensions
Ext-->>Queue: active registries / command handlers
Queue->>Runtime: dispatchAction(action, args, global, activeExtensions)
alt native action
    Runtime->>Cmd: runCreate/runList/runPlan/etc.
else extension action
    Runtime->>Ext: runActiveCommandHandler(command, options)
end
Cmd-->>Runtime: result
Ext-->>Runtime: extension result
Queue->>Ext: reset registries + deactivateExtensions
Runtime-->>SDK: result
Runtime-->>MCP: resultContent(result, warnings)
Loading

Reviews (12): Last reviewed commit: "Fix SDK runtime action aliases" | Re-trigger Greptile

@greptile-apps

greptile-apps Bot commented Jul 5, 2026

Copy link
Copy Markdown

Greptile Summary

This PR exposes the pm action runtime through the SDK and reuses it from MCP. The main changes are:

  • Adds public PmClient and runAction APIs for in-process action execution.
  • Routes MCP tool handlers through the shared SDK runtime dispatcher.
  • Handles workspace extension activation and teardown around runtime actions.
  • Documents embedded SDK usage for custom tools, bots, CI, and runtimes.
  • Updates SDK, docs, MCP, quality-gate, and changelog coverage for the new runtime path.

Confidence Score: 5/5

Safe to merge with low risk.

No blocking correctness or security issues were identified in the changed runtime, MCP, docs, or test paths. The shared dispatcher path has focused tests for SDK use, MCP behavior, filtering, and extension lifecycle cleanup.

No files require special attention.

T-Rex T-Rex Logs

What T-Rex did

  • The sdk-runtime build completed successfully with pnpm build and exit code 0.
  • The runtime package was created with pnpm pack, producing unbrained-pm-cli-2026.7.5.tgz containing the dist/cli-bundle.
  • A fresh consumer installed the tarball, imported runtime symbols as functions, created an item pm-0qd1, listed and searched it, updated its status to in_progress, produced context snapshots, closed it, and verified the final status closed with exit code 0.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
src/sdk/runtime.ts Adds the public PmClient and runAction dispatcher, shared action normalization, and extension lifecycle handling.
src/mcp/server.ts Routes MCP tool calls through runAction while preserving JSON-RPC behavior, warnings, and error envelopes.
tests/unit/sdk/sdk-index.spec.ts Expands SDK tests for runtime exports, action execution, filtering, and extension activation/deactivation behavior.
docs/SDK.md Documents PmClient and runAction usage for embedded runtime consumers.
scripts/release/sdk-import-boundary-baseline.json Shrinks the SDK import-boundary baseline after moving MCP dispatch behind the SDK runtime.
scripts/release/static-quality-gate.mjs Lowers the static-quality suppression budget to match the pruned suppression baseline.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant SDK as SDK consumer
participant Client as PmClient/runAction
participant MCP as MCP tools/call
participant Runtime as SDK runtime dispatcher
participant Extensions as Extension activation
participant Commands as pm command runners

SDK->>Client: create/list/update/close or runAction(args)
MCP->>Runtime: "runAction({ action, args })"
Client->>Runtime: "runAction({ defaults, action, options })"
Runtime->>Extensions: load + activate workspace extensions
Extensions-->>Runtime: active registries/commands
Runtime->>Commands: dispatch native or extension action
Commands-->>Runtime: action result
Runtime->>Extensions: reset globals + deactivate
Runtime-->>Client: result
Runtime-->>MCP: result
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant SDK as SDK consumer
participant Client as PmClient/runAction
participant MCP as MCP tools/call
participant Runtime as SDK runtime dispatcher
participant Extensions as Extension activation
participant Commands as pm command runners

SDK->>Client: create/list/update/close or runAction(args)
MCP->>Runtime: "runAction({ action, args })"
Client->>Runtime: "runAction({ defaults, action, options })"
Runtime->>Extensions: load + activate workspace extensions
Extensions-->>Runtime: active registries/commands
Runtime->>Commands: dispatch native or extension action
Commands-->>Runtime: action result
Runtime->>Extensions: reset globals + deactivate
Runtime-->>Client: result
Runtime-->>MCP: result
Loading

Reviews (1): Last reviewed commit: "Expose SDK runtime action client" | Re-trigger Greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 14 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/sdk/runtime.ts">

<violation number="1" location="src/sdk/runtime.ts:1298">
P2: `pm plan` dispatch can fail with `Missing required argument: subcommand` when callers provide `subcommand` at the top level (the common narrow-tool shape), because `runMcpPlanAction` now reads only `ctx.options.subcommand`. Reading from top-level args first (then falling back to nested options) would keep plan consistent with other action handlers and avoid breaking existing callers.</violation>
</file>

Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.

Re-trigger cubic

Comment thread src/sdk/runtime.ts Resolved
@codecov

codecov Bot commented Jul 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Replace regex-based action-name sanitization with a linear scanner to clear the CodeQL polynomial-regex alert.

Wrap JSON parsing in SDK reference scripts with contextual errors that preserve the original cause, and add malformed-output coverage for both examples.

Record the CodeQL and Greptile follow-up evidence on pm-xzhz.
@unbraind

unbraind commented Jul 5, 2026

Copy link
Copy Markdown
Owner Author

/gemini review

@unbraind

unbraind commented Jul 5, 2026

Copy link
Copy Markdown
Owner Author

@greptileai review

@unbraind

unbraind commented Jul 5, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Jul 5, 2026 •

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🤖 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 `@docs/examples/sdk-contract-consumer/inspect-contracts.mjs`:
- Around line 4-11: `parseContractsJson` should match the empty-stdout behavior
of `parsePmJson` in the sibling example by treating empty or whitespace-only
stdout as an empty object instead of trying to parse it. Update the
`parseContractsJson` helper in `inspect-contracts.mjs` so it trims the input and
returns a fallback `{}` for empty output before calling `JSON.parse`, keeping
the existing error wrapping for real parse failures.

In `@src/sdk/runtime.ts`:
- Around line 363-414: The PmClient SDK methods and runAction currently erase
native action result types by returning Promise<unknown>, so add typed overloads
or an action-to-result mapping for the built-in actions before stabilizing the
API. Update the runtime in runtime.ts around run, context, list, search, get,
create, update, and close so native actions return precise typed results while
keeping extension/custom actions as unknown, and ensure the typing flows through
runAction without changing the call sites.
- Around line 1589-1595: The dispatch context in McpActionDispatchContext is
only reading force from top-level args, so claim/release can miss a force value
passed via options. Update the ctx construction in the dispatch path (around
runAction and the ctx.force field) to honor options.force as the primary source,
with args.force as fallback if needed, so actions like claim and release see the
correct force state.
- Around line 1292-1299: The parseMcpIntegerPrefix helper is truncating
fractional numeric inputs because it uses Number.parseInt on numbers, so update
parseMcpIntegerPrefix to reject non-integer numeric values instead of coercing
them. In the typeof value === "number" branch, validate the raw number with
Number.isInteger/Number.isFinite (or equivalent) and throw the existing
PmCliError for values like 1.5, while keeping the current handling for valid
integers and the rest of runtime.ts unchanged.
- Around line 846-852: The early return paths in runtime.ts’s activation flow
call run(null) without resetting the process-global extension registry state, so
clear the active registries before both the global.noExtensions branch and the
missing-settings branch. Update the logic around resolvePmRoot, getSettingsPath,
and run so that any built-in handlers consulting registry state cannot see stale
data from a previous activation when noExtensions is enabled or no workspace
settings exist.

In `@tests/unit/docs-examples/sdk-app-embedding.spec.ts`:
- Line 37: The `node:child_process` mock in `sdk-app-embedding.spec.ts` includes
an unused `execFile` stub that is dead scaffolding. Remove the `execFile:
vi.fn()` entry from the relevant `vi.doMock` setup and keep only the `spawnSync`
mock, since `run-embedded-pm.mjs` is exercised through `spawnSync` only; check
the `vi.doMock` calls in this spec to update both mock declarations
consistently.
🪄 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: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 83dfbea1-0f9c-4e6c-820f-21106eb64a77

📥 Commits

Reviewing files that changed from the base of the PR and between 43f769b and 51ae35b.

📒 Files selected for processing (17)
  • .agents/pm/decisions/pm-muhw.toon
  • .agents/pm/features/pm-xzhz.toon
  • .agents/pm/history/pm-muhw.jsonl
  • .agents/pm/history/pm-xzhz.jsonl
  • CHANGELOG.md
  • docs/SDK.md
  • docs/examples/sdk-app-embedding/run-embedded-pm.mjs
  • docs/examples/sdk-contract-consumer/inspect-contracts.mjs
  • eslint-suppressions.json
  • scripts/release/sdk-import-boundary-baseline.json
  • scripts/release/static-quality-gate.mjs
  • src/mcp/server.ts
  • src/sdk/runtime.ts
  • tests/unit/docs-examples/sdk-app-embedding.spec.ts
  • tests/unit/docs-examples/sdk-contract-consumer.spec.ts
  • tests/unit/mcp/mcp-server-branch-residual.spec.ts
  • tests/unit/sdk/sdk-index.spec.ts
💤 Files with no reviewable changes (1)
  • eslint-suppressions.json

Comment thread src/sdk/runtime.ts Resolved
Comment thread src/sdk/runtime.ts Resolved
Comment thread src/sdk/runtime.ts Resolved
Comment thread src/sdk/runtime.ts Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 8 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

@unbraind

unbraind commented Jul 5, 2026

Copy link
Copy Markdown
Owner Author

/gemini review

@unbraind

unbraind commented Jul 5, 2026

Copy link
Copy Markdown
Owner Author

@greptileai review

@unbraind

unbraind commented Jul 5, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Jul 5, 2026 •

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@unbraind
unbraind force-pushed the sdk-runtime-action-client branch from efd47f2 to 763570c Compare July 6, 2026 00:31
This was referenced Jul 23, 2026
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.

Expose a high-level execution surface in the SDK (PmClient / runAction)

2 participants