Skip to content

fix(emergency): skip inactive networks in pause readiness check (EXSC-1295) - #2622

Merged
gvladika merged 3 commits into
mainfrom
feature/exsc-1295-skip-inactive-networks-in-emergency-pause-readiness-check
Nov 5, 2026
Merged

gvladika merged 3 commits into
mainfrom
feature/exsc-1295-skip-inactive-networks-in-emergency-pause-readiness-check

Conversation

@gvladika

@gvladika gvladika commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Which Linear task belongs to this PR?

EXSC-1295

Why did I implement it this way?

The gravity chain is shut down and both of its RPC endpoints are unreachable, so verify-emergency-pause-readiness fails with -32403: RPC disabled on every PR that touches the scripts it watches (e.g. #2621).

  • config/networks.json: gravity.status is now "inactive".
  • script/utils/verifyEmergencyPauseReadinessGitHub.sh: the on-chain sweep builds its network list from networks with status == "active" only, instead of every key in networks.json. The "no production LiFiDiamond" skip, the throttled sweep and the result aggregation are unchanged.
  • Same script: added the repo's usual # shellcheck source=script/helperFunctions.sh disable=SC1091 directive (as in script/utils/checkPauserFunds.sh), so shellcheck on the file is clean. The finding was already there on main.

This is a stopgap. Removing gravity fully is a separate /deprecate-network gravity.

Governance impact: the pause-readiness check no longer covers inactive networks, so gravity's diamond is no longer checked for pauserWallet and governance. No on-chain role, Safe, timelock or pause path changes. script/emergency/emergencyPauseBreakGlass.sh is untouched and still sweeps every network.

Other consumers of status == "active" that now skip gravity (please confirm each is intended):

  • script/deploy/healthCheckAllNetworks.ts
  • isNetworkActive in script/helperFunctions.sh, used by script/tasks/diamondSyncWhitelist.sh and script/utils/checkPauserFunds.sh
  • script/mongoDb/rpcEndpoints.ts (RPC sync)
  • script/balances.ts
  • script/deploy/safe/: safe-utils.ts, timelock-watcher.ts, confirm-safe-tx.ts, execute-pending-timelock-tx.ts, backfill-timelock-queue.ts, add-safe-owners-and-threshold.ts
  • getAllActiveNetworks in script/utils/viemScriptHelpers.ts
  • tasks/generateLedgerClearSigning.ts (drops gravity from the clear-signing registry)
  • script/tasks/temp/check*PerNetwork.ts

Verified locally: bash -n and shellcheck on the script are clean; the active-network filter returns 65 networks and excludes gravity; bun test on lineage-scope.test.ts, healthCheckAllNetworks.test.ts, rpcEndpoints.test.ts, redactRpcUrl.test.ts and generateLedgerClearSigning.test.ts passes (171 tests). The live RPC run is this PR's CI.

Checklist before requesting a review

Checklist for reviewer (DO NOT DEPLOY and contracts BEFORE CHECKING THIS!!!)

  • I have checked that any arbitrary calls to external contracts are validated and or restricted
  • I have checked that any privileged calls (i.e. storage modifications) are validated and or restricted
  • I have ensured that any new contracts have had AT A MINIMUM 1 preliminary audit conducted on by <company/auditor>

🤖 Generated with Claude Code

Gravity is shut down and its RPCs are unreachable, so the readiness
check failed on every PR. Mark gravity inactive and sweep only active
networks. (EXSC-1295)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gvladika
gvladika requested a review from a team November 4, 2026 12:27
@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 8 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6ff98b36-8058-4bdb-aa25-d576152681af
Commits

Reviewing files that changed from the base of the PR and between e171f27 and 32ebbc8.

Files selected for processing: 2
  • config/networks.json
  • script/utils/verifyEmergencyPauseReadinessGitHub.sh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@lifi-action-bot
lifi-action-bot marked this pull request as draft November 4, 2026 12:28
@gvladika
gvladika marked this pull request as ready for review November 4, 2026 12:28
gvladika and others added 2 commits November 4, 2026 13:34
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gvladika
gvladika enabled auto-merge (squash) November 4, 2026 13:01
@lifi-qa-agent

lifi-qa-agent Bot commented Nov 4, 2026

Copy link
Copy Markdown

🔍 QA Review — EXSC-1295 · PR #2622 (🆕 First review, head 32ebbc8)

Verdict: ✅ Approve — 0 findings · Awaiting response: 0 · 0 refuted

Stopgap so the verify-emergency-pause-readiness check stops failing on the shut-down gravity chain: config/networks.json sets gravity.status to "inactive", and verifyEmergencyPauseReadinessGitHub.sh now sweeps only networks whose status is "active". 2 files, +12/−4. No src/ change, so no audit entry is needed (AuditNotRequired is on the PR).

Review routing: focused-high-risk (emergency/governance tooling), single combined pass, 0 candidates.

Acceptance criteria

AC Result
gravity.status is "inactive"; no other field or network changes ✅ one-line diff in config/networks.json
Script sweeps only status == "active" networks; any other or missing status is not swept ✅ isNetworkActive returns true only for "active" and treats a missing status as not active (helperFunctions.sh:4400-4407)
"No production LiFiDiamond" skip, throttled sweep and result aggregation unchanged ✅ only the list-building loop and two message strings change
PR body states the governance impact ✅ "gravity's diamond is no longer checked for pauserWallet and governance"
PR body lists the other consumers of status that now drop gravity ✅ the list matches the ticket's Context

What was verified

  • The loop now reads getAllNetworksArray (every key, same as the old jq -r 'keys[]') and filters with isNetworkActive, so the helper file stays untouched, as the ticket required. getAllNetworksArray and isNetworkActive exist on this head and read the same NETWORKS_JSON_FILE_PATH.
  • script/emergency/emergencyPauseBreakGlass.sh is untouched and still targets every network, so the break-glass path is not weakened.
  • The added # shellcheck source=… disable=SC1091 directive follows the pattern in script/utils/checkPauserFunds.sh.
  • CI on the head: verify-emergency-pause-readiness passes (it failed on gravity before this change), run-ts-tests, validate-json, deploy-smoke-test, CodeQL and Aikido pass.

Findings

None.

Notes (do not gate)

  • 🔵 Setting gravity to inactive is repo-wide, not scoped to this check. The PR body lists the consumers; the one with a governance angle is script/deploy/safe/timelock-watcher.ts, which will stop watching gravity's timelock queue. That is acceptable while the chain is shut down, and the PR names /deprecate-network gravity as the follow-up.
  • 🔵 isNetworkActive spawns two jq processes per network (about 130 in total). That is negligible next to the on-chain sweep.
  • 🔵 I read the script and helper source and the CI result; I did not run the script.

Downstream impact

No contract, selector, ABI or deployment-record change; no diamond cut. Consumers of status == "active" are listed in the PR body. No sibling PRs. The failing verify-emergency-pause-readiness check on other open PRs (e.g. #2616, #2621) clears once this merges and they rebase.

@lifi-qa-agent lifi-qa-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 [Automated QA Review] Approved — PR #2622: inactive networks skipped in the pause-readiness sweep; break-glass script untouched; governance impact stated

@lifi-qa-agent lifi-qa-agent Bot added the QA AI Approved Zeus QA review passed label Nov 4, 2026
@gvladika
gvladika merged commit bbd068a into main Nov 5, 2026
48 checks passed
@gvladika
gvladika deleted the feature/exsc-1295-skip-inactive-networks-in-emergency-pause-readiness-check branch November 5, 2026 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants