Skip to content

feat(pricing/2.2): Fare construction hardening — IROE, TPM, 024d (#151) - #159

Merged
telivity-otaip merged 6 commits into
mainfrom
cursor/fare-construction-hardening-151-130a
Aug 24, 2026
Merged

feat(pricing/2.2): Fare construction hardening — IROE, TPM, 024d (#151)#159
telivity-otaip merged 6 commits into
mainfrom
cursor/fare-construction-hardening-151-130a

Conversation

@telivity-otaip

@telivity-otaip telivity-otaip commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Closes #151.

Hardens Agent 2.2 Fare Construction to fail closed on missing licensed data and documents the IROE / TPM / Resolution 024d (HX/NX) contracts — without committing proprietary IATA tables.

Domain correction (review): tax/payment FX is ICER, not IROE. IROE is fare construction only (Res 024c). Agent 2.3 must not consume IROE. Source: IATA Exchange Rates.

Type of change

  • Enhancement to existing agent
  • Domain logic correction
  • Documentation

Checklist

  • Fare-construction + pricing package tests pass
  • pnpm --filter @otaip/agents-pricing typecheck passes
  • No any types without justification
  • No floating point for currency — decimal.js
  • No proprietary IROE/ICER/TPM datasets committed (fixtures only, bannered)
  • Tests encode refuse-haversine / refuse-missing-IROE behavior
  • IROE vs ICER split documented; tax engine DOMAIN_QUESTION points at ICER

Domain impact

  • NUC × IROE (Res 024c) requires caller-supplied data_sources.iroe. No hardcoded rates; missing currency → DomainInputRequired.
  • TPM/MPM from published IATA feeds via data_sources.mileage. Missing pair → fail closed; haversine banned (TPM Manual).
  • Rounding is Resolution 024d HX/NX from data_sources.rounding_024d. No banker rounding.
  • HIP/BHC/CTM remain interface sketches with missing_inputs.
  • Removed bundled IROE/TPM/rounding JSON from the production module graph; test fixtures only.
  • ICER (daily) is the licensed source for ticket-tax / payment FX (Agent 2.3). Tax engine comments + KB explicitly ban wiring tax FX to IROE. No invented rates.

Test plan

  • pnpm exec vitest run packages/agents/pricing/src/fare-construction — 24 passed
  • pnpm exec vitest run packages/agents/pricing — 147 passed
  • pnpm --filter @otaip/agents-pricing typecheck

KB

docs/knowledge-base/fare-construction-data-dependencies.md — IROE (024c) vs ICER split, TPM, 024d, licensed-source notes, HIP/BHC/CTM sketch.

Open in Web Open in Cursor 

cursoragent and others added 2 commits August 24, 2026 07:55
Hardens Agent 2.2 for #151: licensed data via data_sources, no bundled
IROE/TPM files, bans on haversine-as-TPM and banker rounding, DomainInputRequired
when IROE/TPM/024d missing. Adds KB data-dependencies doc and tests.

Co-authored-by: telivity-otaip <telivity-otaip@users.noreply.github.com>
Domain review on #151/#159: IROE is fare construction only; ticket-tax and
payment FX use ICER per IATA xrates. Tax engine must not consume IROE.

Co-authored-by: telivity-otaip <telivity-otaip@users.noreply.github.com>
@telivity-otaip
telivity-otaip marked this pull request as ready for review August 24, 2026 08:40
cursoragent and others added 2 commits August 24, 2026 08:41
CI gen:manifest --check failed after Agent 2.2 version bump.

Co-authored-by: telivity-otaip <telivity-otaip@users.noreply.github.com>
@telivity-otaip telivity-otaip self-assigned this Aug 24, 2026
cursoragent and others added 2 commits August 24, 2026 08:52
Merge left docs/agent-map.html stale vs FareConstruction 0.2.0 + main agent docs.

Co-authored-by: telivity-otaip <telivity-otaip@users.noreply.github.com>
Simple conflict in docs/agent-map.html — regenerated manifest to combine
FareConstruction 0.2.0 (IROE/TPM/024d) with main's 5.3 IRROP/EU261 updates.

Co-authored-by: telivity-otaip <telivity-otaip@users.noreply.github.com>
@telivity-otaip
telivity-otaip merged commit 55deb9c into main Aug 24, 2026
1 check passed
@telivity-otaip
telivity-otaip deleted the cursor/fare-construction-hardening-151-130a branch August 24, 2026 08:55
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.

[Help wanted] Fare construction hardening: IATA rounding, ROE ingestion, no haversine-as-TPM

2 participants