chore(release): prepare release/delivery + fix docker env passthrough

DEPLOY-01: docker-compose.yml passed only DATABASE_URL and PORT to the api
service, so JWT_SECRET, JWT_CUSTOMER_SECRET, OTP_MASTER_CODE and every SMS_TREZ_*
variable were silently dropped in Docker. A deployed build would have used the
development JWT fallback and would not have had the delivery master code at all,
so the demo login would have failed with no obvious cause. All are now forwarded,
defaulting to empty (which the code treats as unset); verified with
`docker compose config`.

TEST-01: test-sales-expert-roundtrip.cjs had localhost:3077 hardcoded and could
only connect by accident. Now defaults to the repo's API_PORT. 33/33.

DELIVERY.md documents env vars (names only), run/deploy commands, how migrations
run inside the container, the verification results and the known issues.

release/delivery contains both parity branches with no conflicts (fast-forward).
build 5/5, jest 45/45, admin smoke 43/43, apps smoke 43/43, B2B scan 34/34,
B2B writes 25/25, auth-smoke 32/32, typecheck clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
s.esmaeili
2026-09-23 00:30:09 +03:30
co-authored by Claude Opus 5
parent 6d0f5c5359
commit 53436ec855
210 changed files with 465 additions and 175 deletions
+40
View File
@@ -729,3 +729,43 @@ not product bugs, each corrected after checking the real caller:
**Data touched:** both scripts delete only what they create (one order with its
items/status events/ledger entries; one ledger entry). The write script also
asserts the customer's gold and rial balances end exactly as they started.
## 2026-09-23 — Delivery branch prepared (D19 step 4)
**`release/delivery`** created from `parity/phase-1-admin`, which already
contained every commit of `parity/security-hotfix` — so the merge was a
fast-forward and there were **no conflicts**. `main` untouched.
### DEPLOY-01 (fixed) — the compose file dropped every auth and SMS variable
`docker-compose.yml`'s `api` service passed only `DATABASE_URL` and `PORT`.
`JWT_SECRET`, `JWT_CUSTOMER_SECRET`, `OTP_MASTER_CODE` and all five `SMS_TREZ_*`
variables were **never forwarded into the container**, so in a deployed
environment the admin JWT would have fallen back to the well-known development
secret and the delivery master code would simply not have existed — the demo
login would have failed with no obvious cause. All of them are now passed
through, each defaulting to empty, which the code already treats as "unset"
(verified with `docker compose config`, with and without values set).
### TEST-01 (fixed) — a stale hardcoded port
`test-sales-expert-roundtrip.cjs` pointed at `localhost:3077`, a port from an
earlier dev session, so it failed with ECONNREFUSED. Now defaults to
`localhost:3000` (the repo's `API_PORT`) and takes an override argument.
Re-ran: **33/33**.
### `DELIVERY.md` written
Covers the env variables (names only, no values), dev/build/deploy commands, how
migrations run (the in-container runner and why `_goldbank_migrations` exists
alongside `_prisma_migrations`), the full verification table, and the known
issues — the four missing app pages, APP-02, PERS-01/02/03, PERF-01, and the
parity work Phase 1 has not reached. The two pre-release actions (remove
`OTP_MASTER_CODE`, configure SMS) are at the top of the file and logged as
REL-01/REL-02 in ISSUES.
### Verification on release/delivery — all green
build 5/5 · jest 45/45 · admin smoke 43/43 · apps smoke 43/43 ·
B2B scan 34 ok / 0 broken · B2B writes 25/25 · auth-smoke 32/32 ·
sales-expert 33/33 · name trigger 9/9 · typecheck clean on all four apps.