Skip to content

Harden Prime ENS operator docs and size reporting#161

Open
MontrealAI wants to merge 2 commits into
mainfrom
codex/audit-ensjobpages-for-effective-identity-compliance
Open

Harden Prime ENS operator docs and size reporting#161
MontrealAI wants to merge 2 commits into
mainfrom
codex/audit-ensjobpages-for-effective-identity-compliance

Conversation

@MontrealAI

Copy link
Copy Markdown
Owner

Motivation

  • Finalize Phase 0 audit findings by making operator-facing truths explicit and adding ENS-side size visibility without changing Prime runtime semantics.
  • Make it explicit that the current Prime path is keeper-assisted (lean) for metadata and that useEnsJobTokenURI is legacy-manager-only.
  • Provide the missing machine-readable change-minimization plan and ensure tests reflect the lean Prime / keeper-assisted operating mode.

Description

  • Added ENS-side bytecode reporting and optional strict ENS gating to scripts/check-bytecode-size.js without weakening existing Prime baseline enforcement by: adding ENSJobPages/ENSJobPagesInspector to the checks list and making ENS checks report-only unless STRICT_ENS_SIZE=1 is set.
  • Added machine-readable audit artifact scripts/ens/output/change-minimization-plan.json summarizing the selected Option B approach.
  • Hardened operator docs and runbooks across many ENS/Prime guides (clarified agijob- prefix, removed/marked legacy useEnsJobTokenURI assumptions, documented keeper-assisted metadata model and explicit repair flows). Files updated include: docs/* (multiple ENS/runbook files listed in commit).
  • Adjusted two ENS tests (test/ensAuthoritySnapshot.test.js, test/ensKeeperAssistedPrimePath.test.js) to match the current lean Prime / keeper-assisted flow (use ENS-side owner calls in tests and assert manager public getters rather than nonexistent V1 getters).
  • Kept all Prime bytecode and public ABI unchanged.

Testing

  • Ran npm run test:size; passed and confirmed AGIJobManagerPrime runtime remains at baseline (24,472 bytes) and ENSJobPages size is reported (oversized) as report-only by default.
  • Ran npm run test:size:benchmark; passed and reconfirmed best EIP-170-safe compile profile for Prime (viaIR=true, runs=1).
  • Ran npm run docs:check && npm run docs:ens:check; documentation checks passed.
  • Ran npx truffle test --network test test/ensAuthoritySnapshot.test.js test/ensKeeperAssistedPrimePath.test.js; tests passed after aligning expectations to the keeper-assisted path (11 passing).
  • Attempted npm run ens:phase0:mainnet but it hit an external RPC 502 from the public node during eth_getLogs in this environment (network/RPC availability issue), not a repo failure.

Codex Task

@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: 48acb475d5

ℹ️ 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".

Comment thread scripts/check-bytecode-size.js Outdated
Comment on lines +105 to +107
name: "ENSJobPages",
artifactPath: artifactPathFor("ens/ENSJobPages.sol", "ENSJobPages"),
enforce: process.env.STRICT_ENS_SIZE === "1",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restore the default size gate for deployable ENSJobPages

.github/workflows/ci.yml:36-37 runs npm run test:prime:ci, which includes npm run test:size, and hardhat/scripts/deploy-ens-job-pages.js:137-139 deploys this exact ENSJobPages artifact on-chain. Making its limit check opt-in here means the canonical size lane now exits 0 even when the helper is already over the EIP-170/EIP-3860 limits (the commit message explicitly says it is "oversized"), so CI no longer protects the replacement-helper deploy path and operators only discover the problem when factory.deploy() reverts on mainnet/sepolia.

Useful? React with 👍 / 👎.

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.

1 participant