feat: add evidence-gated voyage knowledge factory - #51
Merged
Merged
Conversation
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
ParsedVoyageClaimSource-Binding Contract: Enforces that source authority does NOT equal proof that an artifact contains a specific claim (authority of source != evidence that source contains claim). Prevents synthesizing fake locators from user input. Statements andEvidenceEvents are authored strictly from verifiedParsedVoyageClaimobjects.AdmissionStatus.AUTO_ADMISSIBLEorAdmissionStatus.REVIEW_REQUIRED.EvidenceCondition.SUPPORTEDwith machine observer provenance (observed_by="parser:<parser_id>",human_review_state=HumanReviewState.DRAFT). No fake human reviewer or project-owner approval events are ever emitted.resolve_ship_identity,resolve_port) strictly requires canonical admitted truth (EvidenceCondition.SUPPORTED+HumanReviewState.APPROVED+PublishStatus.PUBLISH_ALLOWED). Storage presence (e.g. arbitrarycabin:*orvenue:*records) or draft/blocked statements cannot establish identity.DEFAULT_APPROVED_VOYAGE_PARSERSwhitelists only genuine production parser IDs (msc_booking_pdf_parser:v1,official_itinerary_parser:v1). Test parser admission is handled via explicit dependency injection (approved_parsersparameter) without polluting runtime defaults.Method.INFERREDPort Linkages: Authors canonical departure (Q-0033) and arrival (Q-0036) UN/LOCODE linkages with full input statement closure and deterministic rule hash (UNLOCODE_LINKAGE_RULE_HASH).UNKNOWNGaps: Gaps (Q-0038..Q-0041) are first-class records with explicit recheck strategies and needed source classes.PassengerTripKnowledgePackTruth Boundary: Clean, immutable passenger view exposing only truth-verified facts, marking unproven fields as"UNVERIFIED"/None, and dynamic destination port infrastructure only when admitted truth.VoyageKnowledgeResultcleanly separates caller intent (input_vessel,input_departure_date,input_departure_location, etc.) from verified canonical truth (vessel,departure_date, etc.).res == res2).voyage:msc-bellissima:20261004-shanghai-tokyocompiles 8 verified facts without mutating evidence data.Q-0038..Q-0041remainUNKNOWN; zero terminal/berth/route/geometry/final-cabin fabrication.Known Non-Blocking Ontology Gap
vessel.official_name); the current Bellissima bootstrap reuses admittedvoyage.vesseltruth (STM-0403).Verification
pytest tests/test_voyage_knowledge_factory.py tests/test_reference_voyage_port_intake.py tests/test_barcelona_human_review.py: 43 passed in 5.26spytest: 892 passed across 72 test suites in 49.54sgit diff --check: clean (0 whitespace warnings)