fix(vscode): create the Open VSX namespace before publishing - #39
Conversation
The 0.12.0 release put 0.8.6 on the Visual Studio Marketplace but left Open VSX with no version at all: all six targets failed because Open VSX rejects a publish into a namespace that does not exist, and the Marketplace has no such concept so nothing upstream catches it. The publish now creates the namespace first and treats an existing one as success, so a re-run is safe. The cause was invisible in the logs. runLocalCli captures the CLI's output, but the per-target summary kept only the first line — the 'Local ovsx exited with code 1:' wrapper — and dropped the registry error after it. Six identical failures reported no reason at all. The summary now carries the registry's own words.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe Open VSX publisher now creates the extension publisher namespace before publishing. Publish retries and per-target failures retain normalized registry error details. Tests cover namespace handling and error reporting. ChangesOpen VSX publishing
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant main
participant packageJson
participant OpenVSXCLI
participant publishTargets
main->>packageJson: Read publisher namespace
main->>OpenVSXCLI: Create namespace
OpenVSXCLI-->>main: Return namespace result
main->>publishTargets: Publish extension targets
publishTargets-->>main: Return normalized registry errors
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
commit: |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/vscode/scripts/publish-retry.mjs`:
- Around line 23-30: Update summaryLine so the result of its wrapper-only versus
joined-lines conditional is always capped at 400 characters, including
single-line errors. Preserve the existing line normalization and joining
behavior, and add a regression test covering a single-line message longer than
400 characters; apply the same cap to the related summary paths identified by
the matching logic.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e741d154-e003-4a02-afce-582b8c154eb2
📒 Files selected for processing (5)
.changeset/ovsx-namespace-and-publish-errors.mdapps/vscode/scripts/ovsx-publish.mjsapps/vscode/scripts/publish-retry.mjsapps/vscode/test/ovsx-namespace.test.tsapps/vscode/test/publish-retry.test.ts
.slice(0, 400) bound to the template literal rather than the conditional, so a single-line error came back uncapped — a registry answering with one long JSON line would print unbounded in both the retry warning and the target summary. Verified before the fix: a 500-character single-line error returned 500, while the multi-line path already capped at 400. The limit is now a named constant so the test asserts against it.
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## pythinker-code@0.8.7 ### Patch Changes - [#39](#39) [`acf57d1`](acf57d1) - Publish the VS Code extension to Open VSX by creating the publisher namespace first, so Cursor, VSCodium and Windsurf can install it, and report the registry's own error when a publish fails instead of only the CLI exit line. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Related Issue
No issue — found while verifying the 0.12.0 release. The extension reached the Visual Studio
Marketplace but never reached Open VSX, and the release job reported success anyway.
Problem
Publish VS Code extensionconcluded success in the 0.12.0 release, but Open VSX has noversion of the extension at all:
Two separate defects:
Open VSX rejects a publish into a namespace that does not exist.
pythoughtswas nevercreated there —
https://open-vsx.org/api/pythoughtsanswers{"error":"Namespace not found: pythoughts"}— so all six targets failed. The Marketplace has nonamespace concept, so a publisher that works there fails here and nothing upstream catches it.
The step is
continue-on-error: true, which is why the job still went green.The failure reported no cause.
runLocalClidoes capture the CLI output, but the per-targetsummary kept only the first line of the error — the
Local ovsx exited with code 1:wrapper —and dropped the registry's message that followed. The release log shows six of these:
What changed
ovsx-publish.mjscreates the namespace before publishing, taking the name from the extensionmanifest's
publisherrather than hardcoding it. An already-existing namespace is the successcase, so re-runs stay safe.
publish-retry.mjsgainssummaryLine, which keeps the registry's own words instead of the CLIwrapper line. Used by both the per-target summary and the retry warning.
Both changes are covered, and the summary fix was mutation-tested: reverting it reproduces the exact
production line
FAILED darwin-x64: Local ovsx exited with code 1:.Verification:
apps/vscodesuite 334 passed (18 files), both vscode tsconfigs typecheck clean,oxlint back to its baseline count for the touched file.
Note: this fixes the publish path. Getting 0.8.6 onto Open VSX still needs the publish to run again
with
OVSX_PAT— nothing is published there yet, so no target will be skipped.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.Summary by CodeRabbit
New Features
Bug Fixes
Tests