feat: add via field for through-flight stops + married segment detection#8
Open
kavanaghpatrick wants to merge 7 commits intomainfrom
Open
feat: add via field for through-flight stops + married segment detection#8kavanaghpatrick wants to merge 7 commits intomainfrom
kavanaghpatrick wants to merge 7 commits intomainfrom
Conversation
Spec artifacts: - research.md: feasibility analysis and codebase exploration - requirements.md: 6 user stories, 17 FRs, 7 NFRs - design.md: 6 components, file-by-file change plan - tasks.md: 13 tasks across 4 phases (POC-first) Ready for implementation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add via_through_flight.yaml fixture and 10 tests verifying: - Via stop adds new continent to continents_visited - Via stop in same continent doesn't duplicate - Via stop does NOT increment segments_per_continent - via_continent_segments tracking with segment index + airport - Multiple via stops on single segment - Via counting works alongside implicit Asia detection - Fixture integration with full build_context Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6 through-flights: 4 cross-continent (QF1/2, BA15/16, QR920/921, QR908/909 — all via SIN) and 2 same-continent (QF5/6 via PER, QF3/4 via AKL). Includes loader module with lookup function. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
MarriedSegmentRule (INFO severity) detects two patterns: 1. CX hub-connection: CX segments not through HKG may have married D-class availability 2. Through-flight split risk: via-stop city also appears as stopover destination elsewhere in itinerary Rule 25 across 11 files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Through-flight via-stop annotations in phone instructions and CX hub-connection D-class married segment warnings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add married_segment_note to SegmentVerification. When CX/QR segments have 0 nonstop D-class but connecting flights available, flag as likely married through hub (HKG/DOH). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…warnings - 5 via field model tests in test_models.py - 6 married segment rule tests (CX hub, split risk, clean pass) - 5 booking through-flight warning tests (via annotation, GDS, CX) - 1 integration test via fixture_validation (full pipeline) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
viafield to Segment model for through-flight technical stops (Rule 3015 §16)build_context()to count via-stop continents without consuming extra segmentsChanges
via: Optional[str | list[str]]with Pydantic normalization_detect_via_continents()+via_continents/via_continent_segmentson ValidationContextmarried_segment_noteon SegmentVerificationTest plan
🤖 Generated with Claude Code