fix(workflows): remove background launch alias - #305
Open
seekskyworld wants to merge 1 commit into
Open
Conversation
Signed-off-by: seekskyworld <djh1813553759@gmail.com>
tt-a1i
requested changes
Aug 31, 2026
tt-a1i
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed exact head 5dcb67522e9e88c54a50e40b717ca5a1101b1cac.
Problem / Value / Approach
统一到正向的 wait,删除相反布尔值及兼容分支,方向合理。schema 保持 additionalProperties: false,旧参数由 Pi 原生校验拒绝;WorkflowDetails/artifact 的 background 继续记录实际运行状态。未发现新增运行时缺陷或需要额外设计的地方。
Standards
[P2] 请保留 #139 的历史结论与验证,不要原地改成 #305 的新行为。设计文档 671–677 已改为删除 alias,却仍把最终验证归给 #139 exact-head review;#139 实际验证的是接受 deprecated alias。按 docs/README.md 的历史结论只追加规则,保留原段落,另加本次变更说明、revision 与验证边界即可。
Spec
- 迁移/发布前提还需要维护者明确。这是兼容门槛,不是已证实的 runtime bug。Issue #132 与 #139 最终合并合同要求先给迁移提示、在另行公告的 breaking release 删除。当前 GitHub latest v0.4.0 发布于 2026-08-24,早于 #139 在 2026-08-30 合入;仅把 package.json 改成 1.0.0,不能证明 PR 所称“兼容窗口已结束”。请关联明确的 breaking 发布安排,并保留可操作的映射:background:true → wait:false;background:false → wait:true。若维护者决定直接 breaking,应明确记录这个决定,不必为此新造兼容框架。
- 本轴也发现上面的 #139 验证错引。
删除目标本身实现正确:wait/host capability、cancellation 与历史 artifact 兼容边界未见回归。
Verification
在该 exact head 的隔离工作树验证:
bun run checkpassed;bun run test:Node 1065 passed / 1 skipped,Vitest 30 passed;- focused coordinator/rendering:15/15;
git diff --checkpassed。
现有 CI 通过,但分支 behind main;同步后需要最终 head 的新检查。本 review 不代表 runtime smoke、合并或 release 验收。
结论:Changes requested。收口历史文档和 breaking 发布前提后可复审;本轮未修改代码、未合并。
| ## 15. 后续合同变更(2026-08-30) | ||
|
|
||
| Issue #132 / PR #139 将 `wait` 作为唯一推荐的新调用策略。由于 `background` 从 OpenPI v0.2.0 起就是已发布输入,本次继续把它作为 deprecated inverse alias 接受:`background: true` 对应 `wait: false`,`background: false` 对应 `wait: true`;真正删除只在另行公告的 breaking release 进行。除这一已发布兼容字段外,未知输入继续 fail closed。 | ||
| Issue #132 / PR #139 将 `wait` 作为唯一推荐的新调用策略,并在兼容窗口接受已发布的 `background` inverse alias。OpenPI 1.0.0 现在移除该调用字段;未知输入(包括旧 `background` 参数)由 `additionalProperties: false` fail closed。除调用 schema 外,历史 artifact 的兼容读取不受影响。 |
Collaborator
Code Review SummaryChanges requested,固定 head
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Issue #132 tracks removal of the published
backgroundinverse alias from the Workflow launch API. The compatibility window has ended for the 1.0.0 breaking release, but the model-facing schema and coordinator still accepted bothwaitandbackground.Value
A single positive
waitpolicy reduces schema ambiguity and prevents conflicting inverse booleans from reaching the Workflow runtime. Existing persisted workflow artifacts and operator-facing detached-state facts remain readable.Approach
backgroundfrom the Workflow launch schema and launch-policy input.waitand host delivery capability only.WorkflowDetails.backgroundand persisted artifact fields unchanged for historical compatibility.0.4.0to1.0.0for the breaking API change.Validation
npx --yes bun@1.3.14 run lint— passed.npx --yes bun@1.3.14 run typecheck— passed.npx --yes bun@1.3.14 run test— 1065 passed, 1 skipped; Vitest 30 passed.node --test --experimental-strip-types tests/extensions/workflows/coordinator.test.ts tests/extensions/workflows/rendering.test.ts— 15 passed.git diff --check— passed.npx --yes bun@1.3.14 run check— blocked only by pre-existing formatting differences in untracked.golutraJSON files; those user-owned collaboration files were not modified.Impact
wait;backgroundis rejected as an unknown argument.wait.WorkflowDetails.backgroundand historical artifact fields remain intact.backgroundmust migrate towait.Fixes #132