chore: require protocol logo and anvil-fork test pattern in /add-protocol#1292
Merged
Conversation
…ocol Two rules abstracted from the Frax Ether V2 plugin (PR #1287, which set up both patterns by hand as the canonical examples). LOGO IS MANDATORY Every protocol ships with a real logo at public/protocols/{slug}.png. Phase 1.1 now requires identifying the logo source during research (brand page > GitHub assets > npm package logo field > scraped favicon, in that order of preference). Phase 3 changes the artifact line from "skip if not provided" to REQUIRED, with explicit ban on placeholders, AI-generated, and default-icon fallbacks. Phase 4.1 is a new first verify step that checks the file exists. Bail-out condition added: "no real logo obtainable - stop and ask". ANVIL FORK FOR MAINNET-ONLY PROTOCOLS Phase 1.2 adds a HARD RULE forbidding fabricated chain entries: never add Sepolia (or any other chain) to contract.addresses unless the protocol is genuinely deployed there. The chain selector auto-exposes any chain in the map, so a fake entry breaks workflows at runtime. Phase 3 integration test selection becomes Pattern A (real testnet) / Pattern B (mainnet-only anvil fork) / Pattern C (public-RPC fallback). Pattern B explicitly says "do NOT default the test at a paid mainnet RPC: the anvil fork is free, deterministic, requires no secret, and is the supported substitute for the missing testnet". Pattern B adds two artifacts modeled on what shipped in PR #1287: - scripts/{slug}-fork-test.ts (tsx smoke test, anvil-funded account, PASS/FAIL output) - docs/plugins/{slug}.md "## Testing Without Risking Real ETH" section walking through the Docker foundry anvil command, the fork-test script, and CHAIN_ETH_MAINNET_PRIMARY_RPC override for the dev server - docs/plugins/{slug}.md "## Why no testnet entry in the plugin" subsection naming the testnets checked Phase 4.6 verify requires the anvil-fork run to pass. Bail-out added for "anvil cannot be run locally". Net: +29 / -19 in the slash command.
🧹 PR Environment Cleaned UpThe PR environment has been successfully deleted. Deleted Resources:
All resources have been cleaned up and will no longer incur costs. |
ℹ️ No PR Environment to Clean UpNo PR environment was found for this PR. This is expected if:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two rules added to
.claude/commands/add-protocol.md, abstracted from the patterns shipping in PR #1287 (Frax Ether V2). Both surfaced as gaps when running the slash command end-to-end for the first time.Net diff: +29 / -19 in the slash command.
Rule 1: Logo is mandatory
Every protocol must ship with a real logo at
public/protocols/{slug}.png. Placeholders, AI-generated stand-ins, and default-icon fallbacks are not acceptable.assets/orlogos/folder > npm packagelogofield > scraped favicon).iconfield references.Rule 2: Anvil-fork test pattern for mainnet-only protocols
For protocols with no real testnet deployment, integration tests run against a local anvil mainnet fork at
http://localhost:8545, not a paid mainnet RPC.contract.addressesunless the protocol is genuinely deployed there. The chain selector auto-exposes any chain in the map.scripts/{slug}-fork-test.ts- tsx smoke test using an anvil-funded account, prints PASS/FAIL.docs/plugins/{slug}.md## Testing Without Risking Real ETHsection +## Why no testnet entry in the pluginsubsection (the second so future maintainers don't re-litigate the "just add Sepolia" instinct).Test plan
<objective>,<process>, and<success_criteria>blocks still parse.<context>block still resolve to real files./add-protocol <Some Mainnet-Only Protocol>and confirm the orchestrator routes through the new Pattern B path and surfaces the logo-source question in the Phase 2 report.