Skip to content

refactor(release): capability-based descriptors for stable orchestrator - #3201

Merged
caio-pizzol merged 1 commit into
mainfrom
release-orchestrator-pr1-descriptors
May 7, 2026
Merged

refactor(release): capability-based descriptors for stable orchestrator#3201
caio-pizzol merged 1 commit into
mainfrom
release-orchestrator-pr1-descriptors

Conversation

@caio-pizzol

Copy link
Copy Markdown
Contributor

First step toward extending the stable release orchestrator to cover superdoc, react, and vscode-ext (the per-package stable workflows that currently get evicted from the shared concurrency group when more than two stable workflows fire on the same push).

Pure refactor. The recovery engine in `release-local-stable.mjs` becomes generic so adding new packages in follow-ups will only need a descriptor entry plus an adapter function, not new switch arms or name-coded branches.

  • extracts `resumePackagePublish` switch into per-descriptor `resumePublish` functions (`resumeCliPublish`, `resumeSdkPublish`, `resumeMcpPublish`)
  • replaces `pkg.name === 'sdk'` checks with capability checks (`pkg.pythonPackages`, `pkg.preparePythonSnapshot`)
  • internal state field `sdkPythonPublished` → `pythonPublished`; recovery's returned `sdkPythonSnapshot` → `pythonSnapshot`
  • `recordSdkPythonSnapshot` and `recordSdkReleaseOutputs` keep their names because they emit specific `sdk_python_snapshot_` and `sdk_release_` GITHUB_OUTPUT keys consumed by `release-stable.yml`

Must stay the same: SDK output contract (`sdk_python_snapshot_`, `sdk_release_`) and the Python snapshot handoff routed through `recordSdkPythonSnapshot`. CLI/SDK/MCP resume behavior should remain equivalent — same shell commands, same args, same order.

Verified: `node --test scripts/tests/release-local.test.mjs` → 23 pass, 2 fail (the two failures are pre-existing on `main` and unrelated to this change).

Extract resumePackagePublish switch into per-descriptor resumePublish
functions and replace pkg.name === 'sdk' branches with capability checks
(pkg.pythonPackages, pkg.preparePythonSnapshot). No behavior change:
the recovery engine becomes generic so adding superdoc/react/vscode-ext
in follow-up PRs only adds adapters, not new switch arms.

The internal field state.sdkPythonPublished is renamed to
state.pythonPublished and recovery's returned snapshot field
sdkPythonSnapshot to pythonSnapshot. recordSdkPythonSnapshot keeps its
name so it continues emitting the sdk_python_snapshot_* GITHUB_OUTPUT
keys consumed by release-stable.yml.

Existing helper tests updated to match the refactored structure (the
intent - each package has its own explicit resume path - is preserved).
@caio-pizzol
caio-pizzol requested a review from a team as a code owner May 7, 2026 21:16
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@caio-pizzol
caio-pizzol merged commit 8150e10 into main May 7, 2026
17 checks passed
@caio-pizzol
caio-pizzol deleted the release-orchestrator-pr1-descriptors branch May 7, 2026 21:41
caio-pizzol added a commit that referenced this pull request May 7, 2026
…stop)

Adds superdoc to the stable orchestrator so the v* tag drives docs-stable
promotion in the same workflow that releases tools, removing the cross-
workflow concurrency-eviction problem for stable superdoc releases.

The orchestrator now groups packages by chain. Within a chain, fail-stop
applies as before (CLI failure skips SDK/MCP). Across chains, failures
are independent: a tools failure does not skip superdoc and vice versa.

Workflow rewiring:
- release-superdoc.yml stops auto-firing on stable; main pushes still
  publish prereleases, and workflow_dispatch is preserved for recovery.
- promote-stable-docs.yml triggers off release-stable.yml. The conclusion
  gate now accepts both success and failure - a tools-chain failure that
  follows a successful superdoc release should still promote docs. The
  inner git-tag detection (compare tags merged at the run's head_sha vs
  origin/stable) remains the source of truth, so tools-only runs still
  leave docs-stable alone.
- release-stable.yml header comments + step name updated to reflect the
  broader scope; the workflow's name field is unchanged so the existing
  workflow_run trigger and concurrency group continue to match. A rename
  is best as a follow-up cleanup PR.

Stacked on #3201 (descriptor refactor).
caio-pizzol added a commit that referenced this pull request May 7, 2026
…stop)

Adds superdoc to the stable orchestrator so the v* tag drives docs-stable
promotion in the same workflow that releases tools, removing the cross-
workflow concurrency-eviction problem for stable superdoc releases.

The orchestrator now groups packages by chain. Within a chain, fail-stop
applies as before (CLI failure skips SDK/MCP). Across chains, failures
are independent: a tools failure does not skip superdoc and vice versa.

Workflow rewiring:
- release-superdoc.yml stops auto-firing on stable; main pushes still
  publish prereleases, and workflow_dispatch is preserved for recovery.
- promote-stable-docs.yml triggers off release-stable.yml. The conclusion
  gate now accepts both success and failure - a tools-chain failure that
  follows a successful superdoc release should still promote docs. The
  inner git-tag detection (compare tags merged at the run's head_sha vs
  origin/stable) remains the source of truth, so tools-only runs still
  leave docs-stable alone.
- release-stable.yml header comments + step name updated to reflect the
  broader scope; the workflow's name field is unchanged so the existing
  workflow_run trigger and concurrency group continue to match. A rename
  is best as a follow-up cleanup PR.

Stacked on #3201 (descriptor refactor).
caio-pizzol added a commit that referenced this pull request May 7, 2026
…stop)

Adds superdoc to the stable orchestrator so the v* tag drives docs-stable
promotion in the same workflow that releases tools, removing the cross-
workflow concurrency-eviction problem for stable superdoc releases.

The orchestrator now groups packages by chain. Within a chain, fail-stop
applies as before (CLI failure skips SDK/MCP). Across chains, failures
are independent: a tools failure does not skip superdoc and vice versa.

Workflow rewiring:
- release-superdoc.yml stops auto-firing on stable; main pushes still
  publish prereleases, and workflow_dispatch is preserved for recovery.
- promote-stable-docs.yml triggers off release-stable.yml. The conclusion
  gate now accepts both success and failure - a tools-chain failure that
  follows a successful superdoc release should still promote docs. The
  inner git-tag detection (compare tags merged at the run's head_sha vs
  origin/stable) remains the source of truth, so tools-only runs still
  leave docs-stable alone.
- release-stable.yml header comments + step name updated to reflect the
  broader scope; the workflow's name field is unchanged so the existing
  workflow_run trigger and concurrency group continue to match. A rename
  is best as a follow-up cleanup PR.

Stacked on #3201 (descriptor refactor).
caio-pizzol added a commit that referenced this pull request May 11, 2026
…stop) (#3204)

Adds superdoc to the stable orchestrator so the v* tag drives docs-stable
promotion in the same workflow that releases tools, removing the cross-
workflow concurrency-eviction problem for stable superdoc releases.

The orchestrator now groups packages by chain. Within a chain, fail-stop
applies as before (CLI failure skips SDK/MCP). Across chains, failures
are independent: a tools failure does not skip superdoc and vice versa.

Workflow rewiring:
- release-superdoc.yml stops auto-firing on stable; main pushes still
  publish prereleases, and workflow_dispatch is preserved for recovery.
- promote-stable-docs.yml triggers off release-stable.yml. The conclusion
  gate now accepts both success and failure - a tools-chain failure that
  follows a successful superdoc release should still promote docs. The
  inner git-tag detection (compare tags merged at the run's head_sha vs
  origin/stable) remains the source of truth, so tools-only runs still
  leave docs-stable alone.
- release-stable.yml header comments + step name updated to reflect the
  broader scope; the workflow's name field is unchanged so the existing
  workflow_run trigger and concurrency group continue to match. A rename
  is best as a follow-up cleanup PR.

Stacked on #3201 (descriptor refactor).
caio-pizzol added a commit that referenced this pull request May 11, 2026
Completes the core chain: superdoc -> react -> vscode-ext. vscode-ext
publishes to the VS Code Marketplace (not npm) and ships a .vsix asset
on the GitHub release; the script's existing helpers already cover both,
so this PR adds the descriptor, the resume adapter, and the workflow
plumbing.

- `resumeVscodeExtPublish` runs `pnpm run package` then `vsce publish
  --skip-duplicate`; idempotent against the marketplace. In a tagged
  snapshot it also runs `build:superdoc` first so esbuild can resolve
  the webview's `superdoc` and `superdoc/style.css` imports through
  packages/superdoc/dist (snapshot only ran `pnpm install`).
- vscode-ext descriptor uses `vsCodeExtensionId` (no `npmPackages`), so
  `inspectPackageReleaseState` probes the marketplace, not npm.
- release-stable.yml's orchestrator step gains `VSCE_PAT` env so vsce can
  authenticate.
- release-vscode-ext.yml stops auto-firing on stable; main pushes still
  build .vsix attachments to the GitHub release.
- Three remaining `pkg.name === 'vscode-ext'` branches in the script
  (`getExpectedReleaseAssets`, `isGitHubReleaseComplete`, `ensureGitHubRelease`)
  switched to `pkg.vsCodeExtensionId` capability checks for consistency
  with PR #3201's refactor pattern.
caio-pizzol added a commit that referenced this pull request May 11, 2026
Completes the core chain: superdoc -> react -> vscode-ext. vscode-ext
publishes to the VS Code Marketplace (not npm) and ships a .vsix asset
on the GitHub release; the script's existing helpers already cover both,
so this PR adds the descriptor, the resume adapter, and the workflow
plumbing.

- `resumeVscodeExtPublish` runs `pnpm run package` then `vsce publish
  --skip-duplicate`; idempotent against the marketplace. In a tagged
  snapshot it also runs `build:superdoc` first so esbuild can resolve
  the webview's `superdoc` and `superdoc/style.css` imports through
  packages/superdoc/dist (snapshot only ran `pnpm install`).
- vscode-ext descriptor uses `vsCodeExtensionId` (no `npmPackages`), so
  `inspectPackageReleaseState` probes the marketplace, not npm.
- release-stable.yml's orchestrator step gains `VSCE_PAT` env so vsce can
  authenticate.
- release-vscode-ext.yml stops auto-firing on stable; main pushes still
  build .vsix attachments to the GitHub release.
- Three remaining `pkg.name === 'vscode-ext'` branches in the script
  (`getExpectedReleaseAssets`, `isGitHubReleaseComplete`, `ensureGitHubRelease`)
  switched to `pkg.vsCodeExtensionId` capability checks for consistency
  with PR #3201's refactor pattern.
caio-pizzol added a commit that referenced this pull request May 11, 2026
Completes the core chain: superdoc -> react -> vscode-ext. vscode-ext
publishes to the VS Code Marketplace (not npm) and ships a .vsix asset
on the GitHub release; the script's existing helpers already cover both,
so this PR adds the descriptor, the resume adapter, and the workflow
plumbing.

- `resumeVscodeExtPublish` runs `pnpm run package` then `vsce publish
  --skip-duplicate`; idempotent against the marketplace. In a tagged
  snapshot it also runs `build:superdoc` first so esbuild can resolve
  the webview's `superdoc` and `superdoc/style.css` imports through
  packages/superdoc/dist (snapshot only ran `pnpm install`).
- vscode-ext descriptor uses `vsCodeExtensionId` (no `npmPackages`), so
  `inspectPackageReleaseState` probes the marketplace, not npm.
- release-stable.yml's orchestrator step gains `VSCE_PAT` env so vsce can
  authenticate.
- release-vscode-ext.yml stops auto-firing on stable; main pushes still
  build .vsix attachments to the GitHub release.
- Three remaining `pkg.name === 'vscode-ext'` branches in the script
  (`getExpectedReleaseAssets`, `isGitHubReleaseComplete`, `ensureGitHubRelease`)
  switched to `pkg.vsCodeExtensionId` capability checks for consistency
  with PR #3201's refactor pattern.
msviderok pushed a commit to msviderok/superdoc that referenced this pull request May 16, 2026
…or (superdoc-dev#3201)

Extract resumePackagePublish switch into per-descriptor resumePublish
functions and replace pkg.name === 'sdk' branches with capability checks
(pkg.pythonPackages, pkg.preparePythonSnapshot). No behavior change:
the recovery engine becomes generic so adding superdoc/react/vscode-ext
in follow-up PRs only adds adapters, not new switch arms.

The internal field state.sdkPythonPublished is renamed to
state.pythonPublished and recovery's returned snapshot field
sdkPythonSnapshot to pythonSnapshot. recordSdkPythonSnapshot keeps its
name so it continues emitting the sdk_python_snapshot_* GITHUB_OUTPUT
keys consumed by release-stable.yml.

Existing helper tests updated to match the refactored structure (the
intent - each package has its own explicit resume path - is preserved).
msviderok pushed a commit to msviderok/superdoc that referenced this pull request May 16, 2026
…stop) (superdoc-dev#3204)

Adds superdoc to the stable orchestrator so the v* tag drives docs-stable
promotion in the same workflow that releases tools, removing the cross-
workflow concurrency-eviction problem for stable superdoc releases.

The orchestrator now groups packages by chain. Within a chain, fail-stop
applies as before (CLI failure skips SDK/MCP). Across chains, failures
are independent: a tools failure does not skip superdoc and vice versa.

Workflow rewiring:
- release-superdoc.yml stops auto-firing on stable; main pushes still
  publish prereleases, and workflow_dispatch is preserved for recovery.
- promote-stable-docs.yml triggers off release-stable.yml. The conclusion
  gate now accepts both success and failure - a tools-chain failure that
  follows a successful superdoc release should still promote docs. The
  inner git-tag detection (compare tags merged at the run's head_sha vs
  origin/stable) remains the source of truth, so tools-only runs still
  leave docs-stable alone.
- release-stable.yml header comments + step name updated to reflect the
  broader scope; the workflow's name field is unchanged so the existing
  workflow_run trigger and concurrency group continue to match. A rename
  is best as a follow-up cleanup PR.

Stacked on superdoc-dev#3201 (descriptor refactor).
msviderok pushed a commit to msviderok/superdoc that referenced this pull request May 16, 2026
Completes the core chain: superdoc -> react -> vscode-ext. vscode-ext
publishes to the VS Code Marketplace (not npm) and ships a .vsix asset
on the GitHub release; the script's existing helpers already cover both,
so this PR adds the descriptor, the resume adapter, and the workflow
plumbing.

- `resumeVscodeExtPublish` runs `pnpm run package` then `vsce publish
  --skip-duplicate`; idempotent against the marketplace. In a tagged
  snapshot it also runs `build:superdoc` first so esbuild can resolve
  the webview's `superdoc` and `superdoc/style.css` imports through
  packages/superdoc/dist (snapshot only ran `pnpm install`).
- vscode-ext descriptor uses `vsCodeExtensionId` (no `npmPackages`), so
  `inspectPackageReleaseState` probes the marketplace, not npm.
- release-stable.yml's orchestrator step gains `VSCE_PAT` env so vsce can
  authenticate.
- release-vscode-ext.yml stops auto-firing on stable; main pushes still
  build .vsix attachments to the GitHub release.
- Three remaining `pkg.name === 'vscode-ext'` branches in the script
  (`getExpectedReleaseAssets`, `isGitHubReleaseComplete`, `ensureGitHubRelease`)
  switched to `pkg.vsCodeExtensionId` capability checks for consistency
  with PR superdoc-dev#3201's refactor pattern.
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