Review: Sport-specific game clock integration for time-conditioned bots

review-1723-2026-07-04 Review

review ready

Verdict: READY

Template Completeness

  • [x] Type (Feature)
  • [x] Lineage
  • [x] Repo
  • [x] User Story
  • [x] Context
  • [x] File Targets (create / modify / do-not-touch sections)
  • [x] Feature Flag (none)
  • [x] Acceptance Criteria (7 items)
  • [x] Test Expectations (5 items + run command)
  • [x] Constraints
  • [x] Checklist
  • [x] Related

Traceability

  • [x] story:watchdog-trading label -- Watchdog Trading
  • [x] story note verified -- found in project-prediction-assistant user-stories section
  • [x] arch:rails label -- Rails Architecture
  • [x] arch note verified -- arch-rails note exists in pal-e-docs (id: 2347)
  • [x] Forgejo issue -- ldraney/prediction-assistant#40, open

File Targets

  • [x] app/services/game_clock_estimator.rb -- to create, does not exist yet (correct)
  • [x] config/game_durations.yml -- to create, does not exist yet (correct)
  • [x] test/services/game_clock_estimator_test.rb -- to create, does not exist yet; test/services/ directory exists (correct)
  • [x] app/jobs/market_scanner_job.rb -- to modify, EXISTS; emit_time_update method at line 112 confirmed as integration point
  • [x] app/jobs/time_update_job.rb -- to modify, EXISTS; stub job with perform(ticker:, series_ticker:, event_start_time:, captured_at:) ready for extension
  • [x] test/jobs/market_scanner_job_test.rb -- to modify, EXISTS; comprehensive test suite with FakeKalshiClient pattern

Repo Placement

OK. Issue filed on ldraney/prediction-assistant, repo field matches, all file targets in this repo. Single-repo scope.

Dependencies

  • Issue #4 (Late-Game Lock) -- primary consumer of enriched time data, currently in todo column (board item #1689). This ticket is a prerequisite for Late-Game Lock's time condition.
  • Issue #2 (MarketScanner) -- parent feature, in validation column (board item #1687). Scanner is the emission point being extended.
  • Issue #29 (Edge Learner) -- may use time data for pattern learning, in backlog column (board item #1716).
  • No blocking dependencies for this ticket -- it enriches scanner output using only existing data (series_ticker + event_start_time) without requiring other tickets first.

Acceptance Criteria

7 criteria, all testable by an agent. Test commands are valid: bin/rails test test/services/game_clock_estimator_test.rb test/jobs/market_scanner_job_test.rb. AC #7 (backward compatibility for existing TimeUpdateJob consumers) is important -- the agent must use optional kwargs with defaults when extending TimeUpdateJob#perform to avoid breaking existing scanner calls during implementation.

Blast Radius

Contained. TimeUpdateJob is currently a stub (# Stub -- bot consumers implement in Sprint 4) with no real downstream consumers. Only emitted by MarketScannerJob, which is one of the files being modified. No bot implementations need to change -- the ticket explicitly scopes bot-side interpretation to ticket #4 (Late-Game Lock). Adding new keyword arguments to TimeUpdateJob#perform requires backward-compatible defaults to satisfy AC #7.

Decomposition Assessment

6 file targets across 1 repo (does not trigger >3 files across >2 repos). 7 acceptance criteria (above the >5 threshold). However, all 7 ACs test behavioral facets of a single service (GameClockEstimator) and its integration point -- they are not independent deliverables. The work naturally splits into: (1) create GameClockEstimator + config + tests, (2) wire into scanner + extend TimeUpdateJob. These are tightly coupled -- you cannot test the estimator integration without both pieces. 3 story points is a modest estimate consistent with a single agent pass under 5 minutes. No decomposition needed.

Recommendation

No action needed.