chore: skip single-leg seed when Office 24 funding already posted
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m20s
CI/CD Pipeline / Security Scanning (push) Successful in 2m37s
CI/CD Pipeline / Lint and Format (push) Failing after 46s
CI/CD Pipeline / Terraform Validation (push) Failing after 29s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 26s
Deploy ChainID 138 / Deploy ChainID 138 (push) Failing after 41s
HYBX OMNL TypeScript & anchor / token-aggregation build + reconcile artifact (push) Failing after 36s
Validation / validate-genesis (push) Successful in 32s
Validation / validate-terraform (push) Failing after 27s
Validation / validate-kubernetes (push) Failing after 10s
Validation / validate-smart-contracts (push) Failing after 10s
Validation / validate-security (push) Failing after 1m17s
Validation / validate-documentation (push) Failing after 18s
Verify Deployment / Verify Deployment (push) Failing after 1m6s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-29 04:00:40 -07:00
parent 458f3b420b
commit 84f12c7edc
4 changed files with 47 additions and 6 deletions

View File

@@ -34,17 +34,25 @@ else
fi
log "=== 5/5 Office 24 opening journal (activate live ledgers) ==="
MATERIAL_OPENING_USD="${OMNL_MATERIAL_OPENING_THRESHOLD:-10000000}"
STATUS_FILE="$REPO_DIR/config/omnl-hospitallers-office24-status.v1.json"
if [[ "$SEED_JOURNAL" == "1" ]] && [[ -f "$ENV_FILE" ]]; then
set -a
# shellcheck disable=SC1090
source "$ENV_FILE"
set +a
if [[ -n "${OFFICE24_OPENING_M1_USD:-}" ]]; then
node scripts/deployment/seed-office-24-opening-journal.mjs
bash scripts/deployment/deploy-omnl-bank-production.sh
if [[ -f "$STATUS_FILE" ]] && grep -q '"fundingPosted"[[:space:]]*:[[:space:]]*true' "$STATUS_FILE" 2>/dev/null; then
log "Office 24 fundingPosted=true in status SSOT — skip single-leg seed (journal already live)"
elif [[ -n "${OFFICE24_OPENING_M1_USD:-}" ]]; then
opening_amt="${OFFICE24_OPENING_M1_USD//,/}"
if awk -v amt="$opening_amt" -v lim="$MATERIAL_OPENING_USD" 'BEGIN { exit !(amt >= lim) }'; then
log "Material opening amount ($OFFICE24_OPENING_M1_USD) — skip single-leg seed (use 1b canary/execute matrix)"
else
node scripts/deployment/seed-office-24-opening-journal.mjs
bash scripts/deployment/deploy-omnl-bank-production.sh
fi
else
log "OFFICE24_OPENING_M1_USD not set — ledger stays connected-but-empty (fineractLive=false)"
log "Set OFFICE24_OPENING_M1_USD in .env and re-run: bash scripts/deployment/activate-omnl-production.sh"
log "OFFICE24_OPENING_M1_USD not set — ledger reads live Fineract only (no seed)"
fi
else
log "Journal seed skipped (SEED_OFFICE24_JOURNAL=$SEED_JOURNAL)"

View File

@@ -34,6 +34,15 @@ if (!Number.isFinite(amount) || amount <= 0) {
process.exit(1);
}
const MATERIAL_THRESHOLD = 10_000_000;
if (amount >= MATERIAL_THRESHOLD) {
console.error(
`Amount ${amount} exceeds single-leg seed limit ($${MATERIAL_THRESHOLD}). ` +
'Material openings use the two-leg HO matrix: scripts/omnl/office24-hospitallers-1b-canary.sh and office24-hospitallers-1b-execute.sh',
);
process.exit(1);
}
const auth = Buffer.from(`${user}:${pass}`).toString('base64');
const headers = {
Authorization: `Basic ${auth}`,