Actions: Release PR workflow #9
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.52) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #9"
general
weight: 0.35
edvilme
Motivation
Centralize extension version handling and release preparation across the Python extension repositories. One read-only action returns the current version or calculates a previous/next version; a separate release action uses that same calculation to prepare a stable release branch.
Combining the getter and calculator removes an extra public action, wrapper, and nested-action hop without changing version rules. Release mutation remains a separate responsibility. These actions prepare versions and branches, not publication: existing Azure pipelines and approvals still build and publish releases.
Two actions
| Action | Responsibility | Output |
| --- | --- | --- |
|
get-extension-version| Read or calculate a manifest-derived version without modifying the manifest. | Oneversion, selected bymode. ||
release-pr| Classify a release PR, validate it, and optionally write, commit, and create its stable release branch. | Developmentversionfor plan; stableversionfor release; empty for ordinary PRs. |Unified version action
| Input | Default | Allowed values / behavior |
| --- | --- | --- |
|
package-json-path|package.json| Readable manifest path, absolute or relative to the caller's workspace; spaces are supported. ||
mode|current|current,previous,next. ||
type| Required in every mode |pre-releaseorrelease. ||
strategy| Required in every mode |odd-even-minor. ||
pre-release-suffix| Empty | SemVer prerelease identifiers such asdevorrc.1, without a leading-or build metadata. |currentreturns the exact validated source version, including prerelease/build metadata. It requires validtypeandstrategyinputs but does not use them for calculation, and ignores the suffix. Reading imposes neither an odd/even minor policy nor Marketplace numeric bounds.For
previousandnext,odd-even-minorselects the nearest strictly lower/higher minor with the requested parity: odd forpre-release, even forrelease. Move by two when the source minor already matches that parity, otherwise by one. Preserve major, reset patch to zero, and discard source prerelease/build metadata.The supplied suffix applies only to calculated prerelease versions. Empty means no suffix; release versions are always suffix-free and ignore the suffix input.
Starting from
2026.9.7-dev+build:| Mode | Type | Suffix | Result |
| --- | --- | --- | --- |
|
current| Either valid type | Ignored |2026.9.7-dev+build||
next|pre-release|dev|2026.11.0-dev||
previous|pre-release|rc.1|2026.7.0-rc.1||
next|release| Empty |2026.10.0||
previous|release| Empty |2026.8.0|These are minor-selection rules, not SemVer patch increments. Missing files, invalid JSON/SemVer, unsupported options, invalid applicable suffixes, and calculated major/minor values outside
0..2147483647fail. There is no calendar rollover, negative minor, or borrowing from major.The version script uses
argparsewith named options, required inputs, allowed-value checks, and--help. YAML forwards inputs through quoted shell variables as CLI arguments rather than interpolating expressions into Bash source. Python does not read version configuration from environment variables;GITHUB_OUTPUTremains the standard output channel.All Python code uses the standard library. The version action performs no checkout, Git operations, manifest writes, or publication; callers provide the manifest.
Release PR design
release-praccepts requiredmode: plan | releaseand optionaltoken, defaulting togithub.token. Rootpackage.jsonis its only manifest.package.jsonis the sole changed file, export merge-base/head JSON snapshots and validate them. Only the top-level version may change; it must be a strictly greater SemVer with a positive odd minor. Formatting/key order are ignored, while nested values, array order, boolean/number distinctions, and exact numeric values are preserved.get-extension-versionon the validated source snapshot withmode: previous,type: release, andstrategy: odd-even-minor. Both modes derive the stable target, but plan returns the submitted development version. Larger valid development-version jumps remain accepted.release/<stable-version>.Classification is deliberately narrow: mixed-file PRs skip successfully even when they bump the version; single-manifest PRs with unchanged versions also skip. Sole-manifest additions, deletions, symlinks, and file-mode changes fail. Python Environments'
api/package.jsonretains its independent npm release flow.Git stays in short YAML commands; Python never invokes Git or GitHub APIs. Serialization uses four-space indentation and a final newline. An empty force-with-lease prevents overwriting an existing differing release ref. The target branch is never pushed, checked-out PR scripts are not executed, and commit hooks are disabled.
The internal
$/reference composesrelease-pr -> get-extension-versionat the same repository/ref as the outer action, including SHA-pinned consumers. This composition requires GitHub.com and runner 2.336.0 or newer; GitHub Enterprise Server is not supported for self-repository references.Usage
Read or calculate a version
Read
${{ steps.current.outputs.version }},${{ steps.next.outputs.version }}, or${{ steps.previous.outputs.version }}in later steps. Each invocation is independent; no separate getter step is needed for a calculation. Supplypackage-json-pathfor another manifest or temporary snapshot.Equivalent CLI usage:
Release workflow
Use the same reviewed SHA in both jobs.
release-prperforms checkout itself, so use dedicated jobs. Configure Release PR / Plan as a required check on the current revision and allow the bot to createrelease/.The closed
pull_request_targetevent supports write tokens for merged fork PRs using the trusted target-branch workflow. Do not add steps that execute checked-out PR code.Consumers' Azure pipelines must already trigger on
release/and enable publishing in the merged source. A default GitHub token normally suppresses subsequent GitHub Actions push workflows; Azure is a separate integration. Consumer rollout and pipeline configuration are outside this PR.Validation
All 15 focused tests pass locally at
2172390f474c95abea20907def2e0f292d0c4322: seven version-action tests and eight release-action tests. Coverage includes CLI defaults/custom paths, required inputs and allowed values, read-only outputs, both directions/parities, suffixes and numeric boundaries, version-only JSON changes, upgrade rules, ordinary PRs, lossless serialization, merged-source preservation, whole-change gating after a rebase, file-mode rejection, and no-overwrite pushes. Git fixtures execute the actual YAML commands against temporary local bare remotes.CI runs both suites on Linux, Windows, and macOS. It also includes a no-checkout smoke test for all three version modes and a read-only release-plan smoke test on this repository's PRs.
Remaining integration coverage: ordinary engineering PRs do not qualify as version-only release candidates, so the release-plan smoke does not exercise the full candidate path. A qualifying read-only consumer PR would verify that path and external SHA-pinned composition before rollout. Hosted CI results were not reverified as part of this description update.
No production release or Azure publication was triggered during local validation.
Documentation: get-extension-version and release-pr.