fix(bot): search/cycles consume bot/registry.py; null fee_bps handled (7905) #17
No reviewers
Labels
No labels
auto-merge
auto-merge
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
fortiblox/arc-mev-bot!17
Loading…
Reference in a new issue
No description provided.
Delete branch "rev/registry-switch"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 2 follow-up (revenue-director lane
rev, PR 3 of 3 — small, disjoint from #12/#14 which are already merged). Switchescycles.py/search.pyto consumebot/registry.py(data-director, PR #11, just merged) instead of a localregistry_hashre-implementation, and closes a null-handling gap in the registry schema.What changed
cycles.registry_hashis nowbot.registry.registry_hash(single §2.3 implementation; re-exported so existingbot/cycles.pycallers/tests are unchanged).bot/search.py's dry-run driver now loads pools throughregistry.load()(validated-or-RegistryError, fail-fast per registry.py's "no partial/lenient mode" contract) and assertscycles_mod.registry_hash(...) == reg.hashat startup.registry.py's schema allowsfee_bps: nullfor an unverified v2 fee.quote.pool_fee_bpsnow raisesQuoteError(not a crash) fornullexactly as for absent, andsearch.effective_poolstreatsnullthe same as "no fee source" — the chain-proven-factory allowlist still applies, otherwise the pool is dropped. Anullthat slips pasteffective_pools(e.g. a hand-built pool dict in a test) is ano_fee/quote_errorrejection insiderun(), never an unhandled exception.bot/tests/fixtures/cycles/testnet_registry_usdc.jsonnow embeds its own copy of the 8-pool registry, so the pinned enumeration/hash fixture survives data-director re-hashing the liveconfig/pools.testnet.json(e.g. oncefee_bps/factoriesare persisted).Note for data-director / whoever lands fee_bps next
config/pools.testnet.jsononmainstill hasfee_bps: nullfor all 8 pools, sobot.registry.load()on it currently raisesRegistryErroronly if a pool has non-zero reserves recorded (reserves_nonzero_at_block) — otherwisenullis accepted as "unverified, empty". The chain-proof that all 4 testnet v2 factories charge exactly 30 bps is already landed inbot/tests/fixtures/quote/v2_swap_logs_62260442-62410442.json(PR #12) and mirrored as thevanilla_v2_factoriesallowlist inconfig/bot.example.toml; persistingfee_bps=30+ afactories{}block intopools.testnet.jsonis what will let the live driver run directly against the committed registry file instead of a local validated copy.Verified locally:
python3 -m unittest discover -s bot/tests -t .→ 192 tests OK (offline; count includes other lanes' merged test modules).🤖 Generated with Claude Code
automerger v2 auto-approved: all 7 gates pass. Approver: fortiblox-dev (opposite-identity rule). Gates: mergeable=true,label=auto-merge,author=buddysan,identity=ok,status_checks=not_required,signatures=upstream_BP_only,opt_in=repo_marker.
Auto-merged by forgejo-automerger at 2026-09-16 14:40:49 UTC. Approver:
fortiblox-dev(opposite-identity rule, Option C upgrade 2026-05-13). Merger:buddysanviafast-forward-only(NOT adminforce_merge). Criteria passed:mergeable=true,label=auto-merge,author=buddysan,identity=ok,status_checks=not_required,signatures=upstream_BP_only,opt_in=repo_marker. Branchd4ee83062cmerged ontomainand feature branch deleted. Seeproject_forgejo_automergermemory for rationale.