This README is the canonical maintainer runbook for Mesher's current PostgreSQL + runtime contract inside the product-only Hyperpush repo.
Mesher validates configuration locally, opens the PostgreSQL pool, and only then boots the runtime through Node.start_from_env().
DATABASE_URL— PostgreSQL connection string
PORT— HTTP port (8080by default)MESHER_WS_PORT— WebSocket port (8081by default)MESHER_RATE_LIMIT_WINDOW_SECONDS— rate-limit window size (60by default)MESHER_RATE_LIMIT_MAX_EVENTS— rate-limit budget per window (1000by default)
These stay on the runtime-owned contract that Node.start_from_env() expects:
MESH_CLUSTER_COOKIEMESH_NODE_NAMEMESH_DISCOVERY_SEEDMESH_CLUSTER_PORTMESH_CONTINUITY_ROLEMESH_CONTINUITY_PROMOTION_EPOCH
mesher/.env.example carries the current local-development values for that full set.
Mesher scripts need meshc.
Supported resolution paths:
- blessed sibling
mesh-lang/target/debug/meshc - explicit
MESHER_MESHC_BIN+MESHER_MESHC_SOURCE meshconPATH
If you are working in the blessed sibling workspace, keep:
<workspace>/
mesh-lang/
hyperpush-mono/
mesher/migrations/20260226000000_seed_default_org.mpl inserts the local smoke data this runbook proves:
- organization slug:
default - project slug:
default - dev API key label:
dev-default - dev API key:
mshr_devdefaultapikey000000000000000000000000000
From the product repo root:
cp mesher/.env.example .env.mesher
# Update DATABASE_URL for your local Postgres, then load it.
set -a && source .env.mesher && set +anpm --prefix mesher cibash mesher/scripts/test.shDATABASE_URL=${DATABASE_URL:?set DATABASE_URL} bash mesher/scripts/migrate.sh statusDATABASE_URL=${DATABASE_URL:?set DATABASE_URL} bash mesher/scripts/migrate.sh upnpm --prefix mesher run devThat command uses concurrently to:
- start the TanStack client on
http://127.0.0.1:3000 - compile Mesher into
hyperpush-mono/.tmp/mesher-dev/build/mesher - run the compiled backend on
http://127.0.0.1:18180with WebSockets on18181
The default 18180 backend port matches the client proxy contract, so /api/v1 works without an extra MESHER_BACKEND_ORIGIN override during local development.
bash mesher/scripts/build.sh .tmp/mesher-buildThat build writes the runnable binary to .tmp/mesher-build/mesher.
DATABASE_URL=${DATABASE_URL:?set DATABASE_URL} \
PORT=${PORT:-8080} \
MESHER_WS_PORT=${MESHER_WS_PORT:-8081} \
MESHER_RATE_LIMIT_WINDOW_SECONDS=${MESHER_RATE_LIMIT_WINDOW_SECONDS:-60} \
MESHER_RATE_LIMIT_MAX_EVENTS=${MESHER_RATE_LIMIT_MAX_EVENTS:-1000} \
MESH_CLUSTER_COOKIE=${MESH_CLUSTER_COOKIE:-dev-cookie} \
MESH_NODE_NAME=${MESH_NODE_NAME:-mesher@127.0.0.1:4370} \
MESH_DISCOVERY_SEED=${MESH_DISCOVERY_SEED:-localhost} \
MESH_CLUSTER_PORT=${MESH_CLUSTER_PORT:-4370} \
MESH_CONTINUITY_ROLE=${MESH_CONTINUITY_ROLE:-primary} \
MESH_CONTINUITY_PROMOTION_EPOCH=${MESH_CONTINUITY_PROMOTION_EPOCH:-0} \
.tmp/mesher-build/meshercurl -sSf http://127.0.0.1:8080/api/v1/projects/default/settingscurl -sSf \
-X POST \
http://127.0.0.1:8080/api/v1/events \
-H 'Content-Type: application/json' \
-H 'x-sentry-auth: mshr_devdefaultapikey000000000000000000000000000' \
-d '{"message":"README smoke event","level":"error"}'curl -sSf 'http://127.0.0.1:8080/api/v1/projects/default/issues?status=unresolved'curl -sSf http://127.0.0.1:8080/api/v1/projects/default/storageWhen you boot Mesher with clustered env, inspect runtime-owned state through Mesh CLI surfaces instead of package-owned control routes:
meshc cluster status <node-name@host:port> --json
meshc cluster continuity <node-name@host:port> --json
meshc cluster continuity <node-name@host:port> <request-key> --json
meshc cluster diagnostics <node-name@host:port> --jsonPackage-owned maintainer replay:
bash mesher/scripts/verify-maintainer-surface.shProduct-root wrapper:
bash scripts/verify-m051-s01.shThe package-owned verifier is the authoritative Mesher maintainer rail. The root wrapper exists so product-root CI and repo-boundary callers can invoke the same proof surface from the repo root without depending on a local mesh-lang layout hack.