Skip to content

stagehand-python@4.2.0a0.dev1531

@shrey150 shrey150 tagged this 22 Sep 23:40
Browse currently shares the SDK release PR and publisher. This separates
it into a `Release browse@…` PR on `release/browse` and an independent
publishing job. The remaining packages retain the existing Stagehand
release group, including Python/Go releases and SDK alphas.

The coordinator uses Changesets' official release planner, changelog
writer, and publisher. It selects changesets by group and temporarily
excludes other public packages from publishing. It also prevents pending
Browse notes from blocking SDK publication. Already published Browse
versions skip rebuilding, so an SDK version bump does not unnecessarily
block the CLI job.

A feature PR can change both Browse and SDK code. It needs **two
changeset files**, because merging either release PR must leave the
other group's notes available. The mixed-file rejection protects that
ownership boundary; most new tests exercise successful independent
releases.

Git, pnpm, and GitHub CLI operations use argument arrays without a
shell. GitHub PR creation/update is custom coordination; version
calculation and changelog generation remain Changesets' responsibility.

## E2E Test Matrix

| Command / flow | Observed output | Confidence / sufficiency |
| --- | --- | --- |
| `pnpm exec vitest run scripts/release` | **67 passing tests** | Both
release orders, retained notes/manifests, SDK-only snapshots,
mixed/pre-mode rejection, restoration after publish success/failure,
registry failures, Python/Go gates |
| `pnpm --filter browse test:cli` | **395 passing tests** | Existing CLI
suite passes |
| `pnpm exec turbo run build --filter=browse` | **4 successful build
tasks** | Protocol, extension, SDK, and CLI build together |
| Real pending changesets: `version cli` | **Browse 0.10.0; SDK stays
4.1.0; exactly 3 changed files** | Actual Changesets engine and
authenticated GitHub changelog generation; SDK notes retained |
| Real pending changesets: `version sdk`, consolidation, Python sync,
`uv lock` | **SDK 4.2.0; Browse stays 0.9.6** | CLI note and manifest
preserved |
| `prepare-cli-release.ts`, twice against a local bare Git remote |
**Create/update both produce a 3-file Browse release** | Actual
versioning, commits, branch creation, and force-with-lease push. GitHub
PR API calls were intercepted; live release-PR automation remains
unproven |
| Actual `publish cli` using pnpm 11.10 and an isolated registry |
**browse@0.10.0 published; SDK endpoint remains 404** | Real tarball
upload and Git tag; does not exercise production OIDC |
| Actual `publish sdk` using a second isolated registry | **SDK 4.2.0
published; Browse endpoint remains 404** | Proves SDK publisher excludes
Browse despite pending CLI notes |
| Repeat both publish commands | **No unpublished projects to publish**
| No duplicate upload; manifests restored after publishing |
| SDK snapshot build and `publish sdk --alpha` | **4.2.0-alpha-<sha>
published; latest stays 4.2.0; Browse absent** | Real alpha publication
and dist-tag isolation |
| Install the published Browse tarball outside the workspace |
**browse/0.10.0 with SDK 4.1.0 from public npm** | Tests the
distributable against a released SDK, not a workspace link |
| Installed tarball: local Chrome and Browserbase,
open/eval/snapshot/stop | **Both return “Example Domain”, expose its
heading, and stop successfully** | Real browser runtime smoke on
example.com; local container required Chrome's no-sandbox flag |
| GitHub CI on final review fixes (`0acad1acc`) | **51 successful
checks, 6 skipped, no failures or pending checks** | Full repository CI,
including TypeScript/Python/Go and browser/integration checks; Cubic
completed without new findings |
| Review fix: registry dependency wait | **404 followed by 200 succeeds;
timeout/503 fail; stalled request aborts** | Real HTTP-server tests,
including a server that accepts a connection but never responds; only
CLI publication waits for its dependency |
| Review fix: partial publication and tag recovery | **5 tests pass
against real Git checkouts/bare remotes and HTTP** | Covers missing
upload, accepted upload without tag, remote-tag retry, original local
tag, and refusal to tag a later/wrong-version commit |
| Review fix: standalone smoke after deleting CLI dist/manifest |
**Build, pack, isolated install, version/help/open-help pass** | Proves
the script rebuilds its own artifacts |
| Frozen pnpm 11.10 install, tooling typecheck/lint/format, actionlint |
**Pass** | Lockfile and workflow syntax validated |
| Inspect current npm provenance for Browse 0.9.6 and SDK 4.1.0 | **Both
identify `.github/workflows/release.yml` on main** | New CLI job
preserves the existing workflow identity; this does not prove the next
OIDC exchange |

The isolated registry tests explicitly set package publish registries to
loopback addresses in disposable checkouts. Those overrides are absent
from this PR. No public npm publication or merge was performed.

## Rollout and remaining uncertainty

Merge this infrastructure before either pending release PR. Let the next
Release run regenerate the existing combined Stagehand PR without Browse
and create the Browse-only PR; inspect both diffs before merging either.

Browse retains `workspace:*` for the SDK. Packing resolves that to the
workspace SDK's exact version, which must be published before Browse.
The CLI publication path waits up to 15 minutes for a concurrent SDK
upload, without depending on unrelated SDK jobs. A CLI change requiring
unreleased SDK functionality still needs an SDK release first. The
clean-install smoke checks entry points; the manual browser smoke is
broader, but neither proves every CLI command.

My current estimate is **90% confidence in the first production release
succeeding**, with higher confidence in the version/publish isolation
itself. Production npm OIDC and the GitHub Actions release-PR lifecycle
remain the main unexercised paths. Tag recovery runs after partial
publish failures; if both the remote and local tag are missing, retry
the original version-bump workflow so recovery never labels a later main
commit as the release. Full GitHub CI and Cubic review passed on the
latest commit (`0acad1acc`). All 15 review threads have replies. The
updated local release suite, smoke script, typecheck, lint, format, and
actionlint passed.
Assets 2
Loading