Repository navigation
Event snapshot time, slimmed event detail type, and fast tests (2.3.3) - #53
Conversation
Three Reports API retry tests each waited a real 5s backoff. Drive them with Bun fake timers through a small settle() helper instead; no production code changes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
/predictions/events/{event_ticker} is being slimmed to the event as of one
run. fetchOctagonEventDirect now returns OctagonEventDetail: the list row
without its report prose and trust fields, plus event_url and markets[]
(per-market quotes and a normalized status from the same run). The list
type is unchanged. A test pins that report still resolves its title,
analysis time and market from a slimmed response.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
events presented probabilities with no time attached, though they are a snapshot from captured_at that can be weeks old. The detail now opens with "Snapshot <time> UTC (<age>)", adding the analysis date when a refresh carried an analysis over a day older forward (the web report page's rule), and the list gains a Captured column. parseUtcTimestamp reads a zone-less API timestamp as UTC rather than local time, since analysis_last_updated is an untyped string in the API schema. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (2)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (10)
Included review availability: This review used your included allowance. 2 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. WalkthroughThe change adds typed event-detail responses, timestamp parsing, and snapshot timing in event output. Report handling adopts the detail type. Tests cover snapshot formatting and use a fake-timer helper for retry cases. ChangesEvent Detail and Test Updates
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change adds snapshot timing to event output, introduces a slimmer event-detail type and speeds up retry tests. No concrete merge-blocking risk was found. The live API behavior has not been exercised yet, so a quick manual check after merge is sensible. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 55.56% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 9 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Prepares the CLI for the slimmed
GET /predictions/events/{event_ticker}(the event as of one run, with report and trust content moved to the Reports API), shows when event numbers were captured, and speeds up the test suite. Releases 2.3.3.Faster tests
Three Reports API retry tests each waited a real 5s backoff. They now run on Bun fake timers through a small
settle()helper (src/__tests__/fake-timers.ts). No production code changes.Suite time: ~19s → ~4s, same tests passing.
Event detail type
fetchOctagonEventDirectnow returnsOctagonEventDetail: the list row without its report prose and Trust Index fields, plusevent_urlandmarkets[](each outcome's quote and normalizedstatusfrom the same run)./eventslist type is unchanged.reportstill resolves its title, analysis time and market ticker from a slimmed response.Snapshot time on
eventsSnapshot 2026-09-23 17:53 UTC (7d ago). It adds· analysis from <date>when the analysis is over a day older than the capture, the same rule as the web report page.Capturedcolumn (3h,7d).parseUtcTimestampreads zone-less API timestamps as UTC rather than local time.eventscommand tests.Test plan
bun run typecheck && bun test: 577 passkalshi events <KX…>/kalshi eventsagainst the live API: the Snapshot line and Captured column match the web report page🤖 Generated with Claude Code
Summary by CodeRabbit