Commit deccf47
feat(ev): add is_suspended/suspended_since to EVOpportunity (#14)
## What
Adds two additive, optional fields to the `EVOpportunity` pydantic
model:
- `is_suspended: bool = False` — true while a live opp's sharp reference
is momentarily suspended
- `suspended_since: float | None = None` — unix seconds the suspension
began (present only when suspended)
## Why
Mirrors the server-side flag-gated suspended-opportunity state shipped
in **sharp-api-go #789** (`EV_SUSPENDED_STATE`). When Pinnacle (the
sharp ref) suspends a live market, the engine now keeps the opp
**visible-but-suspended** with the same stable `id` and the **edge
hidden** (`ev_percentage` 0 / unknown — never a stale edge), instead of
dropping it and re-adding on resume — eliminating live EV flicker. SDK
consumers need the field to render the suspended state and to keep the
row in place across resume.
## Safety / compatibility
- Purely **additive optional** fields with safe defaults (`False` /
`None`) — mirrors the `team_side`/`market_segment` precedent.
- **Inert until the server flag flips:** absent from the wire unless
`EV_SUSPENDED_STATE=1` on the API. Today (flag off) the wire is
byte-identical, so fully backward-compatible. No version bump.
- `py_compile` + a pydantic round-trip (suspended payload **and**
flag-off default shape) pass.
Type: feat
Co-authored-by: paperclip-resolver[bot] <paperclip-resolver[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 31ba1c1 commit deccf47
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
305 | 311 | | |
306 | 312 | | |
307 | 313 | | |
| |||
0 commit comments