Skip to content

[APPS-2961] Refactor: move local execution's side-effect-free helpers into their own module - #604

Open
tyffical wants to merge 1 commit into
masterfrom
tiffany.trinh/apps-2961-shared-execution-helpers
Open

tyffical wants to merge 1 commit into
masterfrom
tiffany.trinh/apps-2961-shared-execution-helpers

Conversation

@tyffical

@tyffical tyffical commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Changes

3 changes across local-execution-shared.ts and local-execution.ts
What changed File
Moves the $.Actions validation, serializeActionInputs, assertJsonRoundTrippable and makeActionsProxy, unchanged, into a module with no import-time side effects. local-execution-shared.ts
makeActionsProxy takes a dispatch callback, so its caller decides where a call goes. local-execution-shared.ts
Imports the moved helpers and passes the in-process dispatch to the proxy. local-execution.ts

QA Instructions

yarn typecheck:all
# Expected: exit 0 ✅ VERIFIED
yarn lint
# Expected: exit 0 ✅ VERIFIED
yarn cli integrity
# Expected: exit 0, no changes ✅ VERIFIED
TMPDIR=/private/tmp yarn test:unit packages/plugins/apps
# Expected: Test Suites: 39 passed; Tests: 906 passed, the existing local-execution tests unchanged ✅ VERIFIED
  • TMPDIR=/private/tmp is only for the macOS manifest-tags and parameters suites, which fail under /var/folders on master too.

Blast Radius

  • No feature flag: a pure move, with no behavior change.
  • Low risk: only local-execution.ts imports the moved code, and its tests run unchanged.

Documentation

🤖 Generated with Claude Code

…their own module

The $.Actions validation, JSON round-trip checks and $.Actions proxy move to
local-execution-shared.ts, unchanged, so a separate process can bundle them
without local-execution.ts's import-time globalThis.$ accessor. The proxy
takes a dispatch callback, so its caller decides where a call goes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@datadog-official

datadog-official Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 144ff8a | Docs | View more details | Give us feedback!

@tyffical

Copy link
Copy Markdown
Contributor Author

@codex review

@tyffical
tyffical marked this pull request as ready for review October 21, 2026 20:07
@tyffical
tyffical requested a review from a team as a code owner October 21, 2026 20:07
@tyffical
tyffical requested review from Scott-Meyer and removed request for a team October 21, 2026 20:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused extraction preserves validation, serialization, and dispatch behavior, with no blocking issues identified.

No open issues 🎉

What changed in this PR

Extracts reusable local-execution helpers into a side-effect-free module, preparing for sandboxed backend calls without changing current behavior.

Changes:

  • Moves action validation, JSON checks, and proxy creation into a shared module.
  • Injects a dispatch callback while preserving existing in-process execution.
File Description
packages/​plugins/​apps/​src/​vite/​local-execution.ts Imports shared helpers and supplies guarded dispatch.
packages/​plugins/​apps/​src/​vite/​local-execution-shared.ts Exports reusable helpers without installing the global $ accessor.

Review effort: Balanced

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 144ff8af0e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T20:09:30.417651Z 144ff8a Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@tyffical
tyffical added this pull request to stack #612 October 21, 2026 20:09
@tyffical
tyffical requested a review from sdkennedy2 October 21, 2026 20:16
@tyffical
tyffical removed this pull request from stack #612 October 23, 2026 13:10
@tyffical
tyffical added this pull request to stack #618 October 23, 2026 13:11
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.

2 participants