Skip to content

fix(schema): reject interpolated cwd placeholders#65

Merged
heggria merged 2 commits into
heggria:mainfrom
blain3white:fix/reject-interpolated-cwd
Jul 9, 2026
Merged

fix(schema): reject interpolated cwd placeholders#65
heggria merged 2 commits into
heggria:mainfrom
blain3white:fix/reject-interpolated-cwd

Conversation

@blain3white

Copy link
Copy Markdown
Contributor

Summary

Reject interpolation placeholders in phase.cwd during schema validation.

cwd is documented as a literal path (or a reserved workspace keyword like temp, dedicated, worktree), but flows could still pass values like {args.repo_dir}. At runtime this eventually surfaced as a misleading spawn ... node ENOENT, which looked like a missing Node binary even though the real problem was an invalid working directory.

This change fails fast with a clear validation error instead.

Changes

  • add a dedicated validation check for interpolation placeholders in phase.cwd
  • keep literal paths and workspace keywords valid
  • add regression coverage in schema.test.ts

Example

Before:

{
  "name": "x",
  "phases": [
    { "id": "p", "type": "agent", "task": "t", "cwd": "{args.repo_dir}" }
  ]
}

Could pass validation and later fail with:

spawn /.../node ENOENT

After:

Phase 'p': 'cwd' does not support interpolation placeholders ({args.repo_dir}).
Use a literal path, or a reserved workspace keyword ('temp', 'dedicated', 'worktree').

Testing

  • PI_TASKFLOW_BUILTIN_AGENTS_DIR= node --conditions=development --experimental-strip-types --test packages/taskflow-core/test/schema.test.ts
  • pnpm --filter taskflow-core build
  • pnpm --filter pi-taskflow build

@blain3white blain3white force-pushed the fix/reject-interpolated-cwd branch from 28a7e6e to d5dbda7 Compare July 9, 2026 11:19
@heggria heggria enabled auto-merge (squash) July 9, 2026 12:22
@heggria heggria merged commit 47c85f8 into heggria:main Jul 9, 2026
6 checks passed
@heggria heggria mentioned this pull request Jul 9, 2026
heggria added a commit that referenced this pull request Jul 9, 2026
Release prep for 0.1.8 — a small patch release shipping the cwd
interpolation-placeholder fix (#65) plus the batched dependency bumps
(#57, #66). No engine API changes.

Bumps all seven packages + root to 0.1.8 in lockstep, including the
taskflow-core / taskflow-hosts / taskflow-mcp-core dependency pins and
the codex/claude/opencode plugin manifests (.mcp.json npx pins +
plugin.json versions), and adds the 0.1.8 CHANGELOG section.

Pre-flight: typecheck 0 errors, 1160/1160 unit tests green, build + 7
packages OK, skills drift-guard green.
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