Skip to content

Mark source-built plugins with an explicit 0.0.0+source version - #525

Merged
Dong1017 merged 1 commit into
mainfrom
bot/issue-511
Nov 20, 2026
Merged

Dong1017 merged 1 commit into
mainfrom
bot/issue-511

Conversation

@Dong1017

Copy link
Copy Markdown
Collaborator

Governing Issue and delivery slice

Refs #511

  • Accepted scope / delegation: The issue owner's decision comment (option 2, an explicit non-release marker) authorizes this fix PR and sets the contract and acceptance list. This PR follows that comment.
  • What this PR delivers: Source builds of the Codex, WorkSwarm and DSH plugins report 0.0.0+source as the plugin's own version. The three templates carry it, and plugin_version in runtime/manifest.json and in --plugin-info follows. runtime_version still reports the bundled runtime. Regression tests cover all three hosts, and the plugin docs, docs/releases.md and CHANGELOG.md describe the marker.
  • What it does not deliver: A clean tag checkout does not resolve to its tag version (out of scope per the decision). DSH gets no release mode. No change to --release-version validation, .github/, or tools/check_release.py. No native-host import or display check.

Changed artifacts and evidence

Requirement Actual change Check / evidence and result Remaining gap
Template versions become 0.0.0+source, no other metadata change plugins/inferrsi/plugin.json, plugins/workswarm/inferrsi/manifest.json, plugins/inferrsi-dsh/package.json: one version line each tests/test_plugin_source_version.py::test_templates_carry_the_source_marker: 3 passed none
Source build without _version.py: top-level metadata, runtime/manifest.json and --plugin-info (Codex, WorkSwarm, DSH) No builder change. The builders already copy the template version into plugin_version. test_source_build_reports_the_marker_beside_the_bundled_runtime[unbuilt-*]: 3 passed. Expects 0.0.0+source for the plugin and 0+unknown for runtime_version. none
Source build with a generated _version.py and no --release-version same test_source_build_reports_the_marker_beside_the_bundled_runtime[built-*]: 3 passed. Expects 0.0.0+source for the plugin and 0.2.0 for runtime_version. none
Codex and WorkSwarm: matching --release-version keeps release values none test_release_build_keeps_stamping_the_matching_runtime_version: 2 passed none
Codex and WorkSwarm: mismatched --release-version rejected before output none test_release_build_rejects_a_version_other_than_the_runtime: 4 passed (both hosts, with and without a generated version). Also checks that no directory or ZIP is left behind. none
Docs state a source build reports 0.0.0+source and is not a release docs/codex-plugin.md, docs/workswarm-plugin.md, docs/dsh-plugin.md, docs/releases.md, CHANGELOG.md Read-through only none
Existing protections in tests/test_codex_plugin.py stay No change to that file Release-mismatch and unknown-fallback tests passed in the run below none
List any host whose published schema rejects SemVer build metadata none See "Host schemas" below. None found. WorkSwarm's schema was not available to check.

Host schemas.

  • Codex: the portable schema at https://agent-plugins.org/schemas/1.0.0/plugin.schema.json, fetched during this work, declares version only as "type": "string". It does not reject build metadata.
  • DSH: package.json is an npm-style manifest. The semver package bundled with npm parses 0.0.0+source as valid. DSH's own manifest loader was not run.
  • WorkSwarm: I found no published schema for manifest.json in the repository and did not check one elsewhere. Its manifest version is not validated by any code in this repo that I found.

I know of no host whose schema rejects the value, but I did not verify any native host import or display.

Mutation check. With the three templates temporarily restored to 0.1.0, 0.1.0 and 0.0.0, 9 of the 15 new tests failed, so they do constrain the source version. The templates were then put back to 0.0.0+source.

Checks and dependencies

  • Checks actually run (result and tested scope):
    • python -m pytest tests/test_plugin_source_version.py: 15 passed.
    • python -m pytest tests/test_plugin_source_version.py tests/test_workswarm_plugin.py tests/test_dsh_plugin.py tests/test_resource_migration.py: 40 passed. Node was available, so the DSH form and bridge checks ran.
    • python -m pytest tests/test_codex_plugin.py: 46 passed, 8 failed (see below).
    • ruff check src tests tools: all checks passed.
  • Failed, skipped, timed-out or not-run checks (if applicable):
    • 8 failures in tests/test_codex_plugin.py, all from the local environment and none in version handling. Six (test_comparison_preview_execution_status_and_report, 3 per host) need the git binary, which is not installed here. Two (test_returned_skill_paths_survive_process_exit_and_later_invocations[...-reference-...], one per host) start the launcher with python -I, which cannot see PyYAML installed in the user site, so the launcher reports that PyYAML is required. I did not run these on a baseline checkout, so I have not shown they fail identically without this change.
    • tests/test_release.py: 17 passed, 24 errors. All 24 errors are FileNotFoundError: 'git' from fixture setup, so those tests did not run. It is a release-planning test file that this change does not touch.
    • The full test suite and tools/check_release.py against a built release ZIP were not run. No release build was run, so the release workflow's own checks are unverified here.
    • Windows and macOS were not exercised.
  • Dependencies / shared interfaces / integration assumptions (if applicable): No builder code changed. The fix relies on tools/plugin_bundle.py and tools/build_dsh_plugin.py copying the template version into plugin_version, which the tests now pin. tools/check_release.py still requires the tag version, and release builds still stamp it.

Remaining work and Issue closure

  • Remaining Issue requirements / follow-up: Native-host import or display of the 0.0.0+source value is unverified. A clean tag checkout resolving to its tag version stays a separate question, as the decision comment states. The version marker does not identify source content; use content_sha256 and the source commit for that.
  • Goal-acceptance owner or accepted closure delegation: The issue owner. This PR does not claim closure.
  • Goal ready for acceptance? Not claimed

Handoff (only when an actual handoff or decision changed)

  • Accepted decision / status and link: Owner decision, option 2, in the issue thread.
  • Recipient and communication status: Not applicable.
  • Application status and artifact/evidence: applied. The changed files and the tests are listed above.
  • Relevant workspace state and next action: Review, then re-run tests/test_codex_plugin.py and tests/test_release.py where git is available.

Knowledge authorship declaration

{"schema_version":1,"head_sha":"8b32dae75c0b3b12f3b0426a204e6ad3110ee378","human_only":false,"material_ai_authors":[{"tool":"Claude Code","model_id":"claude-opus-5-5","effort":"xhigh","role":"author"}]}

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-opus-5-5).

@Dong1017 Dong1017 added area:harness Harness module: profile, A/B loop, quality gates, evidence reports kind:task Bounded delivery task with a delegated slice labels Nov 19, 2026
zengchuang-hw
zengchuang-hw previously approved these changes Nov 19, 2026

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PASS

首轮独立检视 c573f40a43ceef23ef08507fca662c95ffb65390 → 8b32dae75c0b3b12f3b0426a204e6ad3110ee378,对照 #511 版本契约。逐项比对三个模板,除 version 改为 0.0.0+source 外其余字段一致。现有 builder 把该标记传给 plugin_version,launcher 从 manifest 读取;runtime_version 仍独立报告打包的运行时。Codex/WorkSwarm 显式 release 保持三段数字和运行时版本匹配检查,DSH 仍是 source-only。

新增用例覆盖三个宿主的有/无生成版本源码包,以及两条 release 路径的匹配和失配无产物。批准前必做:无。已静态阅读九个文件及 builder/launcher;未执行构建、测试、release ZIP 校验或原生宿主导入与显示,未把这些限制算作通过。

cursor[bot]
cursor Bot previously approved these changes Nov 19, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

PR review verdict — PASS
Reviewed base c573f40a43ceef23ef08507fca662c95ffb65390 and head 8b32dae75c0b3b12f3b0426a204e6ad3110ee378.

Verified:

  • Three plugin templates stamp 0.0.0+source; plugin_version follows the marker while runtime_version still reports the bundled runtime on source builds; release --release-version path unchanged per scope (#511 option 2).
  • Local tests/test_plugin_source_version.py: 15 passed.
  • Ready green on tip: full-check 3.10/3.11, declarations, lint-and-smoke (44539700327).

Eligibility: technical/third-party verify only (cursor[bot] collaborator permission none). Not a write+ eligible Approver under docs/agent-collaboration.md; not dual-tip / merge-ready. Merge left to Dong always-on / write+ humans (zengchuang-hw tip Approve already on this head; Dong1017 is author so steward stays off the vote).

@cursor
cursor Bot dismissed stale reviews from zengchuang-hw and themself via a059547 November 20, 2026 01:51
@Dong1017

Copy link
Copy Markdown
Collaborator Author

Conflicts with main are resolved (sole conflict was CHANGELOG.md; both entries kept). Tip is a0595474. Please re-review.

@Dong1017

Copy link
Copy Markdown
Collaborator Author

@zengchuang-hw @cursor — merge conflicts with main are resolved (only CHANGELOG.md; kept both entries). Tip a0595474. Please re-review.

zengchuang-hw
zengchuang-hw previously approved these changes Nov 20, 2026

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PASS

增量 8b32dae7 → a0595474,上轮检视。本轮合入 main 的 Apps workflow 迁移;逐一对比本 PR 九个文件,除 CHANGELOG 带入主线条目外其余八个原文一致。三个模板的 0.0.0+source、独立 runtime version 和 release 校验契约未变。

批准前无必修项。仅静态核对增量、文件和回归定义;未执行构建、测试、宿主安装或查询 CI。

cursor[bot]
cursor Bot previously approved these changes Nov 20, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

PR review verdict — PASS
Reviewed base 493416520f537590eb8f2a4e74f276f82e488307 and head a05954746606e1ba5cb93794d05074ca21b91bf6.

Independent third-party re-verify after conflict resolution with main (CHANGELOG both-entries merge). Author is Dong1017 → first formal cursor vote on this tip (prior cursor Approve on 8b32dae7… was dismissed by the tip move).

Verified:

  • Source-built Codex/WorkSwarm/DSH plugins report 0.0.0+source in template/manifest/--plugin-info; runtime_version remains the bundled runtime; release/--release-version path unchanged per docs + CHANGELOG.
  • Local: tests/test_plugin_source_version.py → 15 passed.
  • Ready CI green on tip: lint-and-smoke, declarations, installed-package 3.10/3.11, full-check 3.10/3.11, dashboard-browser, pr-references (host-compatibility advisory non-blocking).

Eligibility: cursor[bot] collaborator permission is none. This Approve is technical/third-party verify only — not a write+ eligible Approver under docs/agent-collaboration.md, and not a claim that dual tip / merge-ready is satisfied. Merge still needs a write+ independent Approve and steward integration.

@david6666666

Copy link
Copy Markdown
Collaborator

#516 has been merged into main. Please rebase this branch onto the latest main and adjust the changes as needed. Please preserve the skill-routing changes from #516 when updating the Codex and WorkSwarm plugin manifests.

Plugins built from a source checkout without --release-version reported
the template's hard-coded version: 0.1.0 for the Codex and WorkSwarm
plugins and 0.0.0 for DSH. 0.1.0 reads like a real earlier release, and
runtime/manifest.json copied the same value into plugin_version.

Set the three template versions (plugins/inferrsi/plugin.json,
plugins/workswarm/inferrsi/manifest.json and
plugins/inferrsi-dsh/package.json) to 0.0.0+source. This is valid SemVer
2.0, and the +source build metadata marks the package as not a release.
plugin_version in runtime/manifest.json and in --plugin-info follows it.
runtime_version keeps reporting the bundled runtime, so in a source build
the two fields differ on purpose.

Release builds are unchanged. --release-version still accepts only
MAJOR.MINOR.PATCH, must match the built runtime and is rejected before
any output is written. DSH has no release mode and carries the marker.

Add tests/test_plugin_source_version.py. For Codex, WorkSwarm and DSH it
builds from a copied checkout with and without a generated _version.py
and checks the top-level metadata, runtime/manifest.json and
--plugin-info. For Codex and WorkSwarm it also checks a matching
--release-version and a mismatched one. Document the marker in the
plugin docs and the release notes, and add a changelog entry.

Agent-assisted-by: Claude Code / claude-opus-5-5 [effort=xhigh] (author)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
Agent-assisted-by: Codex (conflict resolution)
@Dong1017
Dong1017 dismissed stale reviews from cursor[bot] and zengchuang-hw via 1600322 November 20, 2026 05:24
@Dong1017
Dong1017 enabled auto-merge (squash) November 20, 2026 05:30

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PASS

增量 a0595474 → 1600322a,上轮检视。已按各自 base 比对有效变更:本轮重基带入现有说明和本地化,三个 source 模板的 0.0.0+source、独立 runtime version、显式 release 校验及 DSH source-only 约束未变。构建器、launcher 与回归测试不受本轮重基影响。无批准前必修项。

仅静态核对固定源码和文件树;未运行构建、测试、宿主安装或查询 CI。

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

PR review verdict — PASS
Reviewed base 4eaf7fb9f1033a355231002f5bfe353455d66b8d and head 1600322a7bd14060139872b5382e1418a2f9f6c0.

Independent third-party tip re-verify after #516 rebase (prior Approves on a0595474… dismissed). Author is Dong1017 → Dong ineligible; cursor supplies first formal tip vote this round.

Verified:

  • Three plugin templates stamp 0.0.0+source (Codex plugin.json, WorkSwarm manifest.json, DSH package.json).
  • Docs (codex-plugin.md, workswarm-plugin.md, dsh-plugin.md, releases.md) and CHANGELOG describe the source marker vs unchanged release --release-version path; runtime_version remains the bundled runtime.
  • New tests/test_plugin_source_version.py pins unbuilt/built source checkout behavior (Refs #511).
  • Ready tip green: full-check 3.10/3.11, installed-package, lint-and-smoke, declarations, pr-references (run 44680803479).

Technical/third-party verify only (collaborator permission none) — not a write+ eligible Approver / dual tip / merge-ready under docs/agent-collaboration.md. Merge still needs a write+ independent Approve.

@Dong1017
Dong1017 merged commit 0697f08 into main Nov 20, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:harness Harness module: profile, A/B loop, quality gates, evidence reports kind:task Bounded delivery task with a delegated slice

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants