Skip to content

[metrics] Simulation gate bypass amplified — queued counter increments without sim when BOT_SIGNER_KEY unset #220

@obchain

Description

@obchain

Refs #50

File: crates/charon-cli/src/main.rs (process_opportunity instrumentation)

Problem

PR #42 finding 3 (#170) identified that opportunities skip simulation when BOT_SIGNER_KEY is unset, then are still pushed to OpportunityQueue. PR #50 wires record_opportunity_queued() at the queue.push call site. Every unsimulated push now increments charon_executor_opportunities_queued_total{chain="bnb"}.

The metric makes the bypass invisible in observability: dashboards show 'queued opportunities' rising even though no simulation occurred. Operator monitoring metrics sees apparent health while the CLAUDE.md sim gate is silently bypassed.

Impact

Monitoring blind spot on the most critical safety invariant. PR #50 codifies the bug into observable success signal.

Fix

Resolve PR #42 #170 (do not enqueue unsimulated opportunities) before merging this PR. Alternatively split the counter: charon_executor_opportunities_queued_total{simulated=true|false} so the bypass is visible. The pure fix is to refuse enqueue without sim — refusing enqueue means the counter never increments for unsim'd entries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglayer:rustRust crates (core / scanner / protocols / executor / cli)pr-reviewFindings from PR review processpriority:p1-coreCore MVP scopestatus:readyScoped and ready to pick up

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions