Re-Review: Add evening-only time filter to Live Edge

review-1846-2026-07-10-v2 Review

review ready

Verdict: READY

Re-review of board item #1846. Both NEEDS_REFINEMENT issues from review-1846-2026-07-10 have been resolved. Scope is solid, file targets verified, traceability complete.

Template Completeness

  • [x] Type (Feature)
  • [x] Lineage
  • [x] Repo
  • [x] User Story
  • [x] Context
  • [x] File Targets
  • [x] Feature Flag (none -- acceptable, no feature flag doc in repo)
  • [x] Acceptance Criteria
  • [x] Test Expectations
  • [x] Constraints
  • [x] Checklist
  • [x] Related

Traceability

  • [x] story:bot-strategy label -- present on board item
  • [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 on board item
  • [x] arch note verified -- arch-bots note exists in pal-e-docs (note_type: architecture, status: active, project: bots). Covers 7 services, key files, order patterns, data model, infrastructure.
  • [x] Forgejo issue -- ldraney/botfire#12, open

Previous Review Issues -- Resolved

  • [x] user-stories section -- Was missing on project-botfire. Now present with story:bot-strategy entry in a table with Story Label and User Story columns.
  • [x] arch-bots note -- Was not found by search. Now exists at slug arch-bots with note_type: architecture, status: active, tagged architecture+active.

File Targets

  • [x] app/services/bot_engine.rb -- verified: exists (268 lines, 7.9k). evaluate_bot at line 44, execute_action called at line 65, defined at line 158. Natural gate insertion point is top of evaluate_bot (line 44) or before the execute_action call at line 65.
  • [x] app/models/bot.rb -- verified: exists (12 lines, 319 bytes). Simple model with sports_filter serialization. No active_hours columns yet. Ticket Constraints section says a BOT_ACTIVE_HOURS hash in bot_engine.rb is acceptable (no migration needed).
  • [x] app/views/dashboard/index.html.erb -- correctly excluded from scope.

Repo Placement

OK. Issue says ldraney/botfire, filed on ldraney/botfire. Single-repo change, no cross-repo concerns.

Dependencies

  • Parent spike #11 (board item #1845) is complete, in QA column. This ticket was spawned from it.
  • Sibling tickets #13 (item #1847) and #14 (item #1848) were also spawned from #11 but are independent -- no ordering dependency.
  • No blocking items in in_progress column.

Acceptance Criteria

4 AC, all agent-verifiable:
  • [x] "Live Edge does not fire on games outside 12pm-midnight MDT" -- testable with time stubbing
  • [x] "Time window is configurable per bot" -- testable by checking hash/config structure
  • [x] "Skipped trades are logged with reason 'outside active hours'" -- testable by capturing log output
  • [x] "Existing trigger logic unchanged" -- testable by verifying trigger evaluation still called normally inside window
Test command bin/rails test is valid. Existing test pattern in test/services/volatility_bot_test.rb provides a fixture template. No bot_engine_test.rb exists yet -- agent will create one.
Note: Title says "evening-only" but AC defines 12pm-midnight MDT (wider than evening). The AC is the authoritative spec; the title is colloquial. Not a conflict.

Blast Radius

Low. The time gate is a pre-filter in evaluate_bot before any trigger evaluation or order placement. No other callers of evaluate_bot or execute_action outside bot_engine.rb. Dashboard correctly excluded. App timezone is UTC (config.time_zone commented out in config/application.rb); agent must use explicit Time.use_zone("America/Denver") or in_time_zone calls rather than relying on Time.zone.

Decomposition Assessment

No decomposition needed. 2 file targets in 1 repo, 4 AC, estimated agent work well under 5 minutes. Straightforward pre-filter gate pattern.

Recommendations

No action needed.