Repository navigation
refactor(coordinator): extract inference settlement owner - #1027
Gajesh2007 wants to merge 5 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…/coordinator-inference-settlement # Conflicts: # docs/architecture/cache-aware-routing.md # docs/architecture/system-profiler.md # docs/developer/build.md # docs/developer/test.md
|
@codex review Refreshed the parent branch and resolved documentation/source-map conflicts. Existing subsystem implementations and regression tests are preserved. Exact parent composition and independent review pass; all coordinator test packages compile and documentation checks pass. |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Consolidated into #1056 for review and merge after #1094, #1095 and #1096. #1056 contains this branch's exact head ( |
Inference reservations, refunds and completion accounting were attached to
Serveracross consumer, provider and settlement files.coordinator/inference/settlementnow owns those operations throughService,ServiceHoldsandHolder, with pricing, finalization, usage and payout files beside their tests. The API keeps HTTP admission, provider-terminal ownership, route observations and consumer-channel signaling.api/inference_settlement.gobinds the existing ledger and startup service-hold map. Store, registry and referral lookups retain their live lookup points, including asynchronous writes. Completion preserves price resolution → reservation finalization → in-memory usage and scheduled durable usage → API observations → referral and concurrent credits → settlement profile stamp → consumer terminal. The durable usage insert remains asynchronous; both credit operations finish before the API signals completion.Stacked on #1021 (
refactor/coordinator-inference-response). Its catalog, HTTP, tool-policy and profiler prerequisites remain inherited. Store transactions, pricing defaults, wire formats and route behavior retain their existing contracts.Before
flowchart LR Request[Inference request] --> Reserve[Server reservation and refund helpers] Reserve --> Shared[Shared ledger and hold map] Terminal[Provider completion] --> API[api handleCompleteAt and inline accounting] API --> Usage[Charge or refund then usage] Usage --> Observe[API outcome and timing observations] Observe --> Credit[Referral and provider/platform credits] Credit --> Client[Consumer completion channels] Cancel[Consumer disconnect] --> Park[API settlement holder] Park -->|late terminal| API Park -->|expiry refund| ReserveAfter
flowchart LR Request[Inference request] --> Admission[API admission and spend-cap checks] Admission --> Reserve[settlement.Service Reserve / Refund] Reserve --> Shared[Shared ledger and ServiceHolds] Terminal[Provider completion] --> API[API terminal claim and lifecycle] API --> Settle[settlement.Service Complete] Settle --> Usage[Same charge/refund and usage order] Usage --> Observe[Existing API observation callback] Observe --> Credit[Same referral and credit operations] Credit --> Client[API signals consumer completion channels] Cancel[Consumer disconnect] --> Park[settlement.Holder with API expiry policy] Park -->|late terminal| API Park -->|expiry refund| ReservePreservation and validation
env -u DATABASE_URL -u EIGENINFERENCE_DATABASE_URL GOTOOLCHAIN=go1.25.0 go test -race ./coordinator/api/... ./coordinator/inference/... -count=1.Source
01096c412; final source641bd53b0. The final source changes only moved-symbol/fee-override comments and the new fixture's bounded terminal assertions after the full race run; all 4,267 other declaration bodies retain exact tokens. Final fixture checks and lint cover that cut.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.