Skip to content

Comments

Add search, verification, and developer harness#1

Merged
kavanaghpatrick merged 5 commits intomainfrom
feat/serpapi-integration
Feb 9, 2026
Merged

Add search, verification, and developer harness#1
kavanaghpatrick merged 5 commits intomainfrom
feat/serpapi-integration

Conversation

@kavanaghpatrick
Copy link
Owner

@kavanaghpatrick kavanaghpatrick commented Feb 9, 2026

Summary

  • SerpAPI Google Flights backend — alternative to Playwright scraper for live flight pricing (100 free searches/month)
  • ExpertFlyer D-class verification — check per-flight seat availability (D0-D9) with TIGHT badge, alternate dates, and per-flight sub-rows
  • Claude-native developer harness — comprehensive CLAUDE.md (139 lines), settings.json with tool pre-approvals, 5 new slash commands (/rtw-init, /rtw-verify, /rtw-status, /rtw-setup, /rtw-help), 2 path-scoped rules, validation script
  • README — 411-line guide covering all features, usage examples, domain concepts, Claude Code integration

Test plan

  • 794 tests passing, 2 skipped
  • Harness validation script: 44/44 checks pass
  • Live ExpertFlyer D-class verification tested
  • SerpAPI search tested with real queries

🤖 Generated with Claude Code

SerpAPI provides structured JSON access to Google Flights results,
eliminating browser automation and reducing risk of being blacklisted.

- New rtw/scraper/serpapi_flights.py module with search_serpapi(),
  error hierarchy (SerpAPIError/AuthError/QuotaError), rate limiting
- SearchBackend enum (auto/serpapi/fast-flights/playwright) with
  cascade fallback: serpapi → fast-flights → playwright
- --backend/-b flag on both `search` and `scrape prices` commands
- FlightPrice extended with source, flight_number, duration_minutes,
  airline_name fields; SegmentAvailability updated to match
- Rich table gains Flight column and duration display
- 55 new tests (695 total passing) covering SerpAPI module,
  cascade integration, CLI flags, and cache behavior
- Fixed: removed `from __future__ import annotations` from cli.py
  which broke Typer's Annotated metadata processing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement end-to-end D-class availability checking via ExpertFlyer:
- Programmatic Auth0 login with keyring credential storage
- Per-flight seat extraction (not just route-level max)
- Rich CLI display showing individual flights with D-class, TIGHT badges
- Verify pipeline with caching, alternate dates, progress callbacks
- CLI commands: login expertflyer, login status, login clear, verify

Previously the scraper reported max D-class across all flights on a route,
hiding that most flights might have D0. Now each flight's availability is
extracted and displayed, so users can identify specific bookable flights
for their RTW itinerary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rewrites the 3-line CLAUDE.md into a comprehensive 139-line project
constitution with tech stack, CLI reference, module map, domain
vocabulary, conventions, and slash command inventory. Adds tool
pre-approvals via settings.json (12 allow + 3 deny patterns), 2
path-scoped rules for tests/ and rtw/rules/, and 4 new developer
slash commands: /rtw-verify (tests+lint), /rtw-status (dashboard),
/rtw-setup (onboarding), /rtw-help (command discovery). Includes
a validation script that checks all harness files for correctness.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Interactive initialization wizard that checks for SerpAPI key
(env var) and ExpertFlyer credentials (keyring), guides setup
of any missing credentials, installs Playwright if needed, and
runs a smoke test. Shows feature availability dashboard based
on what's configured.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Covers the full feature set (validate, cost, NTP, value, search,
verify, booking), quick start with install steps, usage examples
with real output, itinerary YAML format, ticket types and fares,
oneworld carrier table with YQ levels, Claude Code integration
guide with all 11 slash commands, project structure, development
guide, and key domain concepts (Rule 3015, tariff conferences,
D-class availability, YQ surcharges).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kavanaghpatrick kavanaghpatrick changed the title Add SerpAPI Google Flights backend Add search, verification, and developer harness Feb 9, 2026
@kavanaghpatrick kavanaghpatrick merged commit d5bce5f into main Feb 9, 2026
1 check failed
@kavanaghpatrick kavanaghpatrick deleted the feat/serpapi-integration branch February 9, 2026 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants