Re-Review: Tighten Live Edge ceiling from 92c to 89c

review-1848-2026-07-10-v2 Review

review ready

Verdict: APPROVED

Re-review of board item #1848. Previous review (review-1848-2026-07-10) returned NEEDS_REFINEMENT for two traceability gaps. Both are now resolved.

Template Completeness

  • [x] Type -- Feature
  • [x] Lineage -- references Spike #11, supersedes #7
  • [x] Repo -- ldraney/botfire
  • [x] User Story
  • [x] Context -- includes P&L data by price band
  • [x] File Targets
  • [x] Feature Flag -- none (appropriate for DB-only change)
  • [x] Acceptance Criteria
  • [x] Test Expectations
  • [x] Constraints
  • [x] Checklist
  • [x] Related

Traceability

  • [x] story:bot-strategy label present
  • [x] story note verified -- found in project-botfire user-stories section. Entry: "As a bot operator, I want to identify and exploit profitable trading conditions so that my automated bots generate consistent positive P&L."
  • [x] arch:bots label present
  • [x] arch note verified -- arch-bots note exists in pal-e-docs (note_type=architecture, status=active, project=bots, title="Architecture: BotFire Bot Engine")
  • [x] Forgejo issue -- ldraney/botfire#14, state: open

File Targets

  • [x] app/services/bot_engine.rb -- verified: line 135 contains return false if trigger.condition_max.present? && value > trigger.condition_max.to_f. Issue correctly says NOT to touch this file.
  • [x] db/seeds.rb -- verified: file exists but does NOT seed triggers (only users and bots). Issue correctly says "optionally if trigger defaults are seeded there" -- no change needed.
  • [x] DB change Trigger.find_by(name: "Live Edge").update!(condition_max: 89) -- the condition_max column exists (migration 20260708130000_add_condition_max_to_triggers.rb, schema.rb line 107). The Trigger model references are consistent.

Repo Placement

OK. Issue specifies ldraney/botfire and is filed on ldraney/botfire. Single-repo change.

Dependencies

  • Supersedes Issue #7 (board item #1842, backlog, marked closed/superseded)
  • Spawned from Spike #11 (board item #1845, currently in qa column)
  • No blockers identified. No items in in_progress that this depends on.
  • Sibling issues from same spike: #12 (board item #1846, 3pt) and #13 (board item #1847, 5pt) -- no blocking relationship.

Acceptance Criteria

3 criteria, all agent-verifiable:
  • condition_max set to 89 -- verifiable via rails runner command provided in Test Expectations
  • No entries above 89c after deploy -- verifiable by monitoring BotFire records post-deploy
  • Dashboard confirms new trades stay in 85-89c band -- verifiable via analytics dashboard
Test command is real and correct: bin/rails runner "puts Trigger.find_by(name: 'Live Edge').condition_max"

Blast Radius

Low. condition_max is referenced in exactly 2 places:
  • bot_engine.rb:135 -- the check_late_game guard (already correct)
  • db/schema.rb:107 -- column definition
Only the Live Edge trigger uses the late_game trigger type. No other bots, services, or downstream consumers are affected.

Decomposition Assessment

No decomposition needed. 1 effective file target (DB record update), 3 acceptance criteria, estimated agent time well under 5 minutes. This is a single rails runner command or a data migration.

Recommendation

No action needed.