Skip to content

fix(vscode): create the Open VSX namespace before publishing - #39

Merged
elkaix merged 2 commits into
mainfrom
fix/ovsx-namespace-and-error-surfacing
Aug 7, 2026
Merged

fix(vscode): create the Open VSX namespace before publishing#39
elkaix merged 2 commits into
mainfrom
fix/ovsx-namespace-and-error-surfacing

Conversation

@elkaix

@elkaix elkaix commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

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 extension concluded success in the 0.12.0 release, but Open VSX has no
version of the extension at all:

$ curl https://open-vsx.org/api/pythoughts/pythinker-code
{"error":"Extension not found: pythoughts.pythinker-code"}

Two separate defects:

  1. Open VSX rejects a publish into a namespace that does not exist. pythoughts was never
    created there — https://open-vsx.org/api/pythoughts answers
    {"error":"Namespace not found: pythoughts"} — so all six targets failed. The Marketplace has no
    namespace 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.

  2. The failure reported no cause. runLocalCli does capture the CLI output, but the per-target
    summary 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:

    FAILED darwin-x64: Local ovsx exited with code 1:
    FAILED darwin-arm64: Local ovsx exited with code 1:
    ...
    Open VSX: 6 of 6 target(s) failed.
    

What changed

  • ovsx-publish.mjs creates the namespace before publishing, taking the name from the extension
    manifest's publisher rather than hardcoding it. An already-existing namespace is the success
    case, so re-runs stay safe.
  • publish-retry.mjs gains summaryLine, which keeps the registry's own words instead of the CLI
    wrapper 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/vscode suite 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

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

Summary by CodeRabbit

  • New Features

    • Open VSX publishing now automatically creates the required publisher namespace.
    • Publishing errors include clearer registry-provided details.
    • Existing namespaces are handled safely without interrupting publication.
  • Bug Fixes

    • Unauthorized and other unexpected publishing failures are now surfaced instead of being ignored.
    • Retry and failure messages now provide concise, informative error summaries.
  • Tests

    • Added coverage for namespace creation, existing namespaces, authorization failures, and detailed retry error reporting.

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.
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 71703f07-3941-4fb9-8e2e-e27f0963d34a

📥 Commits

Reviewing files that changed from the base of the PR and between 88222ec and 329128a.

📒 Files selected for processing (2)
  • apps/vscode/scripts/publish-retry.mjs
  • apps/vscode/test/publish-retry.test.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/vscode/test/publish-retry.test.ts
  • apps/vscode/scripts/publish-retry.mjs

📝 Walkthrough

Walkthrough

The 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.

Changes

Open VSX publishing

Layer / File(s) Summary
Namespace setup
apps/vscode/scripts/ovsx-publish.mjs, apps/vscode/test/ovsx-namespace.test.ts, .changeset/ovsx-namespace-and-publish-errors.md
The publisher reads publisher from package.json, creates the namespace before publishing, ignores existing-namespace errors, and rethrows other errors. Tests and the changeset document the behavior.
Publish error reporting
apps/vscode/scripts/publish-retry.mjs, apps/vscode/test/publish-retry.test.ts
summaryLine joins non-empty error lines and caps the result at 400 characters. Retry warnings and target failure records include the normalized registry error. Tests cover multiline, single-line, blank, and per-target errors.

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
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title uses the required fix prefix, imperative mood, and is 60 characters long.
Description check ✅ Passed The description includes all required sections, explains the problem and changes, documents verification, and completes the checklist.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Aug 7, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@pythoughts/pythinker-code@329128a
npx https://pkg.pr.new/@pythoughts/pythinker-code@329128a

commit: 329128a

@coderabbitai coderabbitai 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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 5fe0536 and 88222ec.

📒 Files selected for processing (5)
  • .changeset/ovsx-namespace-and-publish-errors.md
  • apps/vscode/scripts/ovsx-publish.mjs
  • apps/vscode/scripts/publish-retry.mjs
  • apps/vscode/test/ovsx-namespace.test.ts
  • apps/vscode/test/publish-retry.test.ts

Comment thread apps/vscode/scripts/publish-retry.mjs Outdated
.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.
@elkaix
elkaix merged commit acf57d1 into main Aug 7, 2026
12 checks passed
@elkaix
elkaix deleted the fix/ovsx-namespace-and-error-surfacing branch August 7, 2026 22:53
elkaix pushed a commit that referenced this pull request Aug 7, 2026
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>
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.

1 participant