Repository navigation
fix: token symbol source of truth, Node 22 pinning, render.yaml cleanup, db-restore safeguards (#1264 #1909 #1911 #1912) - #1924
Merged
K1NGD4VID merged 5 commits intoNov 20, 2026
Conversation
Extract resolveTokenSymbol/resolveTokenLabel into lib/tokens.ts, derived from TOKEN_ADDRESSES, and use it in dashboard.ts, api/streams.ts and the stream details page. The details page previously used a hardcoded map that ignored NEXT_PUBLIC_*_ADDRESS overrides and new tokens. Closes LabsCrypt#1264 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Add .nvmrc (22) and engines.node ^22.22.1 to root, backend and frontend - Enforce via engine-strict=true in .npmrc - All workflows read node-version-file: .nvmrc (security.yml was 20.19.0, deploy-docs.yml was 20) - Dockerfiles move from node:20-alpine to digest-pinned node:22-alpine - DEVELOPMENT.md and CONTRIBUTING.md document the same version Closes LabsCrypt#1911 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- env -> runtime, autoDeploy -> autoDeployTrigger: commit - Remove the invalid entrypoint field - Migrations run only in preDeployCommand; startCommand just starts - STREAM_CONTRACT_ID / ADMIN_PUBLIC_KEY use sync: false and the deploy aborts if they are unset or empty - NODE_VERSION 22 to match .nvmrc Closes LabsCrypt#1909 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Refuse to restore into a non-empty database (exit 3) unless --force - --dry-run validates the backup, inspects the target and prints the plan without making changes - --force requires typed confirmation (or --yes), writes an encrypted pre-restore snapshot in the regular backup format, then replaces all user schemas - Schema wipe, SQL restore and row-count verification run in a single transaction, so any failure rolls back and leaves the target unchanged - Validate the manifest before interpolating it into SQL - pg-service.mjs: stop quoting service-file values; libpq reads quotes literally (e.g. port "'5432'"), which broke every connection - Document the behaviour and failure/recovery states in DISASTER_RECOVERY.md Closes LabsCrypt#1912 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l build ../sdk/overview.md and ../development/testing.md do not exist, so docusaurus build aborted (failing on main since at least 2026-10-18). Point them at sdks/typescript.md and DEVELOPMENT.md#running-tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes four audit/DevOps issues in one PR, one commit per issue.
#1264: Single source of truth for token symbols
frontend/src/lib/tokens.tswithresolveTokenSymbol/resolveTokenLabel, derived fromTOKEN_ADDRESSESinlib/soroban.ts.lib/dashboard.ts,lib/api/streams.tsand the stream details page now import it. The details page's hardcodedTOKEN_SYMBOLSmap is gone (it also ignoredNEXT_PUBLIC_*_ADDRESSoverrides).TOKEN_ADDRESSESnow resolve on all three surfaces with one change. Addedtokens.test.ts.#1911: One Node version everywhere (22)
.nvmrc=22;engines.node=^22.22.1in the root,backendandfrontendpackage.json(and lockfile).^22.22.1rather than plain22:lint-stagedrequires>=22.22.1and@stellar/stellar-sdk>=22.12.0.engine-strict=truein.npmrc. Tested:npm installon Node 20 now fails with a clearEBADENGINEerror.node-version-file: '.nvmrc'(security.ymlwas20.19.0,deploy-docs.ymlwas20).node:20-alpine→ digest-pinnednode:22-alpine.render.yaml:NODE_VERSION: "22".docs/DEVELOPMENT.mdandCONTRIBUTING.mddocument the same version.#1909:
render.yamlcleanupenv: node→runtime: node;autoDeploy: true→autoDeployTrigger: commit; removed the invalidentrypoint.preDeployCommand.startCommandis now justnpm run start. A failed migration aborts the deploy instead of crash-looping the service. The deploy lifecycle is documented at the top of the file.STREAM_CONTRACT_IDandADMIN_PUBLIC_KEYusesync: false(Render prompts for them), andpreDeployCommandfails the deploy with a clear message if either is unset or empty.preDeployCommandrequires a paid Render instance type.#1912:
db-restore.shsafety safeguards3) unless--force.--dry-rundecrypts and validates the backup, inspects the target and prints the plan, without writing anything.--forcerequires typing the database name (or--yesfor automation), writes an encrypted pre-restore snapshot in the normal backup format (restorable with the same script), then replaces all user schemas.psql --single-transaction. Any failure rolls back, leaving the target unchanged.scripts/pg-service.mjs: it wrapped service-file values in quotes, which libpq does not strip (invalid integer value "'5432'" for connection option "port"). That broke every connection made bydb-restore.shanddb-backup.sh.docs/DISASTER_RECOVERY.mdnow documents the flags and gives a failure-state/recovery table that matches the script.dr-test.ymlcall (empty DB, no flags) keeps working unchanged.Testing
vitest runon Node 22 → 95 files, 1061 passed + 1 pre-existing skip, after updating the@/lib/sorobanmock instream-details-content.test.tsx.tsc --noEmitandeslinton the changed files are clean.render.yaml: parsed withyaml;preDeployCommandverified to abort when a required variable is empty and to proceed when both are set.db-restore.sh: 21/21 checks against a real PostgreSQL 16.10:--forcewithout a TTY and without--yesabortsCloses #1264
Closes #1909
Closes #1911
Closes #1912
🤖 Generated with Claude Code