Skip to content

build: bump suffixed plugin versions on upstream releases - #12

Merged
EricWvi merged 3 commits into
ora-space:mainfrom
wanglongan587:build/422-upstream-suffix-bump
Oct 24, 2026
Merged

EricWvi merged 3 commits into
ora-space:mainfrom
wanglongan587:build/422-upstream-suffix-bump

Conversation

@wanglongan587

@wanglongan587 wanglongan587 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The nightly bump treated a suffixed version as arithmetic on its patch segment: 0.7.0-opencode2.1 became PATCH=0-opencode2.1, and $((PATCH + 1)) failed the whole run before any tag was pushed. This replaces that inline bash with scripts/bump-version.ts, which is tested:

0.6.11            -> 0.6.12            no suffix: the patch moves
0.7.0-opencode2.1 -> 0.7.0-opencode2.2 suffix: its trailing counter moves
0.7.0-opencode2   -> 0.7.0-opencode2.1 no counter yet: start one

A version outside that grammar fails with the version named rather than producing a number nobody chose. The workflow now captures deno task bump-version as the tag, and CI runs deno test scripts/ so the rule stays covered.

The second commit aligns the two package.ts comments the reviewer flagged in #8 with the npm source (digest check only applies to GitHub releases; npm archives are verified by SRI before writing and stage the CLI under package/bin/), and refreshes upstream.yml's description of which upstream it watches. AGENTS.md records the new bump rule and the CI test step.

This PR is only the rule and its comments: it does not bump orax.toml, tag, release, or touch the marketplace.

main moved while this was under review (the platform model route in #10), so main is merged in as 5425fee rather than force-pushed. The merge keeps both sides: main's Test step (deno task test) stays and the scripts/ tests follow it, deno task check names both scripts/bump-version.ts and tests/model_route_test.ts, deno task test keeps main's version, and AGENTS.md keeps main's CI wording with only the archive-integrity step replaced by the scripts/ tests.

Refs ora-space/circus#422

ADR status: no ADR is involved. The change is how the nightly release computes this plugin's own version and how two packaging comments describe the existing two upstream sources; no runtime contract, host behavior, or model-access decision changes.

Evidence

  • deno task check, deno task lint, deno task test (20 tests) and deno test scripts/ (7 tests) pass on the head commit 5425fee.
  • deno task bump-version against the current manifest prints 0.7.0-opencode2.2 and rewrites only the version line (restored afterwards; the manifest is not part of this PR).
  • The workflow's YAML parses, and the changed run block passes bash -n.
  • deno fmt --check passes on the new script and test.
  • CI on the head commit: https://github.com/ora-space/opencode-agent/actions/runs/40082189403

Merge Danger

Door: two-way

Blast Radius: release workflow

The step still fails closed: an unrecognised version aborts before the commit or tag is made, and the existing tag-collision check is unchanged. Merging changes what the next nightly tag will be for a suffixed main; it cannot change a release that already exists, and no tag is created by this PR.

The nightly bump split the version with bash parameter expansion and
did `$((PATCH + 1))`, so a suffixed version like 0.7.0-opencode2.1 put
`0-opencode2.1` into the arithmetic and failed the whole run before any
tag was pushed.

Move the rule into scripts/bump-version.ts, which is tested: an
unsuffixed version bumps its patch number, a suffixed one bumps the
trailing counter of its suffix (0.7.0-opencode2.1 ->
0.7.0-opencode2.2), and a suffix without a counter starts at .1. A
version the rule cannot describe fails with that version named instead
of producing a number nobody chose. The workflow captures the script's
stdout as the tag and CI runs the script tests.

Also refresh this workflow's own description of what it watches: the
bundle config can name a pinned npm distribution, not only the latest
GitHub release.
package.ts still described the Releases API digest as the integrity
check for every archive and the CLI as the only entry at the archive
root. Both hold for the GitHub-release source only: npm archives are
verified against their SRI before they are written, and place the CLI
under package/bin/. Say which source each comment applies to.
Resolves the overlap with opencode-agent#10 without force push:

- ci.yml keeps main's `Test` step and replaces `Archive integrity tests`
  with the `scripts/` tests (version arithmetic and archive integrity).
- deno.json `check` names both scripts/bump-version.ts and
  tests/model_route_test.ts; `test` keeps main's version.
- AGENTS.md keeps main's CI wording and only replaces the archive integrity
  tests with the `scripts/` tests.
@EricWvi
EricWvi merged commit dd8fa3c into ora-space:main Oct 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants