Skip to content

deploy: read-only Sepolia readback against this checkout (#43) - #59

Merged
JamesCarnley merged 5 commits into
mainfrom
claude/sepolia-readback
Nov 12, 2026
Merged

JamesCarnley merged 5 commits into
mainfrom
claude/sepolia-readback

Conversation

@JamesCarnley

Copy link
Copy Markdown
Member

Summary

  • yarn readback:sepolia (packages/hardhat/scripts/sepoliaReadback.ts): read-only, no key, no transactions. Compares live Sepolia with the contracts compiled from your checkout:
    • the implementation code behind every Safe-owned proxy, and the three views. Constructor-set values (immutables) are masked. Verdicts: MATCH, SAME-LOGIC (only the solc metadata hash differs), DIFFERS;
    • ProxyAdmin owner (expected: EFS.eth Safe);
    • schema registration at the IDs derived from the real proxy addresses (WHITEOUT from its Safe-keyed CREATE3 prediction);
    • post-freeze feature checks: MAX_ANCHOR_DEPTH, and whether the router and file view have whiteoutResolver().
  • Exits 1 on any difference. docs/CHAINS.md says to run it before and after any Sepolia upgrade or redeploy.

Why

main and live Sepolia drifted for four months without anyone noticing. WHITEOUT was never deployed, the indexer upgrade (ADR-0066/0068) never ran, and the views predate WHITEOUT wiring. This is the part of #43 that compares against the live chain; #57 covers drift between the repo's own records.

Current Sepolia vs main (block ~12008208)

Contract Verdict
EdgeResolver, MirrorResolver, ListResolver, ListEntryResolver, SystemAccount, ListReader MATCH
AliasResolver SAME-LOGIC (its only post-freeze change is formatting)
EFSIndexer DIFFERS (depth 32 vs 256; ADR-0066)
EFSFileView, EFSRouter DIFFERS (predate WHITEOUT wiring)
WhiteoutResolver / WHITEOUT schema absent / not registered

All ProxyAdmins are owned by the EFS.eth Safe. All nine frozen schemas are registered.

Control: compiling the freeze-era EFSIndexer.sol (71aa466) gives MATCH, with depth 32 = 32. So DIFFERS reflects the code change, not a compiler-settings mismatch. It also confirms the live indexer is exactly the freeze source, whose storage layout is the one the upgrade-safety check (StorageLayout.gate) is pinned to.

Permanence tier

Ephemeral (tooling). Read-only.

Specs / ADRs touched or checked

  • docs/CHAINS.md (updated: how to run it)
  • ADR-0048 / ADR-0055 / ADR-0066 / ADR-0068: confirmed; it reports their live status, nothing changes.

Test plan

  • Ran end to end against Sepolia via yarn readback:sepolia; output as above; exit 1.
  • Control run with the freeze-era indexer source: MATCH.
  • yarn hardhat:lint: pass. tsc --strict on the script: clean.
  • Not in CI: it needs a live RPC, and public endpoints flake.

Agents involved

  • Dev: Claude Opus 5.5
  • Review: none yet
  • Orchestrator: James

Refs #43

🤖 Generated with Claude Code

Docs and main drifted from live Sepolia for four months without anyone
noticing: WHITEOUT was never deployed, the indexer upgrade
(ADR-0066/0068) was never executed, and the views predate WHITEOUT
wiring. `yarn readback:sepolia` makes that visible in one command,
with no key and no transactions.

It compares, for every Safe-owned proxy, the EIP-1967 implementation's
runtime code with this checkout's compiled bytecode (immutables masked;
MATCH / SAME-LOGIC when only the solc metadata differs / DIFFERS), the
three views the same way, ProxyAdmin ownership (expected: EFS.eth
Safe), schema registration at the UIDs derived from the realized proxy
addresses (WHITEOUT from its Safe-keyed CREATE3 prediction), and the
post-freeze feature probes. Exits 1 on any difference.

Verified against Sepolia block ~12008208: Edge/Mirror/List/ListEntry
resolvers and SystemAccount MATCH, AliasResolver SAME-LOGIC (its only
post-freeze change is formatting), ListReader MATCH; EFSIndexer,
EFSFileView and EFSRouter DIFFER; WHITEOUT absent; live depth 32 vs
256. Control: compiling the freeze-era EFSIndexer.sol (71aa466) gives
MATCH and depth 32 = 32, so DIFFERS is the code change, not a compiler
mismatch, and the live indexer is exactly the freeze source.

Not wired into CI: it needs a live RPC, and public endpoints flake.

Refs: #43, #44
Permanence-tier: Ephemeral
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T21:40:00.044049Z 28154ca New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: be8556983f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

JamesCarnley and others added 2 commits October 27, 2026 17:49
… on bad wiring

Two gaps from Codex review on #59:
- A deployed WhiteoutResolver only had its proxy's existence checked.
  Run it through the same implementation-code and ProxyAdmin-owner
  checks as the other proxies.
- A router or file view wired to no WhiteoutResolver, or the wrong one,
  was printed but not counted. Code comparison can't catch it (the
  router keeps the address in storage, the file view's immutable is
  masked), so count anything but "wired to the live WhiteoutResolver"
  as a difference.

Re-run against Sepolia: 8 differences (the two views' missing wiring
now count). The deployed-WhiteoutResolver branch can't run against
Sepolia until it exists; it reuses the proxy check unchanged.

Refs: #43
Permanence-tier: Ephemeral
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Resolve the overlap with #57 (both added a CHAINS.md note and a
hardhat package script): keep both — the static `check:deployments`
drift check and this branch's live `readback:sepolia`.
`yarn check:deployments`, `yarn docs:check` and hardhat lint pass.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f89df3c4c2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Codex review on #59: the EAS address is a constructor immutable, so the
code comparison masks it. An implementation built from this checkout
but constructed with the wrong EAS would report MATCH while rejecting
every attestation from real Sepolia EAS. Read `getEAS()` on every proxy
(as deploy-lib/verify.ts does at deploy time) and count anything but
canonical Sepolia EAS, or an unreadable value, as a difference.

Against Sepolia: all seven proxies report canonical EAS; still 8
differences, all the known ones.

Refs: #43
Permanence-tier: Ephemeral
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 574d7700af

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Codex review on #59: the views' immutables are masked in the code
comparison and EFSRouter keeps its references in storage, so a
redeployed view wired to the wrong indexer, edge resolver, EAS,
SchemaRegistry, system account or schema UID would still report
MATCH. Read each binding back through its getter and compare it with
what deploy-lib/views.ts passes: the proxy addresses, canonical EAS and
SchemaRegistry, SystemAccount, and the DATA / LIST / LIST_ENTRY UIDs
derived from the proxies. A getter absent from code that already
DIFFERS isn't double-counted; anywhere else, unreadable is a
difference.

Against Sepolia: all 13 bindings on the three live views readable and
correct; still the same 8 differences. Negative test (expected
ListReader resolver deliberately wrong): reported as a wrong binding.

Refs: #43
Permanence-tier: Ephemeral
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@JamesCarnley
JamesCarnley merged commit 9a43282 into main Nov 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant