fix(workflows): add provider: claude to opus[1m] implement nodes#1622
Conversation
Without an explicit `provider:` annotation, the DAG executor falls back to `config.assistant` (default: `codex` for some users). Codex silently ignores `opus[1m]`, completes in ~3 s with empty output, and downstream nodes receive nothing. The three bundled workflow files that pair `model: opus[1m]` with no `provider:` are now annotated with `provider: claude`. Also fixes three pre-existing Windows CI issues: path-separator bug in `check-bundled-skill.ts` (backslash vs forward slash), newline truncation in `dag-executor.test.ts` script-failure test, and `IS_SANDBOX=1` guard skip in `provider.test.ts` root-UID test. Regenerates `bundled-defaults.generated.ts`. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (10)
📝 WalkthroughWalkthroughThis PR enforces explicit provider routing for opus-model workflow nodes by declaring ChangesProvider Routing Fix for Opus Models
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
🔍 Comprehensive PR ReviewPR: #1622 — fix(workflows): add provider: claude to opus[1m] implement nodes Verdict: ✅ APPROVEThe fix is correct, complete, and safe. The 3 YAML annotations are on exactly the right nodes, the generated file is consistent, the Windows CI regressions are resolved, and all CLAUDE.md rules pass. No blocking issues found across any review dimension.
✅ What's Good
🟡 Medium Issues (Suggested Follow-ups — Non-Blocking)1. No regression test for the core bug scenario (criticality: 8/10)📍 No test verifies the provider resolution fallthrough: node with Suggested testit('routes node to config.assistant when node has no provider annotation', async () => {
// Sets up a node with model: opus[1m] but no provider:
// Passes workflowProvider = 'codex' (simulating defaultAssistant: codex)
// Asserts getAgentProvider was called with 'codex', not 'claude'
// Then with provider: 'claude' on the node, asserts it routes to 'claude'
});Recommendation: Create a follow-up issue — out of scope for this targeted fix. 2. No semantic assertion for bundled YAML
|
| Issue | Location | Suggestion |
|---|---|---|
Substring check in check-bundled-skill.ts is a known limitation |
scripts/check-bundled-skill.ts:42-44 |
Acceptable for a safety-net script — YAGNI applies. Keep as-is. |
Stale null comment in dag-executor.ts (pre-existing) |
packages/workflows/src/dag-executor.ts:315 |
Fix in follow-up: // undefined, symbol, bigint → empty (null is caught above by typeof check) |
| Docs: add provider/model independence warning | packages/docs-web/src/content/docs/guides/authoring-workflows.md ~line 613 |
One sentence: "Always pair a provider-specific model string with an explicit provider: on the node." |
📋 Suggested Follow-up Issues
| Issue Title | Priority |
|---|---|
Add regression test: opus node without provider: routes to config.assistant |
P2 |
Add semantic test: bundled opus[*] nodes always have explicit provider: claude |
P3 |
| Docs: add provider/model independence warning to authoring-workflows.md | P2 |
Fix stale null comment in dag-executor.ts:315 |
P3 |
Next Steps
- No auto-fix needed — zero CRITICAL or HIGH issues
- Mark PR ready when CI passes (currently draft)
- Merge — fix is correct and complete
Reviewed by Archon comprehensive-pr-review workflow
Artifacts: .archon/workspaces/coleam00/Archon/artifacts/runs/7849040943c96c2ca0c1ca84db990094/review/
- Add regression tests for provider resolution (#1610): assert that a node with no provider: routes to workflowProvider, and that explicit provider: claude overrides workflowProvider even when set to 'codex' - Add bundled opus invariant test: every default workflow node with an opus model must have provider: claude at node or workflow level - Fix stale comment in dag-executor.ts:315 — null is caught by the typeof check above, not by this branch - Docs: add provider/model independence warning to authoring-workflows.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Review Fix Report4 findings addressed (2 MEDIUM, 1 LOW code, 1 LOW docs). 0 findings skipped. MEDIUM #1 — Regression test for provider resolution fallthroughAdded
MEDIUM #2 — Bundled opus node content assertionAdded
LOW — Fix stale comment in
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
合并上游 fix(workflows): add provider: claude to opus[1m] implement nodes (coleam00#1622)。 变更: - 上游:3 个内置 workflow(feature-development / idea-to-pr / plan-to-pr)的 implement 节点 补上 provider: claude,配合 opus[1m] 模型字符串路由到正确 provider - 镜像:通过 generate:zh-workflows 自动同步到 3 个 -zh.yaml 镜像 - 重生成 bundled-defaults.generated.ts 冲突仅 bundled-defaults.generated.ts,已重生成;validate 全套 3571 pass / 0 fail。
…eam00#1622) * fix(workflows): add provider: claude to opus[1m] nodes — closes coleam00#1610 Without an explicit `provider:` annotation, the DAG executor falls back to `config.assistant` (default: `codex` for some users). Codex silently ignores `opus[1m]`, completes in ~3 s with empty output, and downstream nodes receive nothing. The three bundled workflow files that pair `model: opus[1m]` with no `provider:` are now annotated with `provider: claude`. Also fixes three pre-existing Windows CI issues: path-separator bug in `check-bundled-skill.ts` (backslash vs forward slash), newline truncation in `dag-executor.test.ts` script-failure test, and `IS_SANDBOX=1` guard skip in `provider.test.ts` root-UID test. Regenerates `bundled-defaults.generated.ts`. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(review): address review findings for PR coleam00#1622 - Add regression tests for provider resolution (coleam00#1610): assert that a node with no provider: routes to workflowProvider, and that explicit provider: claude overrides workflowProvider even when set to 'codex' - Add bundled opus invariant test: every default workflow node with an opus model must have provider: claude at node or workflow level - Fix stale comment in dag-executor.ts:315 — null is caught by the typeof check above, not by this branch - Docs: add provider/model independence warning to authoring-workflows.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * simplify: replace for loop with .some() in isVersionRequest Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
archon-feature-development,archon-idea-to-pr,archon-plan-to-pr) usemodel: opus[1m]on their implement nodes but do not setprovider: claude. When a user'sdefaultAssistantiscodex, the DAG executor silently routes those nodes to Codex, which ignoresopus[1m]and completes in ~3 s with empty output.provider: claudeto the three affected implement nodes; regeneratedbundled-defaults.generated.ts. Also fixed three pre-existing Windows CI failures (path-separator bug, newline truncation,IS_SANDBOX=1guard skip).dag-executor.tsprovider resolution logic is unchanged (explicit annotation is the right fix); the five workflow files that already setprovider: claudeat the workflow level are untouched.UX Journey
Before
After
Architecture Diagram
Before
After
Connection inventory:
provider: claudeprovider: claudeprovider: claudeLabel Snapshot
risk: lowsize: Sworkflowsworkflows:bundled-defaultsChange Metadata
bugworkflowsLinked Issue
Validation Evidence (required)
All six checks passed:
check:bundled✅check:bundled-skill✅ (also fixed Windows path-separator bug)type-check✅ (0 errors across all 10 packages)lint✅ (0 errors, 0 warnings)format:check✅test✅ (0 failures; also fixed 2 pre-existing Windows test failures)Evidence provided: validation.md artifact from workflow run
No commands skipped.
Security Impact (required)
Compatibility / Migration
provider: claudewas already the effective behavior for users withdefaultAssistant: claude(the default). This makes it explicit and safe for all users.Human Verification (required)
provider: claudeis present in all three YAML files;bundled-defaults.generated.tscontains the updated YAML strings;bun run validatepasses on Windows.provider: claudeat workflow level are unmodified and unaffected.defaultAssistant: codexagainst a real repo (no Codex license in test env).Side Effects / Blast Radius (required)
archon-feature-development,archon-idea-to-pr,archon-plan-to-pr— implement nodes now always route to Claude regardless ofdefaultAssistant.opus[1m]nodes (unlikely — Codex silently no-ops them) will now route to Claude as intended.node_startedevent now always shows{provider: "claude"}for these nodes — observable in workflow logs.Rollback Plan (required)
provider: claudelines and re-runbun run generate:bundled.node_completedwithduration_ms < 5000andnode_output: ""on an implement node — same pattern as the original bug report.Risks and Mitigations
archon-feature-developmentwithdefaultAssistant: codexand no Claude binary configured would now get a Claude provider error instead of silent empty output.Summary by CodeRabbit
Documentation
Chores
Tests