Skip to content

docs(skill): first-publish bootstrap + preflight registry probe#53

Open
jadb wants to merge 6 commits into
mainfrom
docs/first-publish-bootstrap-docs
Open

docs(skill): first-publish bootstrap + preflight registry probe#53
jadb wants to merge 6 commits into
mainfrom
docs/first-publish-bootstrap-docs

Conversation

@jadb

@jadb jadb commented May 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • SKILL.md gains a "First publish of a new package" section explaining
    per-registry constraints: scoped npm/PyPI/crates.io tokens grant version
    updates but not name creation. Documents the local bootstrap path
    (npm login + pnpm publish --access public; uv build + uv run twine upload with an account-scoped token; cargo login with an
    unrestricted token) and the handoff to CI for subsequent versions.
  • SKILL.md gains a "Diagnosing first-publish failures" section
    covering two confusing symptoms: ERR_PNPM_OTP_NON_INTERACTIVE
    caused by npm 2FA in "Auth and writes" mode (misread as token
    issue because pnpm prints OIDC skipped: 404 first), and expired
    npm tokens returning HTTP 404 instead of 401/403 (misread as
    scope/permission issue).
  • scripts/bootstrap-first-publish.sh new helper with npm /
    pypi / cargo subcommands. Verifies local auth state, probes
    the registry for prior existence, builds, and publishes. Cross-
    referenced from the new SKILL.md section.
  • release-please-preflight.yml gains a new parallel job
    first-publish-risk that probes the npm / PyPI / crates.io /
    Packagist HEAD endpoints for each component in
    release-please-config.json. Emits ::warning:: annotations with
    the bootstrap command when a name is unclaimed, so adopters resolve
    it BEFORE merging the standing release-please PR. Annotation-only;
    the existing preflight job retains the fail-on policy.
  • publish-py.yml comment cross-links the SKILL.md PyPI subsection
    for adopters wiring up trusted publishing.

Test plan

  • bash -n scripts/bootstrap-first-publish.sh passes (verified locally).
  • shellcheck scripts/bootstrap-first-publish.sh passes (verified locally).
  • python3 -c "import yaml; yaml.safe_load(open('.github/workflows/release-please-preflight.yml'))" parses cleanly (verified locally).
  • actionlint .github/workflows/release-please-preflight.yml clean (verified locally).
  • CI workflow run: the new first-publish-risk job runs in parallel with preflight and produces a step summary.
  • Dry-run the helper against a known-published package — should refuse and exit non-zero before any network upload.

jadb added 6 commits May 28, 2026 13:11
new section covering npm/PyPI/crates.io first-publish constraints —
scoped tokens grant updates not creation. local bootstrap path per
registry. publish-py.yml comment cross-link.
ERR_PNPM_OTP_NON_INTERACTIVE root-caused to 'Auth and writes' 2FA
mode (CI cannot supply OTP). expired-token returns HTTP 404 not
401/403 — misreads as scope/permission issue.
local-run helper for first publish of new npm/PyPI/cargo packages.
verifies auth, probes registry for prior existence, dispatches the
right build + publish. handoff to publish-on-tag.yml after first
release lands.
new parallel job 'first-publish-risk'. probes npm/PyPI/crates.io/
Packagist for each component in release-please-config.json. emits
::warning:: with bootstrap command when name is unclaimed.
annotation-only — fail-on policy stays in preflight job.
…try-probe accuracy + dirty-tree guard

- preflight first-publish-risk: set -euo pipefail (fail-fast on real errors)
- preflight first-publish-risk: timeout-minutes 5 + curl --max-time 10 on 4 probes
- bootstrap cargo: gate "no published versions" message inside HTTP 200; explicit 404 + inconclusive branches
- bootstrap npm: drop --no-git-checks (restore dirty-tree guard)
- references/troubleshooting/ts.md: first-publish, ERR_PNPM_OTP_NON_INTERACTIVE,
  404-on-expired-token cross-links to SKILL.md.
- references/troubleshooting/py.md: first-publish PyPI cross-link (token scoping
  + OIDC pre-registration).
- references/troubleshooting/rs.md: first-publish crates.io cross-link
  (unrestricted-token rationale + local cargo publish).
- scripts/README.md: new — bootstrap-first-publish.sh subcommand table,
  dirty-tree note, pointer to SKILL.md companion section.
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