From 8944350649de964921a4156a473fe7d8b991a4d4 Mon Sep 17 00:00:00 2001 From: UtkarshBhardwaj007 Date: Fri, 17 Apr 2026 17:48:36 +0100 Subject: [PATCH] chore: bump bulletin-deploy to 0.6.9 (stable) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upstream 0.6.9 ships two changes since our 0.6.9-rc.6 pin: * fix(dotns, #101) — Lite signers are now correctly rejected on NoStatus labels to match the on-chain PopRules contract. Closes a gap where the classifier would let a Lite user through only for register() to revert. * feat(dotns, #102) — new public `DotNS.preflight(label)` + internal wiring inside `deploy()` so any deploy destined to fail DotNS aborts BEFORE the Bulletin upload starts ("zero Bulletin bytes paid"). Also exports `simulateUserStatus` and `popStatusName` helpers. Our integration surface (`deploy()`, `DotNS.connect/classifyName/checkOwnership/ disconnect`) is untouched; this is drop-in for us. 147/147 tests pass, tsc clean, format clean. README + CLAUDE.md updated to reflect that we're on 0.6.9 stable (and the general "pin explicitly, don't trust `latest`" rule). Changeset is a patch. --- .changeset/bump-bulletin-deploy-0.6.9.md | 10 ++++++++++ CLAUDE.md | 2 +- README.md | 2 +- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 5 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 .changeset/bump-bulletin-deploy-0.6.9.md diff --git a/.changeset/bump-bulletin-deploy-0.6.9.md b/.changeset/bump-bulletin-deploy-0.6.9.md new file mode 100644 index 0000000..709a1df --- /dev/null +++ b/.changeset/bump-bulletin-deploy-0.6.9.md @@ -0,0 +1,10 @@ +--- +"playground-cli": patch +--- + +Bump `bulletin-deploy` from `0.6.9-rc.6` to `0.6.9` (stable). Upstream changes: + +- **fix(dotns)** — Lite signers are now correctly rejected on `NoStatus` labels, matching the on-chain `PopRules` contract (upstream #101). Previously the check was missing the requirement clause and could let a Lite user through the classifier, only to have the register tx revert later. +- **feat(dotns)** — bulletin-deploy now runs its own `DotNS.preflight(label)` before any Bulletin upload (upstream #102). Deploys that were going to fail DotNS registration (wrong label class, reserved base name, domain owned by someone else, unresolvable PoP gate) now abort with **zero Bulletin bytes paid**, saving users a failed multi-MB upload. A new public `DotNS.preflight()` view-only method and `simulateUserStatus()` / `popStatusName()` helpers are also exported. + +Our code surface (the `deploy()` entrypoint + `DotNS.connect` / `classifyName` / `checkOwnership` / `disconnect`) is unchanged, so the bump is drop-in. 147/147 tests pass. diff --git a/CLAUDE.md b/CLAUDE.md index c82e0aa..3c97264 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -18,7 +18,7 @@ These are things that aren't self-evident from reading the code and have bitten - **Signer mode selection lives in one file** (`src/utils/deploy/signerMode.ts`). The mainnet rewrite is a single-file swap; keep that boundary clean. - **`src/utils/deploy/*` and `src/utils/build/*` must not import React or Ink.** They form the SDK surface that RevX consumes from a WebContainer. TUI code lives in `src/commands/*/`. - **Bun compiled-binary stdin quirk** — Ink's `useInput` silently drops every keystroke (arrows, Enter, Ctrl+C) in `bun build --compile` binaries unless `process.stdin.on('readable', …)` is touched before Ink's `render()`. We install a no-op `readable` listener at the top of `src/index.ts` as a warm-up. Do NOT remove it until Bun's compiled-binary TTY stdin behaves like Node's. Symptom if this breaks: TUI renders but nothing responds, including Ctrl+C. -- **`bulletin-deploy` is pinned to an RC, not `latest`.** The `latest` npm dist-tag points at 0.6.8, which has a WebSocket heartbeat bug (default 40s < chunk timeout 60s) that tears down uploads mid-flight as `WS halt (3)`. The fix lives in 0.6.9-rc.x under the `rc` dist-tag. Keep us pinned to an explicit `0.6.9-rc.N` until 0.6.9 stable ships. Do NOT revert `bulletin-deploy` to `"latest"` in package.json — that silently downgrades us back to the broken version. +- **`bulletin-deploy` is pinned to an explicit version, not `latest`.** We're on `0.6.9` stable today. The `latest` npm dist-tag is a moving target and previously pointed at 0.6.8, which has a WebSocket heartbeat bug (default 40s < chunk timeout 60s) that tears down uploads mid-flight as `WS halt (3)`. Keep the pin explicit so we never silently slide onto a broken `latest`. When upgrading, read the release notes for any public-API changes to `deploy()`, `DotNS` methods, or the `DeployOptions` we rely on (`jsMerkle`, `signer`, `signerAddress`, `mnemonic`, `rpc`, `attributes`). - **Throttle TUI info updates** — bulletin-deploy logs per-chunk and builds (vite/next) stream thousands of lines/sec. Calling `setState` on every log event floods React's reconciler with so much backpressure the process can balloon past 20 GB and freeze the OS. `RunningStage` coalesces "latest info" updates to ≤10/sec via a ref + timer and caps line length at 160 chars. Any new hot-path event sink should do the same; don't hook raw per-line streams directly into Ink state. - **Process-guard safety net** (`src/utils/process-guard.ts`) — deploy pipelines open several long-lived WebSockets + child processes and any one of them can keep the event loop alive after the TUI visibly finishes, turning `dot` into a zombie that accumulates retry buffers indefinitely (seen climbing past 25 GB). We defend in depth: (1) `installSignalHandlers()` catches SIGINT/TERM/HUP + `unhandledRejection` and forces cleanup + exit within 3 s; (2) `scheduleHardExit()` installs an `unref`'d timer that kills the process if the event loop doesn't drain within a grace period; (3) `startMemoryWatchdog()` aborts if RSS exceeds 4 GB — a generous cap because legit deploys on Bun SEA binaries routinely touch 1–1.5 GB from runtime-metadata decoding + Bun's JSC heap + Ink yoga. Do NOT re-add a per-window growth detector: we tried 300 MB / 3 s and it false-positived on the single-burst metadata-loading spike, aborting deploys that would have succeeded. Set `DOT_MEMORY_TRACE=1` to stream per-sample RSS/heap/external stats — useful when diagnosing a real leak report. `BULLETIN_DEPLOY_TELEMETRY` is also forced to `"0"` at CLI entry — Sentry buffers breadcrumbs in-memory. Any new long-running command should register a cleanup hook via `onProcessShutdown()`. - **Parser MUST NOT emit an event per log line.** `DeployLogParser.feed()` is called for every console line bulletin-deploy prints — hundreds per deploy on the happy path, thousands if retries fire. We intentionally emit events ONLY for phase-banner matches and `[N/M]` chunk progress. Everything else returns `null`. Adding a catch-all `info` emit turns the parser into a firehose that allocates ~200 bytes × thousands of lines, and was a measurable contributor to chunk-upload memory pressure. diff --git a/README.md b/README.md index 8813d84..b7127e9 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ pnpm format:check # check only - `@polkadot-apps/*` are pinned to `latest` intentionally — they are our own packages and we want the lockfile to track head. - `@polkadot-api/sdk-ink` is pinned to `^0.6.2` and `polkadot-api` to `^1.23.3` because `chain-client` currently embeds an internal `PolkadotClient` shape that breaks with newer versions. Bump together with `chain-client` only. -- `bulletin-deploy` is pinned to an explicit `0.6.9-rc.N` — not `latest`. The `latest` npm dist-tag still points at 0.6.8, which has a WebSocket heartbeat bug (40s default < 60s chunk timeout) that tears down chunk uploads as `WS halt (3)`. Move to 0.6.9 once it ships stable; until then bump the RC pin (published under the `rc` npm dist-tag) to pick up further fixes. +- `bulletin-deploy` is pinned to an explicit version — not `latest`. Currently `0.6.9`. Previously `latest` pointed at 0.6.8 which had a WebSocket heartbeat bug (40s default < 60s chunk timeout) that tore chunk uploads down as `WS halt (3)`; keeping the pin explicit avoids ever sliding back onto that. When bumping, check the release notes for any changes to `deploy()` / `DotNS` APIs we rely on. ## Architecture Highlights diff --git a/package.json b/package.json index 7eb8192..abc5de2 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "@polkadot-apps/terminal": "latest", "@polkadot-apps/tx": "latest", "@polkadot-apps/utils": "latest", - "bulletin-deploy": "0.6.9-rc.6", + "bulletin-deploy": "0.6.9", "commander": "^12.0.0", "ink": "^5.2.1", "polkadot-api": "^1.23.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8ef9445..e1a005e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,8 +39,8 @@ importers: specifier: latest version: 0.4.0 bulletin-deploy: - specifier: 0.6.9-rc.6 - version: 0.6.9-rc.6(@polkadot-api/ink-contracts@0.6.1)(@polkadot/util@13.5.9)(postcss@8.5.10)(rxjs@7.8.2)(typescript@5.9.3) + specifier: 0.6.9 + version: 0.6.9(@polkadot-api/ink-contracts@0.6.1)(@polkadot/util@13.5.9)(postcss@8.5.10)(rxjs@7.8.2)(typescript@5.9.3) commander: specifier: ^12.0.0 version: 12.1.0 @@ -1602,8 +1602,8 @@ packages: buffer@6.0.3: resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} - bulletin-deploy@0.6.9-rc.6: - resolution: {integrity: sha512-oErhG1uMmdlqFR5Zt4NYJ7BIoscbVwri+u8w4wVWHe4rqgLSd6lXgZ9dwSRAXPcCVsYI88Wt2FB3r9OeVtEiag==} + bulletin-deploy@0.6.9: + resolution: {integrity: sha512-LspXpFy4q7wnKr8X7+wO6nRzMK0lyVz/8rjZ6QcTAbf8xyJa8qW6bpdXw4g70IXJGUV0HBnDHpTmpQvnUOQVuw==} engines: {node: '>=22'} hasBin: true @@ -5013,7 +5013,7 @@ snapshots: base64-js: 1.5.1 ieee754: 1.2.1 - bulletin-deploy@0.6.9-rc.6(@polkadot-api/ink-contracts@0.6.1)(@polkadot/util@13.5.9)(postcss@8.5.10)(rxjs@7.8.2)(typescript@5.9.3): + bulletin-deploy@0.6.9(@polkadot-api/ink-contracts@0.6.1)(@polkadot/util@13.5.9)(postcss@8.5.10)(rxjs@7.8.2)(typescript@5.9.3): dependencies: '@dotdm/cdm': 0.5.4(@polkadot-api/ink-contracts@0.6.1)(postcss@8.5.10)(rxjs@7.8.2)(typescript@5.9.3) '@ipld/car': 5.4.3