PocketBrain Runtime Config Gate
Validate runtime configuration before deploy and after incident remediations.
Workflow
- •Select validation scope.
- •Choose
server,worker, orallbased on requested task or changed files.
- •Prepare server env for production-style checks.
- •Run
bash scripts/render-server-env.sh --mode production --source .env --output server/.env. - •Stop immediately and report if render fails.
- •Run runtime validators.
- •Run
NODE_ENV=production npm run config:check:serverfor server-only checks. - •Run
NODE_ENV=production npm run config:check:workerfor worker-only checks. - •Run
NODE_ENV=production npm run config:checkfor full checks.
- •Classify and remediate failures.
- •Read
references/required-checks.mdfor rule coverage. - •Read
references/remediation-map.mdfor failure-to-fix mappings. - •Propose the smallest safe fix and rerun the same command.
- •Confirm gate status.
- •Report pass/fail for each checked scope.
- •Provide the exact rerun command for reproducibility.
Reporting
Return:
- •Scope and commands run.
- •Validation errors grouped by server/worker.
- •Remediation steps.
- •Final gate verdict.
Safety
- •Never print raw secret values from
.env,server/.env, or worker secrets. - •Never commit generated
server/.env. - •Prefer route-mode safe defaults: declared
routesorWORKER_ROUTE_MODE=dashboard.