2026-02-12 15:46:57 -08:00
#!/usr/bin/env bash
# Run all tasks that do NOT require LAN, Proxmox SSH, PRIVATE_KEY, or NPM_PASSWORD.
2026-04-12 06:12:20 -07:00
# Use from dev machine / WSL / CI. For tasks that need LAN/creds, see run-all-operator-tasks-from-lan.sh (or run-operator-tasks-from-lan.sh).
2026-02-21 15:46:06 -08:00
# Usage: ./scripts/run-completable-tasks-from-anywhere.sh [--dry-run]
2026-04-12 06:12:20 -07:00
# --dry-run Print the steps only; do not run them (exit 0).
2026-02-21 15:46:06 -08:00
#
# Exit codes (Unix convention): 0 = success (all steps passed), non-zero = failure.
# Do not "fix" exit 0 — it means the script completed successfully.
2026-02-12 15:46:57 -08:00
set -euo pipefail
SCRIPT_DIR = " $( cd " $( dirname " ${ BASH_SOURCE [0] } " ) " && pwd ) "
PROJECT_ROOT = " $( cd " $SCRIPT_DIR /.. " && pwd ) "
cd " $PROJECT_ROOT "
2026-02-21 15:46:06 -08:00
DRY_RUN = false
for a in " $@ " ; do [ [ " $a " = = "--dry-run" ] ] && DRY_RUN = true && break; done
if $DRY_RUN ; then
echo "=== Completable from anywhere (--dry-run: commands only) ==="
echo ""
2026-04-12 06:12:20 -07:00
echo "10 steps (see script body). Summary:"
chore: sync docs, config schemas, scripts, and meta task alignment
- Institutional / JVMTM / reserve-provenance / GRU transport + standards JSON
- Validation and verify scripts (Blockscout labels, x402, GRU preflight, P1 local path)
- Wormhole wiring in AGENTS, MCP_SETUP, MASTER_INDEX, 04-configuration README
- Meta docs, integration gaps, live verification log, architecture updates
- CI validate-config workflow updates
Operator/LAN items, submodule working trees, and public token-aggregation edge
routes remain follow-up (see TODOS_CONSOLIDATED P1).
Made-with: Cursor
2026-03-31 22:31:39 -07:00
echo "1. Config validation: bash scripts/validation/validate-config-files.sh [--dry-run]"
echo " (optional: python3 -m pip install check-jsonschema — step 1 then validates config/dbis-institutional JSON Schemas too)"
echo "2. On-chain check (138): SKIP_EXIT=1 bash scripts/verify/check-contracts-on-chain-138.sh || true"
echo "3. All validation: bash scripts/verify/run-all-validation.sh --skip-genesis"
2026-03-31 23:18:37 -07:00
echo "4. Public report API: bash scripts/verify/check-public-report-api.sh"
2026-04-12 06:12:20 -07:00
echo "5. Public PMM dry-run readiness: bash scripts/verify/check-public-pmm-dry-run-readiness.sh"
echo "6. Reconcile .env: bash scripts/verify/reconcile-env-canonical.sh --print"
echo " Gas scaffold: bash scripts/verify/print-gas-runtime-env-canonical.sh"
echo "7. XDC Zero JSON + relayer env: bash scripts/validation/validate-xdc-zero-config.sh && bash scripts/validation/validate-xdc-zero-relayer-env.sh"
echo "8. XDC Zero RPC preflight: bash scripts/verify/xdc-zero-chain138-preflight.sh (failure prints WARN only)"
echo "9. Remaining live/operator blockers (informational): SKIP_EXIT=1 bash scripts/verify/check-full-deployment-status.sh --json"
echo "10. Public info hub (HTTPS, non-fatal): pnpm run verify:info-defi-oracle-public"
2026-02-21 15:46:06 -08:00
echo ""
echo "Run without --dry-run to execute. Exit 0 = success."
exit 0
fi
2026-02-12 15:46:57 -08:00
echo "=== Completable from anywhere (no LAN/creds) ==="
echo ""
# 1. Config validation
2026-04-12 06:12:20 -07:00
echo "[Step 1/10] Config validation..."
2026-02-12 15:46:57 -08:00
bash scripts/validation/validate-config-files.sh
echo ""
# 2. On-chain contract check (Chain 138) — may warn if RPC unreachable
2026-04-12 06:12:20 -07:00
echo "[Step 2/10] On-chain contract check (Chain 138)..."
2026-02-12 15:46:57 -08:00
SKIP_EXIT = 1 bash scripts/verify/check-contracts-on-chain-138.sh || true
echo ""
# 3. Full validation (skip genesis to avoid RPC)
2026-04-12 06:12:20 -07:00
echo "[Step 3/10] Run all validation (--skip-genesis)..."
2026-02-12 15:46:57 -08:00
bash scripts/verify/run-all-validation.sh --skip-genesis
echo ""
# 4. Emit canonical .env lines for reconciliation
2026-04-12 06:12:20 -07:00
echo "[Step 4/10] Public report API / token-aggregation health..."
2026-03-31 23:18:37 -07:00
bash scripts/verify/check-public-report-api.sh
chore: sync docs, config schemas, scripts, and meta task alignment
- Institutional / JVMTM / reserve-provenance / GRU transport + standards JSON
- Validation and verify scripts (Blockscout labels, x402, GRU preflight, P1 local path)
- Wormhole wiring in AGENTS, MCP_SETUP, MASTER_INDEX, 04-configuration README
- Meta docs, integration gaps, live verification log, architecture updates
- CI validate-config workflow updates
Operator/LAN items, submodule working trees, and public token-aggregation edge
routes remain follow-up (see TODOS_CONSOLIDATED P1).
Made-with: Cursor
2026-03-31 22:31:39 -07:00
echo ""
# 5. Emit canonical .env lines for reconciliation
2026-04-12 06:12:20 -07:00
echo "[Step 5/10] Public PMM dry-run readiness..."
bash scripts/verify/check-public-pmm-dry-run-readiness.sh
echo ""
echo "[Step 6/10] Canonical .env (reconcile smom-dbis-138/.env)..."
2026-02-12 15:46:57 -08:00
bash scripts/verify/reconcile-env-canonical.sh --print
echo ""
2026-04-12 06:12:20 -07:00
echo "Gas runtime env scaffold:"
bash scripts/verify/print-gas-runtime-env-canonical.sh
echo ""
echo "[Step 7/10] XDC Zero config + relayer env examples..."
bash scripts/validation/validate-xdc-zero-config.sh
bash scripts/validation/validate-xdc-zero-relayer-env.sh
echo ""
echo "[Step 8/10] XDC Zero RPC preflight (warn if unreachable)..."
if bash scripts/verify/xdc-zero-chain138-preflight.sh; then
:
else
echo "[WARN] XDC preflight failed — check XDC_PARENTNET_URL / LAN RPC in .env when you need XDC Zero."
fi
echo ""
echo "[Step 9/10] Remaining live/operator blockers (informational)..."
if SKIP_EXIT = 1 bash scripts/verify/check-full-deployment-status.sh --json >/tmp/run-anywhere-full-deployment.json 2>/dev/null; then
jq '
{
fullDeploymentComplete,
failures,
blockers,
orphanRegistryWarning: .gruV2.orphanWarning,
deployerFundingBlockers: ( .deployerFunding.blockers // [ ] ) ,
deployerFundingWarnings: ( .deployerFunding.warnings // [ ] ) ,
wemixMeshGap: (
[ .cwEvmMesh.chains[ ] ? | select ( .chainKey = = "WEMIX" and .missingCount > 0) |
{ chainKey, missingCount, missingSymbols}
] | first
)
}
' /tmp/run-anywhere-full-deployment.json
else
echo "[WARN] Could not summarize full deployment blockers."
fi
echo ""
echo "[Step 10/10] Public info.defi-oracle.io (HTTPS)..."
if command -v pnpm >/dev/null 2>& 1 && grep -q '"verify:info-defi-oracle-public"' package.json 2>/dev/null; then
if ! pnpm run verify:info-defi-oracle-public; then
echo "[WARN] verify:info-defi-oracle-public failed (site, network, or TLS). Completable continues; re-run: pnpm run verify:info-defi-oracle-public"
fi
else
echo "[WARN] pnpm missing or verify:info-defi-oracle-public not in package.json — skip"
fi
echo ""
2026-02-12 15:46:57 -08:00
2026-04-12 06:12:20 -07:00
echo "=== Done. Tasks requiring LAN, funding, on-chain deploys, or registry upgrades: run ./scripts/run-all-operator-tasks-from-lan.sh from a host on LAN (NPM_PASSWORD for backup; optional --skip-backup). ==="
2026-02-21 15:46:06 -08:00
exit 0