Skip to content

feat: switch to node v24 LTS + zod + vitest refactor#4

Merged
telivity-otaip merged 6 commits into
TelivityAI:mainfrom
typevolant:main
Apr 4, 2026
Merged

feat: switch to node v24 LTS + zod + vitest refactor#4
telivity-otaip merged 6 commits into
TelivityAI:mainfrom
typevolant:main

Conversation

@typevolant
Copy link
Copy Markdown
Collaborator

@typevolant typevolant commented Apr 3, 2026

  • Upgrade Node.js from v20 to v24 LTS (.nvmrc, engines field)
  • Bump all major devDependencies: ESLint 8→10, Vitest 1→4, TypeScript 5.4→5.9, Vite 8, tsx 4.21, prettier 3.8, tsup 8.5
  • Migrate ESLint to flat config (eslint.config.mjs) replacing legacy .eslintrc
  • Replace zod with updated schema validation across pricing and other packages
  • Add reference data files (airports.json, decommissioned.json, metro-areas.json)
  • Update pnpm-lock.yaml to reflect all dependency changes
  • Bump version to 0.2.0
  • resolves Update node and deps #3

Why

Node 20 exits LTS maintenance in October 2026; moving to v24 LTS now keeps us on the current support window. The ESLint flat config migration was forced by ESLint v10 dropping legacy config support. Dependency bumps address accumulated drift across the monorepo.

Testing

  • pnpm install successful
  • pnpm build passes across all packages
  • pnpm test full test suite passes
  • pnpm lint no new errors with flat config for ESLint v10
  • Verify Node 24 in CI (`.nvmrcÈ picked up correctly)

@typevolant typevolant mentioned this pull request Apr 3, 2026
@typevolant typevolant marked this pull request as draft April 3, 2026 02:31
@typevolant typevolant changed the title feat: switch to node v24 LTS + zod + vitest refactor feat: switch to node v24 LTS + zod + vitest refactor resolves #1 Apr 3, 2026
@typevolant typevolant marked this pull request as ready for review April 3, 2026 02:32
@typevolant typevolant changed the title feat: switch to node v24 LTS + zod + vitest refactor resolves #1 feat: switch to node v24 LTS + zod + vitest refactor Apr 3, 2026
@typevolant typevolant marked this pull request as draft April 3, 2026 02:33
@typevolant typevolant marked this pull request as ready for review April 3, 2026 02:33
@telivity-otaip
Copy link
Copy Markdown
Collaborator

Looks great — just the airports.json change (gitignore data/, prebuild step instead of committing it). Push that and I'll approve right away! you the beast brother

@typevolant typevolant marked this pull request as draft April 4, 2026 00:47
@typevolant typevolant marked this pull request as ready for review April 4, 2026 00:48
@telivity-otaip telivity-otaip merged commit 485a8ef into TelivityAI:main Apr 4, 2026
1 check passed
@telivity-otaip telivity-otaip self-assigned this Apr 4, 2026
@telivity-otaip telivity-otaip self-requested a review April 4, 2026 01:15
telivity-otaip pushed a commit that referenced this pull request Apr 18, 2026
…200 default; ATPCO-rule-driven

Codex review HIGH #4 — CLAUDE.md violation in agents/exchange + agents/settlement.

Both engines previously fell back to a "$200" / matching-pattern penalty
when no specific filed rule matched. Those values were invented common-
industry patterns, not authoritative ATPCO data.

Per the project domain spec:
- When Cat31/Cat33 rules ARE supplied → apply as filed.
- When rules are NOT supplied:
    voluntary  → permitted at no charge (penalty 0)
    involuntary → fee waived to 0 (regulatory comp via Agent 5.3)

Changes:

change-management/
- Add Cat31Rules type with rules[] + reject_patterns[].
- Engine reads input.cat31_rules and input.is_involuntary.
- Remove $200 fallback. Remove file-based rule loading.
- Move data/change-fee-rules.json to __tests__/fixtures/ with TEST
  FIXTURE banner. Tests pass it explicitly via input.cat31_rules to
  exercise the apply-as-filed branch. New tests cover the
  ATPCO-default branch (no rules supplied).

refund-processing/
- Add Cat33Rules type and input.cat33_rules + input.is_involuntary.
- Remove $200 fallback. Remove file-based rule loading.
- Move data/refund-penalty-rules.json to __tests__/fixtures/ with same
  TEST FIXTURE banner.
- Same test pattern: filed-rule tests + ATPCO-default tests +
  involuntary tests (both with and without rules).

Drop unused DomainInputRequired import in fare-engine.

Verification: 37 change-management tests, 42 refund-processing tests,
3,075 total tests, lint + typecheck clean.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
telivity-otaip pushed a commit that referenced this pull request Apr 18, 2026
…omainInputError

Codex review MEDIUM #1 + MEDIUM #4.

MEDIUM #1 — booking/api-abstraction rate limiter undercounting
- Previously the rate-limit counter incremented once per execute() call,
  before the retry loop. Each retry to the upstream provider therefore
  went uncounted, under-reporting traffic against provider quotas and
  letting agents sail past per-window limits while believing they were
  still in budget.
- Move the increment INSIDE the retry loop, before each requestHandler
  call. Move the rate-limit guard inside the loop too, so an attempt
  that would exceed the quota short-circuits cleanly without burning
  another outbound request.
- New test: 1 initial + 2 retries on a retryable failure → request_count
  ends at 3, not 1.

MEDIUM #4 — stub agents throw raw Error
- New @otaip/core class UnimplementedDomainInputError(agentId, detail)
  with code 'UNIMPLEMENTED_DOMAIN_INPUT'. Callers can catch by class
  instead of string-matching.
- Replace `throw new Error(...)` in 4 stub agents with
  `throw new UnimplementedDomainInputError(...)`:
    DisruptionResponseAgent (5.4)
    DynamicPricingAgent (2.6)
    RevenueManagementAgent (2.7)
    InterlineSettlementAgent (7.4)
- Tests updated to assert on the typed error (instance + agentId + code).
- The other 'placeholder' agents called out in the original review
  (self-service-rebooking, waitlist-management) were since fully built
  out and no longer throw raw Errors.

Verification: 3,085 tests pass, lint + typecheck clean.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

Update node and deps

3 participants