Harden ERC-8004 tracking and add deployment check#395
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d8d4243d1c
ℹ️ 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".
| registryAddress, | ||
| agentUri: card.card_ipfs_uri || null, | ||
| agentCardCid: card.card_cid || null, | ||
| metadata: { config_source: source }, |
There was a problem hiding this comment.
Preserve existing registration metadata when tracking
When this upsert encounters an existing registration with populated metadata_json, passing a non-null object makes the conflict clause replace the entire JSON value with only config_source. The ALREADY_PINNED path in api/admin/pin-agent-cards.js retracks every card, so retrying that endpoint can silently erase legacy or operational metadata; merge this field into the existing JSON object instead of replacing it.
Useful? React with 👍 / 👎.
| return { | ||
| chainId: process.env.ERC8004_CHAIN_ID || DEFAULT_ERC8004_CHAIN_ID, | ||
| registryAddress: process.env.ERC8004_REGISTRY_ADDRESS || DEFAULT_ERC8004_REGISTRY_ADDRESS, | ||
| source: process.env.ERC8004_CHAIN_ID && process.env.ERC8004_REGISTRY_ADDRESS ? 'env' : 'default_base_mainnet', |
There was a problem hiding this comment.
Distinguish partial ERC-8004 environment overrides
When exactly one of the two environment variables is configured, the returned config combines that override with the other Base default but labels the result default_base_mainnet. Every resulting row is therefore stamped as using the safe defaults even though it may contain a custom chain or registry address, concealing a potentially invalid hybrid configuration; either require both variables or record the partial source accurately.
Useful? React with 👍 / 👎.
What changed
public/deployment-check.htmlpage so production can be checked for stale static HTML after deploys.trackPinnedCardRegistration()so malformed/legacy card rows are skipped safely instead of throwing.erc8004Config()and records whether tracking used explicit env config or the safe Base Mainnet defaults.Why
Recent site cleanup PRs are merged and Vercel shows the production alias on the latest main deployment, but web-indexed content can still show stale homepage/Claim copy. A dedicated noindex deployment check page gives us a simple live marker to confirm which version the domain is serving.
The test suite was also reporting failures because tests still expected pre-PR #391 behavior where tracking was disabled without env vars. That is no longer correct because the Base registry config is public protocol config and now has safe defaults.
Safety
agent_id, transaction hash, or ENSIP-25 verification.Validation to run
npm testnpm run check:linkshttps://www.commandlayer.org/deployment-check.htmlafter merge/deploy.