Repository navigation
Description
Problem
On Windows, a workflow child agent can complete successfully and persist the correct structured result, but the DSL agent() call receives ok: false with:
Workflow handoff result artifact is invalid
This breaks successful schema-based workflow agents on Windows: the child execution and audit artifact are correct, but the handoff fails, no result ref is produced, and downstream inputs: chains are interrupted.
Environment
- OS: Windows
- OpenPI: current upstream
mainata15a0d8 - Node.js: v24.12.0
Reproduction
node --test --experimental-strip-types --test-name-pattern "agent calls run through the injected session factory" tests/extensions/workflows/execute.e2e.test.tsThe test deterministically fails in about 2.6 seconds. The workflow reports the child agent as successful, but its DSL result is:
{
"ok": false,
"output": ""
}A direct boundary probe shows the mismatch:
artifact=agent-results\agent-0001.json
handoff=Workflow handoff result artifact is invalid
Root cause
persistWorkflowAgentResult() creates a persisted protocol identity with the platform-dependent path.join():
On Windows this returns:
agent-results\agent-0001.json
The handoff registry correctly accepts only the canonical POSIX grammar:
agent-results/agent-0001.json
The dashboard projection also assumes the canonical / prefix:
The current artifact unit test verifies that the returned value can be used as a local filesystem path, but does not assert that the persisted artifact identity is platform-independent.
Expected behavior
Persisted workflow artifact identities should always use canonical POSIX / separators on every host. Filesystem access can continue resolving that run-relative identity with the platform path APIs.
A successful child agent with structured output should remain ok: true, produce a handoff ref, and remain usable by downstream workflow inputs on Windows.
Suggested fix
Generate the identity with a POSIX join or an explicit canonical join at the producer boundary, for example:
const artifact = path.posix.join(
"agent-results",
`agent-${String(index).padStart(4, "0")}.json`,
);Prefer keeping the consumer strict instead of accepting both slash formats, so persisted artifact identities remain canonical.
Regression coverage
- Assert
persistWorkflowAgentResult()returnsagent-results/agent-0001.jsonon Windows and other platforms. - Keep the existing execute E2E green on Windows and verify the successful DSL result includes the expected output/ref.
- Verify the persisted
workflow.jsonuses/inresultArtifact.
Activity
yxr-2025 commentedon Aug 29, 2026
I'll take this one. I plan to keep the handoff/dashboard consumers strict, canonicalize the artifact identity at the producer boundary, and add unit plus execute E2E regression coverage for Windows before opening a PR.
testikun commentedon Sep 5, 2026
我来处理这个小 slice,范围限定在当前 issue 的最小修复与回归测试,完成后提交 PR。
testikun commentedon Sep 5, 2026
Problem
Closes #284. Workflow agent result artifact identities used platform-specific path separators, so Windows handoff validation rejected successful child results.
Fix
Use
path.posix.joinfor persisted run-relative artifact identities while retaining platform-native paths for filesystem access. Add a regression assertion for the canonical slash-separated identity.Validation
node --experimental-strip-types --test extensions/workflows/artifacts.test.ts extensions/workflows/handoff.test.tsgit diff --checktt-a1i commentedon Sep 7, 2026
已核对生产修复使用规范的 POSIX artifact identity,文件系统访问仍使用平台路径;#286 的 Windows artifact/handoff 回归覆盖已合入 main。按已完成关闭,保留原生产修复与测试贡献。