🤖 feat: streamline workflow authoring#3575
Conversation
Adds opt-in workflow args metadata parsing, sandbox mux schema/util helpers, and built-in git review context/preflight actions.\n\n---\n\n_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `887858{MUX_COSTS_USD:-unknown}`_\n\n<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=26.32 -->
Moves workflow descriptions into metadata, adds generated built-in GitHub action sources, action SDK helpers, and mux patch/parallel helpers.\n\nValidation:\n- bun test src/node/services/workflows/WorkflowDefinitionStore.test.ts src/node/services/workflows/WorkflowService.test.ts src/node/services/workflows/WorkflowActionRunner.test.ts src/cli/workflow.test.ts src/cli/trust.test.ts --test-name-pattern "description|workflow args|parallel agent maps|SDK helpers|git reviewContext|starts a named workflow|workflow|trust"\n- make typecheck\n- make lint\n- make static-check\n\n---\n\n_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `1091508{MUX_COSTS_USD:-unknown}`_\n\n<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=36.17 -->
Preserve workflow metadata while promoting descriptions, track generated workflow action content, and reduce redundant Git/GitHub action work. --- _Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$56.31`_ <!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=56.31 -->
Move built-in Git workflow actions into generated action source files, consolidate GitHub helper calls, avoid an extra label refetch, and reuse the shared plain-object guard for workflow args.
Add static workflow metadata parsing for mux.schema helpers, extracted workflow runtime/action child sources, stronger built-in action schemas, and concise schema alias support across workflows/actions. --- _Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$181.71`_ <!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=181.71 -->
|
@codex review |
Ensure Jest/Windows test environments can import the generated workflow runtime source module without requiring local codegen first. --- _Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$187.08`_ <!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=187.08 -->
|
@codex review Pushed a CI fix for the missing generated workflow runtime source module and re-ran local validation. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2e30d5aacf
ℹ️ 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".
Fix deep-review findings around generated workflow bundle drift checks, workflow JS lint coverage, metadata stripping, schema alias ordering, nullable workflow args, quoted Windows paths, stale JSON schema union tests, and raw JS tsconfig inclusion. Validation: - env MUX_ESLINT_CONCURRENCY=1 make static-check - make build-main - bun test src/common/utils/jsonSchemaSubset.test.ts - bun test src/node/services/workflows/WorkflowActionRunner.test.ts --test-name-pattern "rejects schema aliases declared after action metadata|runs JavaScript actions out of process|describes every built-in action" - bun test src/node/services/workflows/WorkflowService.test.ts --test-name-pattern "normalizes quoted Windows paths|runs workflows with metadata strings|normalizes workflow args from static metadata" --- _Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$190.19`_ <!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=190.19 -->
|
@codex review Ran |
Export GitHub action reconcile handlers as callable async declarations so static action discovery reports reconciliation support consistently with child execution. Validation: - env MUX_ESLINT_CONCURRENCY=1 make static-check - bun test src/node/services/workflows/WorkflowActionRunner.test.ts --test-name-pattern "describes every built-in workflow action" --- _Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$190.19`_ <!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=190.19 -->
|
@codex review Addressed the reconcile export finding, replied inline, resolved the thread, and pushed the fix. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a04adfb23d
ℹ️ 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".
Mark read-only GitHub fetch/verify workflow actions as read effects so interrupted or failed attempts remain retryable without reconciliation. Validation: - env MUX_ESLINT_CONCURRENCY=1 make static-check - bun test src/node/services/workflows/WorkflowActionRunner.test.ts --test-name-pattern "describes every built-in workflow action" --- _Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$190.19`_ <!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=190.19 -->
|
@codex review Addressed the read-only GitHub action effect finding, replied inline, resolved the thread, and pushed the fix. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 67b90fdaf6
ℹ️ 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".
Keep legacy // description: workflow headers discoverable while supporting new static metadata declarations, and cover legacy project workflow listing/reading. Validation: - env MUX_ESLINT_CONCURRENCY=1 make static-check - bun test src/node/services/workflows/WorkflowDefinitionStore.test.ts --test-name-pattern "legacy description headers" --- _Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$190.19`_ <!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=190.19 -->
|
@codex review Addressed the legacy workflow description header compatibility finding, replied inline, resolved the thread, and pushed the fix. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6a945c2ff5
ℹ️ 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".
Mask regex literals in the workflow action child source before depth-counting export declarations so executable actions with regex literals before metadata/execute load consistently with static describe. Validation: - env MUX_ESLINT_CONCURRENCY=1 make static-check - bun test src/node/services/workflows/WorkflowActionRunner.test.ts --test-name-pattern "executes actions with regex literals before exports" --- _Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$190.19`_ <!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=190.19 -->
|
@codex review Addressed the action child regex masking finding, replied inline, resolved the thread, and pushed the fix. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8e07a35291
ℹ️ 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".
|
@codex review Pushed a unit-test-only follow-up for the CI failures: the parallelActions fixture now uses the tightened git.status input schema and the sandbox exposure expectation reflects the intentional mux helper global. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2e95945c8a
ℹ️ 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".
|
Addressed the latest Codex findings:
Validation after fixes:
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ac8292142d
ℹ️ 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".
|
Addressed Validation:
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 81eca0e0e2
ℹ️ 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".
|
Addressed Validation:
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a6e61c9342
ℹ️ 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".
|
Addressed Validation:
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review Pushed a test-only CI stabilization after repeated Validation:
|
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
5681a5a to
8b0435f
Compare
|
@codex review I pushed a CI stabilization update for the workflow fixture timeout failures. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8b0435f3c8
ℹ️ 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".
8b0435f to
4545707
Compare
|
@codex review I pushed another CI stabilization update: the QuickJS-heavy built-in workflow fixture now runs outside Bun coverage in the unit job, and workflow mutation lock waits tolerate CI filesystem stalls. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4545707d7e
ℹ️ 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".
4545707 to
9f1e739
Compare
|
@codex review Addressed the unresolved |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review Pushed ad08f1f with the template-literal metadata promotion fix and regression coverage. Local validation passed:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ad08f1f2dc
ℹ️ 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".
|
@codex review Pushed 78a0868 to reject interpolated template-literal metadata and added regression coverage. Local validation passed:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 78a0868473
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7c27a0f328
ℹ️ 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".
| const aliases = new Set<string>(); | ||
| const maskedSource = maskStaticJavaScriptSource(source.slice(0, beforeIndex)); | ||
| const pattern = | ||
| /(^|[;\n])\s*(?:export\s+)?(?:const|let|var)\s+([A-Za-z_$][A-Za-z0-9_$]*)\s*=\s*mux\.schema\s*(?:[;\n]|$)/gmu; |
There was a problem hiding this comment.
Disallow mutable schema aliases
When a workflow/action declares let s = mux.schema; s = somethingElse; export const metadata = { inputSchema: s.string() }, this regex still records s as a static schema alias, so discovery/args normalization/describing succeeds using mux.schema even though runtime evaluation will use the reassigned binding or throw. Since static metadata is meant to match runtime evaluation, only immutable const aliases should be accepted or later assignments should invalidate the alias.
Useful? React with 👍 / 👎.
Summary
Streamlines durable workflow authoring by introducing static metadata parsing for workflow/action schemas, bundling runtime/action child JavaScript from lintable source files, and adding concise
const s = mux.schema;schema aliases across built-in workflows and actions.Background
Workflow definitions and actions were accumulating repeated handwritten schema objects and
mux.schema.*boilerplate. Runtime support code also lived as large inline strings, which made it harder to lint, format, and maintain.Implementation
mux.schema.*and top-level schema aliases such asconst s = mux.schema;, restricted to aliases declared before metadata so static discovery matches runtime evaluation.};, nullable workflow args, quoted Windows path args, and raw JS tsconfig inclusion.Validation
env MUX_ESLINT_CONCURRENCY=1 make static-checkmake build-mainenv TEST_INTEGRATION=1 bun x jest tests/ipc/runtime/executeBash.test.ts --runInBandbun test src/common/utils/jsonSchemaSubset.test.tsbun test src/node/services/workflows/WorkflowActionRunner.test.ts --test-name-pattern "rejects schema aliases declared after action metadata|runs JavaScript actions out of process|describes every built-in action"bun test src/node/services/workflows/WorkflowService.test.ts --test-name-pattern "normalizes quoted Windows paths|runs workflows with metadata strings|normalizes workflow args from static metadata"bun test src/node/services/workflows/builtInWorkflowDefinitions.test.ts --test-name-pattern "built-in workflows"deep-review-workflowand fixed the identified issues.simplifyworkflow successfully via CLI after rebasing onorigin/main.Risks
Moderate: this touches durable workflow discovery, metadata parsing, action execution, generated built-in workflow/action bundles, and validation infrastructure. The parser intentionally supports only static top-level schema aliases declared before metadata, not dynamic aliasing, to keep discovery deterministic and aligned with runtime execution order.
Generated with
mux• Model:openai:gpt-5.5• Thinking:xhigh• Cost:$190.19