release
Use when cutting, debugging, or verifying a pythinker-code (TSC monorepo) release — changesets flow, the ci release-packages version PR, release.yml anatomy, npm Trusted Publishing OIDC, native assets, brew tap, CDN redeploy, and their failure modes. Invoked by /release.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 29
- Forks
- 9
01 前言 Front Matter
- name
- release
- description
- Use when cutting, debugging, or verifying a pythinker-code (TSC monorepo) release — changesets flow, the ci release-packages version PR, release.yml anatomy, npm Trusted Publishing OIDC, native assets, brew tap, CDN redeploy, and their failure modes. Invoked by /release.
03 SKILL.md 正文
pythinker-code (TSC) Release
Tracked repository skill. Companion to /release, which holds the step-by-step procedure; this file holds the
mechanics and failure modes.
Release model
- Changesets, not manual version edits. Contributor PRs add
.changeset/*.md. The changesets action creates or updates theci: release packagesPR. Merging that PR publishes the public npm package and creates@pymodel/pythinker-code@<version>. - npm publishing is CI-only. Trusted Publishing uses OIDC. Do not add
NPM_TOKEN; a token takes precedence over OIDC. Do not runchangeset publishlocally. - Private lanes use the push boundary.
publishedPackagesonly lists packages published to npm. Desktop and VS Code are private workspaces, sodetect-lane-bumps.mjscompares their versions atgithub.event.beforeandgithub.sha. - Desktop Stable and Beta are tag-driven. The required
cut-desktop-tagjob createsdesktop-v<version>, which startsdesktop-release.yml; prerelease versions publish to the explicit Beta feed. - Desktop Nightly is default-branch driven.
nightly.ymlcallsdesktop-release.ymlafter each scheduled main build and publishes a signed Nightly prerelease only when the main commit changed. - VS Code is isolated.
vscode-release.ymlsupportsworkflow_calland version-checked manual dispatch. Existing registry versions are skipped by the publisher scripts, so recovery is safe.
What publishes
@pymodel/pythinker-code is the public npm package. Desktop and VS Code package files are private;
their versions are release signals but changesets does not publish them to npm. When adding a
workspace, set its private and changesets policy explicitly and update flake.nix.
release.yml job map
| Job | Trigger | Notes |
|---|---|---|
Release |
every main push after CI + Nix | Detect lane versions, build, run changesets |
Cut desktop release tag |
desktop version changed | Required and idempotent; App token makes the tag trigger the desktop workflow |
Desktop Nightly |
scheduled main build | Reusable workflow; signed assets and the explicit Nightly update feed |
Publish VS Code extension |
extension version changed | Reusable workflow; six VSIX targets, both registries, provenance |
Native release artifact |
CLI was published | Six signed/tested zips, checksums, provenance |
Publish native release assets |
native builds passed | All-or-nothing immutable upload with manifest.json |
Redeploy CDN + verify |
native assets published | Webhook may retry; verification is the hard gate |
Update Homebrew tap |
native assets published | Renders Formula/pythinker-code.rb from the four native .tar.gz (macOS/Linux × arm64/x64), hashes downloaded bytes, pushes with an App token scoped to homebrew-tap contents, reads the formula back from the tap |
Verify Homebrew install |
tap updated | brew install + brew test from pymodel/tap on macOS and Linux; pythinker --version must equal the release. This is the Homebrew lane result in the summary |
Release lane summary |
always | One table with provenance state; fails when an expected enabled lane failed or skipped |
Set RELEASE_LANE_DESKTOP, RELEASE_LANE_VSCODE, RELEASE_LANE_CDN, or
RELEASE_LANE_BREW to exactly disabled for a conscious temporary opt-out. Missing credentials are
otherwise errors.
Failure modes and known lessons
- "cannot publish over previously published versions" / failed publish on a no-op push. This is
the exact bug
changeset-publish-idempotent.mjsfixes: under Trusted Publishing the action exports a placeholderNODE_AUTH_TOKEN, the registry rejects changesets' published-version read, and it republishes. The wrapper pre-checks the registry with a clean env (auth vars stripped) and exits 0 when every publishable version is already live. If this error still appears, suspect a genuinely half-published release — read the log; do not blind-rerun. - Version PR looks wrong. Never patch the
changeset-release/mainbranch by hand. Fix or add changesets onmain; the next workflow run regenerates the PR. - Beta or Nightly checks Stable. GitHub does not infer update channels. Confirm the release is a
prerelease and contains
beta*.ymlornightly*.yml; do not rename Stable manifests. - Native builder fails after npm publish succeeded. npm state is final. Re-run failed jobs from the same run before any assets upload. A complete asset set is an idempotent no-op. A partial set must not be filled from a rebuild; keep it or publish a new patch version.
- CDN not updated after publish.
verify-release-consistency.mjsgates the webhook: localapps/pythinker-code/package.jsonversion must equal the npmlatestdist-tag (plus sanebeta/devtags). A mismatch means the checkout in the job predates the release commit or npm propagation lag — checknpm view @pymodel/pythinker-code dist-tagsbefore touching anything. Dokploy deploy specifics: see memorycdn-dokploy-deploy-pipeline. - Homebrew lane red.
Update Homebrew tappolls each native tarball for 10 minutes, so a failure there means the release has no tarball for that target: checkPublish native release assetsfirst.Verify Homebrew installred with the bump green means the formula installs but the binary fails in a keg on that OS; reproduce withHOMEBREW_NO_AUTOREMOVE=1 brew install pymodel/tap/pythinker-code(plainbrew uninstallafterwards autoremoves orphaned dependencies). A native binary under a HomebrewCellar/reports install sourcehomebrewand never self-updates;brew upgrade pythinker-codeis its only update path. - Native update 404s.
verify-release-consistency.mjsHEADs every URL in the CDNlatest.jsonand every file the releasemanifest.jsonnames. A red gate lists the missing assets; the updater fetches exactly those URLs from the GitHub release (pythinkerCodeReleaseAssetUrl). The CDN has no/binaries/route — it answers unknown paths with the site HTML and HTTP 200. pnpm installfails in CI or locally.engine-strict=true+ Node>=24.15.0— check.nvmrcbefore debugging anything else.- Identity freeze / version rewind. Copying another product's
CHANGELOG.md,package.jsonversion, or VS Codepublisherontomainfails required CI (lintrunsscripts/check-identity-freeze.mjs) and Release (--npm). npmlatestdoes not move backwards, brew 404s the tarball, nativegh release viewmisses the tag, vsce says the extension name already exists, andverify-release-consistency.mjscompares local version to npmlatest. Do not mergeci: release packageswhile freeze fields disagree with npm or the Marketplace. Restore identity from the last published tag; do not hand-bump a lower version. - Pre-push hook (
scripts/pre-push.shvia simple-git-hooks) gates local pushes; a hook failure is a real gate failure — fix the cause, never--no-verify.
Recovery
| Symptom | Command | Safety |
|---|---|---|
| Desktop tag job failed | git tag desktop-v<VERSION> <RELEASE_SHA> && git push origin desktop-v<VERSION> |
Confirm the tag does not exist first; pushing it starts a public release workflow |
| VS Code lane partially failed | gh workflow run vscode-release.yml --ref <RELEASE_SHA> -f expected-version=<VERSION> |
Version is checked; both publishers skip versions already present |
| Native matrix failed before upload | gh run rerun <RUN_ID> --failed |
Reuses the same run and commit; do not mix a rebuilt partial asset set |
| CDN is stale | Re-run the failed Redeploy CDN or verification job |
Do not republish npm; nightly reconciliation remains red until aligned |
| Unknown lane drift | pnpm release:status |
Read-only; queries npm, GitHub Releases, CDN, Marketplace, and Open VSX |
Verification commands
gh run list --workflow=release.yml --branch=main -L 3 # workflow health
gh run list --workflow=nightly.yml --branch=main -L 3 # Nightly desktop health
gh pr list --search 'ci: release packages in:title' --state open
pnpm release:status # all live lanes
npm view @pymodel/pythinker-code dist-tags --json
node scripts/release/verify-release-consistency.mjs
gh release view "@pymodel/pythinker-code@<version>"
gh attestation verify <artifact> -R PyModel/pythinker-code
Hard rules (mirror tracked contracts)
- No
majorbump without explicit user approval (rootAGENTS.md). - No co-author trailers, no agent identity in commits/PRs; git author
elkaix <melkholy@techmatrix.com>. - PR titles follow Conventional Commits; fill
.github/pull_request_template.mdsubstantively. - Merging the version PR is the irreversible step — confirm with the user before merging.
04 同仓库更多 Skills
pythinker-webbridge
Pythinker Browser Extension lets AI control the user's real browser — navigate, click, type, read, screenshot, and interact with any website using the user's actual login sessions. Use this skill whenever the user wants to interact with websites, automate browser tasks, scrape web content, or perform any action requiring a real browser. Also use when the user mentions "browser", "webpage", "open URL", "screenshot", or asks to read/interact with any website. Use even for simple-sounding browser requests — the daemon handles all complexity.
golden-skill
Golden fixture skill
tools
暂无简介
review
Analyze the available skill set and recommend candidate groups that could be consolidated into sub-skill bundles. Read-only — proposes a plan, does not move files.
consolidate
Apply an approved sub-skill grouping by moving user-specified skills into a parent bundle, with timestamped backups of every modified directory.
sub-skill
Discover and reorganize the skill inventory into hierarchical sub-skill bundles. Use when the user asks to review, group, or consolidate skills into a parent bundle.