Skip to content

feat: priority client layer — odata builder, typed errors, money, metadata store (train 2) - #2

Merged
leonagente merged 1 commit into
mainfrom
train/2-client
Aug 27, 2026
Merged

leonagente merged 1 commit into
mainfrom
train/2-client

Conversation

@leonagente

Copy link
Copy Markdown
Member

Summary

  • ODataBuilder: composite key segments, apostrophe DOUBLING (never stripping), $since Z-suffix, %20/%2B/%3B encoding
  • Typed error union (8 kinds, retryable ONLY on network/rate_limited), redaction on every escape path, OData v4 envelope parse with Hebrew passthrough
  • money.ts: integer minor units, >2dp rejection, 0.1+0.2 exact
  • PriorityClient: injectable fetchImpl, AbortController timeout, writes single-attempt (timeout → timeout_uncertain), GET retry ≤2 on network/5xx/429, token bucket, LRU cache with entity-prefix write invalidation, 350MB guard
  • MetadataStore: warm-up → GetMetadataFor → stale retry; CSDL XML parser incl. numeric character references (מק"ט); disk cache 24h TTL
  • Config correction: PRIORITY_API_URL owns full /odata/Priority prefix (install variance verified); PRIORITY_ENVIRONMENT demoted to label
  • tests/integration/sandbox.spec.ts: live sandbox suite, skipIf no creds

Live verification (orchestrator-run, raw output in session)

  • GetPriorityVersion() → 25.0 ✔
  • LOGPART schema via warm-up+GetMetadataFor, clean-room (disk cache wiped) 639ms ✔
  • AINVOICES(IVNUM,IVTYPE,DEBIT) composite-key GET → 200, row IVNUM round-trips ✔ — the train's central claim, proven live
  • 112 unit tests green, tsc clean, build green

@leonagente
leonagente merged commit f02e81d into main Aug 27, 2026
2 checks passed
@leonagente
leonagente deleted the train/2-client branch August 27, 2026 06:12
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.

1 participant