assertProductionEnv() in orchestrator/src/config/env.ts fails-fast in NODE_ENV=production when SESSION_SECRET / EVENT_BUS_HMAC_SECRET / CHAIN_138_RPC_URL / NOTARY_REGISTRY_ADDRESS / ORCHESTRATOR_PRIVATE_KEY / DATABASE_URL is missing or uses a dev placeholder.
New EVENT_BUS_HMAC_SECRET env added to the schema.
.github/workflows/ci.yml rewritten: portal jobs target repo root (post-webapp/ gitlink removal), orchestrator type-check + test job added, contracts kept.
7 unit tests for assertProductionEnv; full suite 87/87 green, tsc --noEmit clean.
Why
The pre-existing notary/event-bus code silently degraded to the deterministic mock / dev placeholder when envs were absent. In prod that would turn the Ledger Anchor back into a lie (gap-analysis §8.1) and sign events with a known key (§8.4). This PR makes those failures loud at boot time.
The old ci.yml still pointed at the webapp/ gitlink that PR #4 removed; CI would fail on every PR. Rewritten to match the current monorepo layout.
First of a sequence closing all remaining gap-analysis items (PRs I–S).
Closes gap-analysis v2 §8.1 / §8.4 / §8.6 and §10.1 / §10.2 / §10.4.
## What
- `assertProductionEnv()` in `orchestrator/src/config/env.ts` fails-fast in `NODE_ENV=production` when `SESSION_SECRET` / `EVENT_BUS_HMAC_SECRET` / `CHAIN_138_RPC_URL` / `NOTARY_REGISTRY_ADDRESS` / `ORCHESTRATOR_PRIVATE_KEY` / `DATABASE_URL` is missing or uses a dev placeholder.
- New `EVENT_BUS_HMAC_SECRET` env added to the schema.
- `.github/workflows/ci.yml` rewritten: portal jobs target repo root (post-webapp/ gitlink removal), orchestrator type-check + test job added, contracts kept.
- 7 unit tests for `assertProductionEnv`; full suite 87/87 green, `tsc --noEmit` clean.
## Why
The pre-existing notary/event-bus code silently degraded to the deterministic mock / dev placeholder when envs were absent. In prod that would turn the Ledger Anchor back into a lie (gap-analysis §8.1) and sign events with a known key (§8.4). This PR makes those failures loud at boot time.
The old `ci.yml` still pointed at the `webapp/` gitlink that PR #4 removed; CI would fail on every PR. Rewritten to match the current monorepo layout.
First of a sequence closing all remaining gap-analysis items (PRs I–S).
Closes gap-analysis v2 §8.1 / §8.4 / §8.6 and §10.1 / §10.2.
- assertProductionEnv() in config/env.ts fails-fast in NODE_ENV=production
when SESSION_SECRET / EVENT_BUS_HMAC_SECRET / CHAIN_138_RPC_URL /
NOTARY_REGISTRY_ADDRESS / ORCHESTRATOR_PRIVATE_KEY / DATABASE_URL is
missing or uses the dev placeholder. Catches the silent-degrade-to-mock
failure mode that would turn the Ledger Anchor back into a lie.
- New EVENT_BUS_HMAC_SECRET env added to the schema.
- .github/workflows/ci.yml rewritten: portal jobs target repo root (not
the removed webapp/ gitlink), orchestrator type-check + test job
added, contracts jobs kept as-is.
- 7 unit tests for assertProductionEnv; full suite 87/87 green.
This pull request has changes conflicting with the target branch.
.github/workflows/ci.yml
orchestrator/src/config/env.ts
orchestrator/src/index.ts
This pull request is broken due to missing fork information.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes gap-analysis v2 §8.1 / §8.4 / §8.6 and §10.1 / §10.2 / §10.4.
What
assertProductionEnv()inorchestrator/src/config/env.tsfails-fast inNODE_ENV=productionwhenSESSION_SECRET/EVENT_BUS_HMAC_SECRET/CHAIN_138_RPC_URL/NOTARY_REGISTRY_ADDRESS/ORCHESTRATOR_PRIVATE_KEY/DATABASE_URLis missing or uses a dev placeholder.EVENT_BUS_HMAC_SECRETenv added to the schema..github/workflows/ci.ymlrewritten: portal jobs target repo root (post-webapp/ gitlink removal), orchestrator type-check + test job added, contracts kept.assertProductionEnv; full suite 87/87 green,tsc --noEmitclean.Why
The pre-existing notary/event-bus code silently degraded to the deterministic mock / dev placeholder when envs were absent. In prod that would turn the Ledger Anchor back into a lie (gap-analysis §8.1) and sign events with a known key (§8.4). This PR makes those failures loud at boot time.
The old
ci.ymlstill pointed at thewebapp/gitlink that PR #4 removed; CI would fail on every PR. Rewritten to match the current monorepo layout.First of a sequence closing all remaining gap-analysis items (PRs I–S).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.