Skip to content

feat: publish @stellar-registry/perch to npm + verified testnet deployment map - #76

Merged
willemneal merged 5 commits into
mainfrom
fm/perch-publish-p1
Sep 9, 2026
Merged

feat: publish @stellar-registry/perch to npm + verified testnet deployment map#76
willemneal merged 5 commits into
mainfrom
fm/perch-publish-p1

Conversation

@willemneal

Copy link
Copy Markdown
Contributor

What

Two deliverables making perch consumable as a real dependency for nido:

1. npm publishability of packages/perch-js (@stellar-registry/perch 0.1.1)

  • Removed private: true; added a real build: tsc -p tsconfig.build.json emits ESM + .d.ts to dist/, with main/types/exports/files pointing at dist and publishConfig.access: public.
  • prepare script builds on git installs (nido pins a git rev at this head until the npm release lands), prepack builds on publish. zod + @noble/hashes stay regular deps.
  • Added the npm README, LICENSE, and a seeded CHANGELOG; CI's node job now runs npm run build so a declaration-emit failure can never burn a release tag.
  • Smoke-tested: the npm pack tarball installs in a scratch ESM consumer and reproduces both golden vectors byte-for-byte (canonical JSON + doc_hash for ci-publish and ci-publish-delegated) plus a builder round-trip; types resolve under both bundler and nodenext resolution.

2. Release chain (mirrors the existing git-cliff/tag convention)

  • detect-releases also tags perch-js-v<version> when the manifest version was bumped in a merged PR; a new npm-publish job publishes that tagged commit with npm publish --provenance.
  • The release-pr job proposes future perch-js bumps + changelog via git-cliff (--tag-pattern perch-js-v.*, scoped to packages/perch-js/**), bumping through npm version so the lockfile stays in sync.
  • The publish execution awaits the NPM_TOKEN repo secret (an npm automation token with publish rights on @stellar-registry). On merge, this version tags perch-js-v0.1.1; if the secret is absent the npm-publish job fails and can simply be re-run after the secret lands — same tag, same sha.

3. Canonical testnet deployment — verified live (docs/testnet-deployment.md)

Read-only probes (the ones scripts/bootstrap-testnet.sh uses) confirm every bootstrap phase is live; nothing needs --execute: the unverified/perch, stateless, and constructorless registries, the ed25519 verifier, doc-compiler, interpreter (v0.1.0 name-salted; v0.1.2 published by CI on 2026-09-04, proving the whole CI publish chain), and the smart account with its applied policy doc (rules admin + ci-publish). Observations recorded: registry managers are still the human deployer key (phase-6 set_manager rotation never ran — hardening, not a consumption blocker), and the smart account is not name-resolvable as perch-account in the registry (use vars.PERCH_AUTHOR_ADDRESS).

Also syncs the stale Cargo.lock the perch-interpreter 0.1.2 release PR left behind.

Validation

Ran through the no-mistakes pipeline: the review step passed (its findings — CI build coverage, prepare script, dangling declaration maps, doc wording, dead workflow output — are fixed in the final commit), and the pipeline's test agent validated tarball install, runtime + type consumption, the git-install path, and live testnet reads. The pipeline could not complete end-to-end due to an internal test-analyzer tool bug (two identical failures unrelated to the change), so this PR is delivered directly per the captain's decision. actionlint + zizmor clean on the workflow; all 27 vitest tests and tsc --noEmit green.

Remove private:true, bump to 0.1.1, and ship a real build: tsc emits ESM +
.d.ts to dist/ (tsconfig.build.json), exports/types/files point at dist, and
prepack builds so the published tarball never contains raw src. zod and
@noble/hashes stay regular deps. Adds the npm README, LICENSE, and a seeded
CHANGELOG (regenerated by the release-pr job on the next bump).

Smoke-tested: npm pack output installs in a scratch ESM consumer and
reproduces the golden vectors (canonical JSON + doc_hash for both ci-publish
fixtures) plus a builder round-trip.
The 0.1.2 release PR bumped the manifest without regenerating the lockfile;
any cargo invocation rewrites it as a side effect.
Mirrors the contract convention for the TypeScript package: detect-releases
tags perch-js-v<version> when packages/perch-js's manifest version has no tag
yet, and a new npm-publish job then npm-publishes that tagged commit with
--provenance. The release-pr job proposes perch-js bumps + CHANGELOG from
conventional commits via git-cliff (tag-pattern perch-js-v*, scoped to
packages/perch-js), using npm version so package-lock stays in sync.

The publish step needs the NPM_TOKEN repo secret (not added here); until it
exists the npm-publish job fails and can simply be re-run after the secret
lands — same tag, same sha.
Read-only probes (the ones bootstrap-testnet.sh uses) confirm every bootstrap
phase is live: registries, verifier, compiler, interpreter, the smart account
with its applied policy doc, and a proven CI publish path (interpreter 0.1.2,
2026-09-04). Notes the un-rotated registry managers and the smart account's
registry-name gap as observations.
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-09 14:11 UTC

@willemneal
willemneal merged commit fde62e3 into main Sep 9, 2026
8 checks passed
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