Skip to content

fix(workflows): remove background launch alias - #305

Open
seekskyworld wants to merge 1 commit into
openpi-dev:mainfrom
seekskyworld:fix/132-remove-background-alias
Open

seekskyworld wants to merge 1 commit into
openpi-dev:mainfrom
seekskyworld:fix/132-remove-background-alias

Conversation

@seekskyworld

Copy link
Copy Markdown
Contributor

Problem

Issue #132 tracks removal of the published background inverse 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 both wait and background.

Value

A single positive wait policy 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

  • Remove background from the Workflow launch schema and launch-policy input.
  • Resolve inline/detached mode from wait and host delivery capability only.
  • Remove deprecated alias rendering and prompt copy.
  • Keep WorkflowDetails.background and persisted artifact fields unchanged for historical compatibility.
  • Update the Workflow reference/design documentation and focused schema/coordinator/rendering/e2e tests.
  • Bump the package version from 0.4.0 to 1.0.0 for the breaking API change.

Validation

  • npx --yes [email protected] run lint — passed.
  • npx --yes [email protected] run typecheck — passed.
  • npx --yes [email protected] 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 [email protected] run check — blocked only by pre-existing formatting differences in untracked .golutra JSON files; those user-owned collaboration files were not modified.

Impact

  • User-visible behavior: callers must use wait; background is rejected as an unknown argument.
  • Model-visible context/tools: Workflow schema exposes only wait.
  • Runtime/lifecycle: inline/detached lifecycle semantics are unchanged.
  • Persisted data: WorkflowDetails.background and historical artifact fields remain intact.
  • Compatibility/risk: this is intentionally a 1.0.0 breaking change; released callers using background must migrate to wait.

Fixes #132

@github-actions github-actions Bot added documentation Improvements or additions to documentation area:workflows Workflow engine, capability, skills, or tests labels Aug 30, 2026

@tt-a1i tt-a1i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. 迁移/发布前提还需要维护者明确。这是兼容门槛,不是已证实的 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,应明确记录这个决定,不必为此新造兼容框架。
  2. 本轴也发现上面的 #139 验证错引。
    删除目标本身实现正确:wait/host capability、cancellation 与历史 artifact 兼容边界未见回归。

Verification

在该 exact head 的隔离工作树验证:

  • bun run check passed;
  • bun run test:Node 1065 passed / 1 skipped,Vitest 30 passed;
  • focused coordinator/rendering:15/15;
  • git diff --check passed。
    现有 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 的兼容读取不受影响。

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [P2] 这里把本次删除 alias 写进了 #139 的历史合同,而下面 675–677 仍把最终验证归于 #139 exact-head review;那个 review 实际验证的是保留 alias。请保留 #139 原结论和对应凭证,另追加 #305 的变更说明与本次验证边界,避免旧凭证证明相反的新行为。

@tt-a1i

tt-a1i commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Code Review Summary

Changes requested,固定 head 5dcb675。正式 review。

  • 删除反向 alias 的实现方向合理,未发现新增运行时缺陷;本地 check、全量测试和专项测试通过。
  • 请保留 fix(workflows): deprecate background launch alias #139 历史记录,另加 fix(workflows): remove background launch alias #305 的变更与验证说明,不复用旧 review 证明相反的新行为。
  • 需要维护者明确 1.0.0 breaking 发布与迁移安排;这是兼容门槛,不要求再造框架。
  • 分支 behind main,同步后需要新 head 检查。本轮未修改、推送或合并。

Drop the call-parameter alias while keeping artifact/details background
as detached-state fact. Preserve the openpi-dev#139 history addendum and record
this breaking removal separately without a fake 1.0.0 version bump.
@seekskyworld
seekskyworld force-pushed the fix/132-remove-background-alias branch from 5dcb675 to 1b39b9a Compare September 13, 2026 06:17
@seekskyworld

Copy link
Copy Markdown
Contributor Author

Rebased onto current main and addressed the review without claiming a fake 1.0.0 window:

  • Section 15 of the design doc is unchanged: it remains the fix(workflows): deprecate background launch alias #139 history (deprecated alias accepted, delete only in an announced breaking release).
  • New section 16 records this PR’s removal, the mapping background:true → wait:false / background:false → wait:true, and that validation is this head—not the fix(workflows): deprecate background launch alias #139 review.
  • package.json is not bumped to 1.0.0.
  • Call schema no longer has background; artifact/details background still records actual detached state.

Merge remains a breaking call-schema change; it should land with the maintainer’s announced breaking release.

@tt-a1i tt-a1i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审查提交:1b39b9af9aba8bbeb90c6025fae21c0283ca4dd1。

需要先明确兼容性和发布决策。

验证范围

Full runtime/schema/tests/docs diff reviewed. Historical #139 text now preserved with append-only #305 section; old documentation finding fixed. 14 coordinator/rendering tests pass, including native argument validator rejection of background.

限制与后续

Removes published background alias. Still needs an explicit announced breaking-release/migration decision; changing prose to say this is that deletion does not establish release authorization. No runtime defect confirmed.

@tt-a1i tt-a1i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exact reviewed head: 1b39b9af9aba8bbeb90c6025fae21c0283ca4dd1.

Current main still contains the released workflow background aliases, so this is a real compatibility removal rather than obsolete code cleanup. The sensitive choice is the #132 compatibility window and breaking-release/migration policy. Keep implementation gated until that choice is accepted; correct rejection of old parameters alone is not publication approval.

Verification: prior exact-head Standards and Spec evidence reused because this head is unchanged; current review/CI/integration metadata refreshed. No complete-suite rerun, installed-runtime/provider run, or visual acceptance performed in this update.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:workflows Workflow engine, capability, skills, or tests documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deprecation(workflows): 移除 background 反向别名,统一使用 wait

2 participants