Review: Watchdog -- auto-buy when market crosses 85% threshold (re-review)
Verdict: APPROVED
Re-review of board item #1689. Previous review (
review-1689-2026-07-02) returned NEEDS_REFINEMENT with four findings. All have been addressed.Previous Findings Resolution
- [x] [BODY] Lineage missing #1 -- RESOLVED. Lineage now reads: "Depends on
ldraney/kalshi-assistant #1(Rails app scaffold),#2(scanner), and#3(schema). Theapp/directory doesn't exist yet -- it's created by #1." - [x] [LABEL] Arch label mismatch -- RESOLVED. Rather than realigning labels, backing architecture notes were created to match the existing
arch:appandarch:apilabels. - [x] [SCOPE] Create architecture notes -- RESOLVED.
arch-app(Application Domain: Kalshi Assistant) created with Mermaid diagram, component table, and key decisions.arch-api(API Integration: kalshi-assistant) created with sequence diagram, endpoints, rate limits, and auth flow. - [x] [DECOMPOSE] 6 AC, extract OrderService -- ACCEPTED AS BORDERLINE. Context section now acknowledges OrderService extraction option: "Consider extracting a shared OrderService... either as part of this ticket or split into a foundational ticket." AC count remains 6 (1 over threshold), but this is acceptable: single repo, 3 tightly-coupled files, ~5 min estimated work.
Template Completeness
Issue type: Feature (template-issue-feature)
- [x] Type -- "Feature"
- [x] Lineage -- documents deps on #1 (scaffold), #2 (scanner), #3 (schema)
- [x] Repo -- ldraney/kalshi-assistant
- [x] User Story -- present, well-formed
- [x] Context -- references watchdog-strategy.md (verified exists), API endpoint, OrderService note
- [x] File Targets -- 3 CREATE targets listed
- [x] Feature Flag -- watchdog_live_trading, global, disabled by default
- [x] Acceptance Criteria -- 6 criteria listed, all testable
- [x] Test Expectations -- unit tests + run command
- [x] Constraints -- dry-run default, logging, error handling
- [x] Checklist -- present
- [x] Related -- present
Traceability
- [x] story:watchdog-trading label -- Watchdog Trading
- [x] story note verified --
story-kalshi-assistant-watchdog-tradingexists (active, user-story); entry found in project-kalshi-assistant user-stories table with success metric "85%+ win rate, $0.10-$0.15 avg profit per contract" - [x] arch:app label -- Application Domain
- [x] arch note verified --
arch-appnote exists (active, architecture); includes Mermaid diagram showing Watchdog component, service object table, key decisions - [x] arch:api label -- API Integration
- [x] arch note verified --
arch-apinote exists (active, architecture); includes sequence diagram, endpoint groups, rate limit table, RSA-PSS auth flow - [x] Forgejo issue -- ldraney/kalshi-assistant#4, state: open
File Targets
- [x]
app/services/watchdog_service.rb-- CREATE. Requires #1 (Rails scaffold) for app/ directory. Dependency documented in Lineage. - [x]
app/jobs/watchdog_job.rb-- CREATE. Same #1 dependency. Solid Queue job pattern documented in arch-app and arch-rails notes. - [x]
app/services/order_service.rb-- CREATE. Shared Kalshi API order client. Reuse by #5 (Option D sizing) acknowledged in Context.
Repo Placement
OK. Single repo (ldraney/kalshi-assistant), all targets in same repo. Issue filed on correct repo.
Dependencies
- #1 Rails app scaffold (sprint:1, backlog) -- app/ directory structure. NOW DOCUMENTED in Lineage.
- #2 Market scanner (sprint:2, backlog) -- scanner triggers watchdog. Documented.
- #3 Strategy engine schema (sprint:2, backlog) -- Trade/Pick/Strategy models. Documented.
- Sprint ordering: Correct -- this is sprint:3, all deps are sprint:1-2.
- Downstream: #5 (Option D sizing, sprint:3) may share order_service.rb -- acknowledged in Context.
- Board state: All 12 items remain in backlog. No blockers in_progress.
Acceptance Criteria
6 AC, all verifiable by an agent:
- [x] Threshold detection (yes_bid >= confidence_threshold) -- unit testable, aligns with watchdog-strategy.md 85%+ entry
- [x] API order placement (POST /portfolio/events/orders, side: bid) -- confirmed in openapi.yaml line 1143; integration testable with HTTP mocks
- [x] Trade record with order_id -- DB assertion testable
- [x] Sell triggers 95%+ / below 80% -- unit testable, matches watchdog-strategy.md sell triggers table
- [x] Dry-run mode -- unit testable with feature flag mock
- [x] Pick and Trade records -- DB assertion testable
Blast Radius
Greenfield project -- no existing application code. All file targets are CREATE. order_service.rb is a shared candidate for #5 but that creates no conflict since #5 is also greenfield.
Decomposition Assessment
- 3 file targets in 1 repo -- OK (under threshold)
- 6 acceptance criteria -- borderline (1 over >5 threshold)
- Estimated agent work -- ~5 minutes, borderline
- OrderService extraction acknowledged as option in Context but kept in this ticket for cohesion
No decomposition needed. Borderline case accepted: tightly coupled domain logic, single repo, and Context explicitly flags the extraction option for future consideration.
Observations (non-blocking)
arch-apikey endpoints table uses legacy endpoint path (/portfolio/orders) while issue body and openapi.yaml use the newer/portfolio/events/orders. Should be corrected in the arch note separately.- Feature flag section filled despite no
docs/feature-flags.mdin repo. Acceptable for greenfield; the doc will be established as part of the Rails scaffold (#1).
Recommendation
No action needed. All previous findings resolved. Ticket is ready for implementation once sprint:1 and sprint:2 dependencies are complete.