Skip to content

refactor(coordinator): reorganize domain ownership and storage backends - #1324

Merged
Gajesh2007 merged 13 commits into
masterfrom
refactor/coordinator-target-layout
Oct 4, 2026
Merged

Gajesh2007 merged 13 commits into
masterfrom
refactor/coordinator-target-layout

Conversation

@Gajesh2007

@Gajesh2007 Gajesh2007 commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Summary

Reorganize coordinator ownership and isolate every coordinator Go test in the
mirrored coordinator/tests/ tree. Tests exercise the actual router, backends,
transports and production-consumed components with retained constructor inputs.
Production packages do not contain _test.go files or import test infrastructure.

The existing PR commits establish domain owners, application assembly and storage
backends. This follow-up replaces their colocated private tests with genuine
component boundaries while retaining the original test names, assertions,
benchmarks, backend matrices and deterministic race schedules.

Consumer and provider wire shapes, auth distinctions, routing/admission policy,
load and activation safeguards, billing arithmetic, SQL behavior and release
versions remain unchanged. One inference owner still arbitrates active requests,
cancellation, late terminal events, refunds and settlement.

Before And After

Concern Before After
Test placement Tests mixed with production owners, plus api/tests and store/tests contract trees All coordinator Go tests under coordinator/tests, mirroring owning production domains
Private-state coverage Tests directly access owner maps, locks and transient state Genuine private-state components with operational contracts; tests retain the real dependencies they pass to constructors
Concurrency regressions Some test-only callbacks pause intermediate work Real transport, claim, publish, persistence and lifecycle boundaries preserve deterministic interleavings
API composition Server construction supplies shared resources implicitly Application assembly supplies registry, store, ledger and read cache; domain owners share those instances
Inference terminal behavior Consumer and provider paths converge on one request owner Same owner, with explicit component collaborators; no alternate settlement state machine
Network/media safety Bounded fetch, DNS-time IP policy, redirect checks and all-or-nothing inlining Same safeguards in production-consumed policy, budget and URL-reference modules
Store testing Backend implementation details and shared contracts in several locations Memory, PostgreSQL, cache and shared contract suites mirrored; every process uses an isolated disposable database
Test discovery Standard Go discovery plus isolated runner shards Standard Go discovery retained; mirrored shard selection and package-relative working directories
Coverage Imported production code requires an explicit instrumentation scope Consistent production -coverpkg across shard binaries; test fixtures/database plumbing excluded
Cross-language fixtures Protocol fixtures colocated with Go production source Byte-identical single-source fixtures under tests/protocol/testdata; Swift and TypeScript consumers updated

No overlays, go:linkname, reflection-based private access, copied production
implementations, raw-state facades or arbitrary exports are used to make relocated
tests compile. Exported configuration contracts remain only where real callers
consume them. Mutable implementation state remains private.

File Trees

Abbreviated to changed boundaries. The Before tree describes the original PR base;
the test-preservation audit additionally uses published commit d341dea82 as the
frozen pre-isolation checkpoint.

Before

coordinator/
|-- cmd/coordinator/main.go       # assembly and lifecycle
|-- api/
|   |-- server.go                # transport and shared domain state
|   |-- consumer.go, dispatch.go, settlement.go
|   |-- provider.go, mdm_scheduler*.go, trust_reuse*.go
|   `-- *_test.go                # contracts, codecs and private-state tests
|-- registry/
|   |-- scheduler.go, queue.go, cache*.go
|   `-- *_test.go                # state, policy, races and benchmarks
|-- store/
|   |-- interface.go, memory.go, postgres.go
|   `-- *_test.go                # backend and conformance tests
|-- protocol/testdata/           # shared Swift/TypeScript fixtures
`-- other-domain/*_test.go

After

coordinator/
|-- cmd/                        # thin executable entrypoints
|-- app/                        # shared resources, startup and ordered shutdown
|-- api/
|   |-- server.go, server_handler.go, routes.go
|   |-- access/, accounts/, billing/, catalog/, releases/
|   |-- inference/request/, inference/response/
|   |-- provider/trust/, observation/, reporting/, operations/
|   `-- httpx/, geo/, readcache/, autopilot/, promptwork/, types/
|-- registry/                   # atomic live routing and provider transitions
|-- store/
|   |-- interface.go, cached.go, as.go
|   |-- memory/
|   `-- postgres/migrations/
|-- internal/                   # genuine operational and value components
|   |-- api/, inference/, provider/, registry/, store/
|   |-- appattest/, attestation/, billing/, payments/
|   |-- mdm/, mediafetch/, mediawork/, wire/
|   `-- command/, startup/, promptwork/, promptproof/
`-- tests/                      # the only coordinator Go test tree
    |-- layout_test.go          # rejects misplaced tests and production test imports
    |-- api/
    |   |-- inference/{contracts,request,response,...}/
    |   |-- provider/{contracts,trust}/
    |   `-- other-domain/{contracts,...}/
    |-- registry/{admission,autopilot,cachepersist,firstcontent,...}/
    |-- store/{cache,memory,postgres,contracts,shared,...}/
    |-- protocol/testdata/       # byte-identical cross-language wire fixtures
    |-- appattest/, mdm/, mediafetch/, payments/, billing/, ...
    `-- internal/{testkit,testdb}/

Before

flowchart TB
  C["Consumer request"] --> S["api.Server<br/>shared domain state"]
  P["Provider frame"] --> S
  S --> I["Consumer / provider functions<br/>admit, stream, cancel, settle"]
  I --> R["Registry and store<br/>live transitions and policy"]
  I --> O["HTTP / SSE result<br/>existing success or error"]
  T["Colocated tests<br/>private maps, locks and hooks"] -.-> I
  T -.-> R
  A["Command main<br/>assembly and shutdown"] -.-> S
  classDef input fill:#dbeafe,stroke:#2563eb,color:#172554
  classDef mixed fill:#fef3c7,stroke:#d97706,color:#451a03
  classDef stable fill:#dcfce7,stroke:#16a34a,color:#052e16
  class C,P,A,T input
  class S,I mixed
  class R,O stable
Loading

After

flowchart TB
  A["app + NewRuntime<br/>retain shared resources"] -.-> S["Routes / access<br/>same middleware order"]
  C["Consumer request"] --> S
  S --> I["inference.Owner<br/>one terminal / settlement owner"]
  P["Provider frame"] --> H["provider + trust owners"]
  H -->|"typed events, original ingress time"| I
  I --> B["Private operational components<br/>real claim / publish / transport stages"]
  B --> R["Registry, ledger and backends<br/>same atomic transitions"]
  I --> O["Response codecs<br/>same HTTP / SSE outcomes"]
  T["tests/domain<br/>retained constructor dependencies"] -.-> B
  T -.-> S
  G["Go discovery + layout guard<br/>mirrored race/coverage shards"] -.-> T
  classDef input fill:#dbeafe,stroke:#2563eb,color:#172554
  classDef owner fill:#ede9fe,stroke:#7c3aed,color:#2e1065
  classDef stable fill:#dcfce7,stroke:#16a34a,color:#052e16
  class C,P,A,T,G input
  class S,I,H,B owner
  class R,O stable
Loading

Blue represents callers, assembly and test discovery; purple represents explicit
production owners/components; green represents preserved transitions and outcomes.

Validation

Validated the strict-isolation follow-up from a clean checkout of signed commits
63f5f88a2 and dab7ba200, using a dedicated disposable PostgreSQL server.
Follow-up 859060a5f fixes large-list pre-push component detection, with a
failing-before/passing-after regression and all 20 runner/hook guards passing.
No production databases or coordinator endpoints were used. The clean checkout
includes the pinned libs/mlx-swift-lm submodule needed by documentation links.

Gate Evidence
Complete frozen declaration inventory All 4,444 original test/benchmark/fuzz/example declarations retained; 4,480 at the strict-isolation checkpoint, plus the subsequent live heartbeat wiring regression
Assertion, input and deterministic schedule preservation Original-name and scoped AST audits pass, including all 1,536 registry and 560 inference entries; original allocation and race controls retained
Zero coordinator tests outside mirror go test ./coordinator/tests -count=1 passes from the clean checkout
Normal isolated PostgreSQL suite Complete isolated runner passes from a clean checkout: 90.3 seconds
Full race/atomic coverage suite Complete isolated runner passes from the final clean checkout: 157.9 seconds; merged production-only atomic coverage retained
Mirrored runner working directories and coverage 20 offline runner/hook guards pass, including large-diff detection; complete clean-checkout race/coverage run passes
Media safety/accounting regressions Mediafetch race -count=10; all 35 inference-media cases race -count=5 pass
Provider trust strict isolation All 238 original names / 1,033 assertions-subtests / 111 concurrency operations retained; full normal/race, deterministic race -count=20, builds and vet pass
Prompt contract strict isolation All 51 original declarations / 230 assertions and exact fixture bytes retained; normal/race -count=5, deterministic race -count=20, bounded fuzzing and 14 Rust shared-vector/planner tests pass
Observation strict isolation All 94 original cases / 311 assertions / 106 loops / 2 goroutines retained; full normal/race, shuffled normal, scoped atomic coverage and repeated sink concurrency checks pass
Cross-language wire fixtures All 10 relocated JSON fixtures are byte-identical to the baseline; TypeScript consumers: 2 files / 3 tests pass; offline Rust shared-vector tests: 3 pass; catalog-generator tests: 4 pass
Uninstrumented adversarial numeric gate Passes in coordinator/tests/api/inference/request
CI-pinned lint, vet and formatting golangci-lint v2.1.6: zero issues in the final clean checkout; go vet ./coordinator/..., gofmt, and whitespace checks pass
Benchmarks and allocation controls Every coordinator benchmark smoke-runs with original workloads; repeated reservation guard remains 20/20 and TPS reads remain allocation-free
Linux build and E2E compilation Linux/amd64 coordinator cross-build, system E2E compilation and all testbed harness tests pass
Console UI Production build and lint pass; lint reports pre-existing warnings, no errors
Documentation lint/impact Clean-checkout docs lint: 330 files pass; impact check passes; 12 impact, 37 historical-link and 9 stamp regression tests pass
Independent review No remaining concrete findings after fixing a failed-commit App Attest retry outcome and strengthening the captured-attempt regression through the actual production deferred-recording operation; both fixes have failing negative controls and passing regressions
Clean checkout and signatures Complete normal/race tests, layout guard, Linux build, docs and pinned lint checked independently of the working tree; commits are SSH-signed

Core reproduction commands (set DATABASE_URL to a dedicated local disposable
PostgreSQL server, not production):

python3 scripts/test-coordinator-tests.py
python3 scripts/run-coordinator-tests.py --jobs 4
python3 scripts/run-coordinator-tests.py --race --jobs 4 --coverprofile /tmp/coordinator.cover
go test ./coordinator/tests -count=1
go vet ./coordinator/...
go test ./coordinator/tests/... -run '^$' -bench . -benchtime=1x
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build ./coordinator/...
make docs-check
make docs-impact-check BASE=origin/master

The coverage instrumentation scope changes with package isolation. Coverage
percentages are not presented as a like-for-like improvement. Local hardware-backed
provider E2E and Swift runtime tests were not run: this validation checkout does
not have the complete MLX-Swift build dependencies or a loaded provider model.
The seven Swift fixture consumers were reviewed for correct relocated paths.
No release, deployment, merge or provider-version bump is included.

Review Follow-Ups

Signed commits c0d23710e and 8ea5bf6b3 restore behavior-specific documentation
gates for relocated billing/settlement, Autopilot demand, inference metrics,
registry eligibility/gate/queue/candidate/quote-plan owners, and shared protocol
fixtures. The App Attest README now documents real component ownership and
mirrored test commands instead of selectors that discover zero tests.

The new guard covers 29 actual source/fixture paths, rejects every unrelated
canonical-document combination, accepts each allowed domain document, and
preserves Go test-file exclusions. All added cases failed before their respective
mapping fixes and pass afterward. All 13 docs-impact tests, 20 runner/hook guards,
documentation lint (330 files), and documentation impact checks pass.

Seven independent reviewers examined inference lifecycle/settlement, registry
concurrency/admission, cache routing/persistence, trust/security, storage/billing,
tooling/test preservation, and the targeted mapping patch. They found three
additional documentation/discovery gaps; all were fixed and re-reviewed. No
concrete introduced runtime regressions were found in the reviewed paths. Scoped
normal/race suites passed. To close the reviewers' PostgreSQL execution gap, the
full isolated coordinator race/production-coverage suite was rerun with a dedicated
local PostgreSQL server and passed in 151.8 seconds. No production code changed
in these two follow-ups, and this review is not proof of every possible interleaving.

Signed follow-up a21f76d1c removes the provider test-only owner overlay.
Heartbeat telemetry/benchmarks and deterministic inventory writer-failure tests
use explicit standalone component fixtures, not an embedded owner with parallel
heartbeat/inventory instances. The new live heartbeat contract checks the actual
composed owner through /ws/provider, including registry ingestion and telemetry
after an ordered drain barrier. The existing replacement contract checks actual
inventory/readiness wiring on the same socket. Deliberately miswiring the real
heartbeat or inventory constructor to another registry makes the corresponding
transport test fail; those negative controls were restored before publication.

All original named tests, assertions, race schedules and four heartbeat benchmark
workloads are preserved. Full provider normal/shuffled-race suites, repeated live
wiring race tests, benchmark execution, vet, pinned lint (zero issues), layout,
runner guards and docs checks pass. Independent re-review has no remaining
actionable findings. The pre-push complete Go suite passes. This follow-up changes
tests/documentation only, with no production behavior or test-accessor additions.

@vercel

vercel Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference Ready Ready Preview Oct 4, 2026 5:47pm UTC
d-inference-console-ui-dev Ready Ready Preview Oct 4, 2026 5:47pm UTC
d-inference-landing Ready Ready Preview Oct 4, 2026 5:47pm UTC
eigen-homepages-darkbloom Ready Ready Preview Oct 4, 2026 5:47pm UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-04T17:52:57.622489Z 3b49383 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Threat model review — advisory

Reviewed head 3b4938386d38 against base 48d2be458b3c.

Review not completed for this head. Previous findings are superseded, not confirmed resolved.
Review unavailable or invalid response; completed findings retained

Models: budgeted Sonnet / selective Opus / selective Sol 6.1. Findings require human validation; this review never requests changes or blocks merging.

Coverage: 0/0 source units; cross-file integration pending. 0 selected depth batch(es) pending. All threat definitions indexed; relevant full definitions selected. Unchanged callers are not scanned.

Cost this run: $0.0000 reported, $0.0000 reserved with unknown cost; 0 paid request(s), 0 reused batch(es), 0 provider cache-hit tokens.

Saved findings and earlier report · Historical findings are not confirmed resolved.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 965971abf9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Comment thread docs/architecture/billing.md Resolved
Comment thread scripts/docs-impact-rules.json Resolved
Comment thread docs/architecture/storage.md Resolved
jonathan308 added a commit that referenced this pull request Oct 4, 2026
…dinator

Upstream reorganized the coordinator (#1324): route bindings live in
coordinator/api/routes.go, handlers belong to domain owners, the store
backends are separate packages and every Go test lives under
coordinator/tests.

- Bind the three interest routes in routes.go with the same middleware and
  order; serve them from the accounts owner
  (coordinator/api/accounts/small_models_interest.go).
- Keep the contract in coordinator/store and move the backends to
  store/memory and store/postgres. The schema statement is still the last
  appended migration. The page-size clamp both backends share moves to
  coordinator/internal/store/shared.
- Move the tests to tests/api/accounts/contracts, tests/store/contracts and
  tests/store/postgres with the same names, cases and assertions. The
  storage-failure test now injects its failing store through the
  constructor instead of replacing a private field.
- Documentation: keep both sides, cite the new paths, add the interface to
  the store table (the union is now fourteen interfaces) and a navigation
  row for the feature.

The wire contract, SQL and console code are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 added a commit that referenced this pull request Oct 4, 2026
…zed coordinator

Upstream reorganized the coordinator (#1324): response assembly is owned by
coordinator/internal/inference/relay, dispatch by
coordinator/internal/inference/dispatch, provider ingress and the queue
placeholder by coordinator/api/inference, and every Go test lives under
coordinator/tests.

- Account each decrypted chunk in Owner.HandleChunk before it is classified
  or queued, and normalize the coordinator-only response_limit terminal in
  handleInferenceErrorOwned, as before.
- Budget the assembler in relay.Controller.NonStream (held first chunks and
  channel chunks), every dispatched attempt in dispatch.Plan.Dispatch, and
  the queue placeholder in Primary.Run.
- The limits-to-budget rule, which the owner, the dispatcher and the relay
  all need, is the small package
  coordinator/internal/inference/responselimit. registry.ResponseBudget and
  both environment variables are unchanged.
- Move the eleven tests, with the same names and assertions, to the owners
  they exercise: tests/api/inference, tests/api/inference/failure,
  tests/api and tests/registry.
- Documentation: keep both sides, cite the new paths, and note the limit in
  the coordinator component map, the error-vocabulary row and consumer
  billing troubleshooting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 added a commit that referenced this pull request Oct 4, 2026
…oordinator

Upstream reorganized the coordinator (#1324): admission is owned by
coordinator/api/inference (Admission), self-route availability by
coordinator/internal/inference/routeplan, and every Go test lives under
coordinator/tests.

- Admission.Run owns the scan permit, releases it, then applies the
  returned terminal action; Admission.evaluate holds the gates. The
  statements are those of the original change.
- The self-route split lives where master moved its body:
  Availability.Rejection returns the terminal action and
  Availability.Unavailable wraps it, so the media-resolution caller keeps
  its immediate response.
- shedIfUnservable returns its terminal action instead of applying it.
- Move the two test files to tests/api/inference with the same ten tests
  and 42 subtests, on the scan gate's real Acquire/Release/InFlight
  boundary. One assertion that read the Autopilot demand's private
  finished flag is not expressible there; the handler-exit Finish
  assertion still pins it for the public modes.
- Documentation: keep both changelog entries, cite the new paths, and note
  the permit scope in the API contract and the navigation guide.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 added a commit that referenced this pull request Oct 4, 2026
…ation onto it

The base of this change (the offline conformance suite) now sits on the
reorganized coordinator (#1324): the request prelude is owned by
coordinator/internal/inference/prelude and every Go test lives under
coordinator/tests.

- The fix is still one statement: Parser.Parse removes the caller's
  top-level user and metadata fields right after the request date is
  pinned, so every provider-bound body derives from the minimized map.
  The helper moves with it, private to the prelude package.
- Master does not omit either field on its own: with the statement
  removed, both reach the provider on all four endpoints.
- Move the tests, with the same names and assertions, to the packages
  master split the old one into: tests/api/inference/contracts (the HTTP
  cases and the response oracle), tests/api/inference (prelude, field
  shapes, prepared cache controls, stop normalization) and
  tests/api/inference/providerwire (candidate body parity). The contracts
  package gains a copy of the retry fixture its neighbour already has.
- Documentation: keep both sides, cite the new locations, and add a
  navigation row for the prelude.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
davidtai added a commit that referenced this pull request Oct 5, 2026
Port the log redaction onto the #1324 coordinator layout. Each redacted
log field now lives in its new owner file; the personal-data log tests
move to coordinator/tests/api (package api_test) and run through the
composed router.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
davidtai added a commit that referenced this pull request Oct 5, 2026
Port the explored-provider pricing onto the reorganized registry:

- forecast: split IdleEvidenceGap out of EvidenceExplorable and add
  ExplorationReplacesRate (the per-rate age rule).
- performance.Rates: ExploredPrefill/ExploredDecode replace the own rate
  after a reviewed profile point in Prefill and EffectiveDecode;
  ProjectedDecode keeps its own chain, as before.
- registry: fillExplorationRates stores the replaced medians on the
  snapshot once per fill; resolve*TPS, candidateSnapshot.rates() and the
  cache service cost pass them on, and commit skips NoteTTFTPrediction
  for a median-priced candidate. TPSRegistry gains the isolated-prefill
  store, fed by the heartbeat.
- candidatearena.ChunkSize 55 -> 53: candidateSnapshot grew by two
  float64 fields, and the size-class test requires a retune.
- Tests move to coordinator/tests/registry and use exported and
  internal APIs only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
davidtai added a commit that referenced this pull request Oct 5, 2026
Port the goose migration runner onto the #1324 layout.

- The runner moves to coordinator/store/postgres/migrations.go and
  replaces the boot-time statement slice there. The SQL baseline and the
  pg_dump move to coordinator/store/postgres/schema/. The baseline is
  unchanged: its 255 blocks equal, byte for byte, the statements that
  master's migrate executes on a fresh database (pgx trace of master and
  of the old merge base are identical).
- The DDL constants that only the old slice used are deleted, including
  the internal cachemigrations package, privacysql and
  profilesql/schema.go; tests read those statements from the baseline.
- The migration tests and their harness (baselineStatement,
  forgetMigrationVersions, replayMigrations, loadSchemaFile,
  schemaSnapshot, queryLines, assertSameLines) move to
  coordinator/tests/store/postgres/ and use NewPostgres through the
  fixture. TestConcurrentMigrationsApplyOnce now holds the goose advisory
  lock while two coordinators start, so it fails at once when the runner
  does not take the lock.
- The DAR-349 dedupe guard also scans the SQL migrations.
- Docs and the docs-impact rules use the new paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
davidtai added a commit that referenced this pull request Oct 5, 2026
Master #1324 moved every coordinator test under coordinator/tests/ and
deleted coordinator/appattest/service/fixtures_test.go. The merge takes
master's deletion; the next commit ports the added helpers and tests to
the external test packages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 added a commit that referenced this pull request Oct 5, 2026
…budget onto it

The base of this change now sits on the reorganized coordinator (#1324):
the receipt tracker is coordinator/internal/registry/cachetracker, plans
and claims are coordinator/internal/registry/cacheplan, and every Go test
lives under coordinator/tests.

- cachetracker/attempt_budget.go holds the charge formula
  (CacheAttemptCharge), its checked arithmetic, the per-generation byte
  ledger (AttemptBudget) and the detachment of every retained string.
- Tracker.StoreAttemptLocked reports admission and refuses a record that
  would exceed the ledger; removal refunds the stored charge; terminal,
  lookup and READY updates keep the admitted charge and store under a
  cloned nonce.
- cacheplan gains Plan.Detached and Claims.Len, which the charge and the
  detachment consume.
- registry: PreparePrefixCacheV2Attempt publishes the owner from the
  admitted record and leaves the request uncached when admission is
  refused, as before the move. CacheDependencies.AttemptBudgets constructs
  the ledger for each generation, like the other per-generation
  components; the default is the same 64 MiB.
- Tests: the 16 new tests keep their names and assertions and move to
  coordinator/tests/registry with the six edited fixtures. They read the
  ledger and the indexes through the injected generation components
  instead of private tracker fields.
- Documentation: keep both sides and cite the new locations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 added a commit that referenced this pull request Oct 5, 2026
… onto it

The base of this change now sits on the reorganized coordinator (#1324),
where the prompt-sidecar client and preload controller live in
coordinator/internal/promptcontract/{sidecar,preload} and every Go test
lives under coordinator/tests.

- Cache planning (the planner and its telemetry) moves to
  coordinator/internal/inference/routeplan, beside the memo that consumes
  it; Owner.NewCachePlanner binds it, like NewAliasPlanner.
- The sidecar client's planning admission (bounded pending plans and
  bytes, cancellation, per-pool connection budgets) and the per-contract
  preload readiness go into master's sidecar and preload packages; the
  public promptcontract files keep master's text plus the wiring.
- The Rust sidecar files are byte-identical to the pull request.
- Tests move with their names and assertions to coordinator/tests/api/
  inference, tests/promptcontract, tests/registry and tests/cmd/
  promptsidecarloadproof. Eleven tests that read the sidecar client's
  private admission state and connection pools are not carried in this
  commit; they follow with an injected dependency.
- Master's TestPreloadControllerComposesRealOwnersForEmptyCatalog expected
  an empty catalog to make the controller ready. This pull request closes
  participation for an empty verified set instead, so the test now checks
  the same composition against that outcome.
- Documentation: keep both sides, cite the new locations, two navigation
  rows for the new owners; three changelog bullets in "cache reliability".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 added a commit that referenced this pull request Oct 5, 2026
…tive set onto it

The base of this change now sits on the reorganized coordinator (#1324):
the preload controller lives in coordinator/internal/promptcontract/
preload, cache planning in coordinator/internal/inference/routeplan, and
every Go test under coordinator/tests.

- The demand-based active set, selection order and conflict handling sit
  beside the preload controller in internal/promptcontract/preload,
  private as written. Above capacity it loads only contracts with demand,
  so more than eight verified contracts no longer turn cache planning off
  for every model.
- The verified-artifact handoff moves to internal/promptcontract/catalog;
  the public provisioner adds the closed check. Planning changes go into
  routeplan; the registry projection callback is a method of the
  inference owner; cache_plan_preflight.go and cache_preload_identity.go
  stay in coordinator/registry.
- e2e changes are carried line for line.
- Tests move with their names and assertions to coordinator/tests. 32 new
  tests that drive the private active-set policy or the controller's
  private clock and lock are not carried in this commit; they follow with
  injected dependencies. Master's
  TestPreloadControllerDiscardsChangedGenerationsDuringPreload gets a
  verified aggregate in its setup, the same synthetic-setup change this
  pull request makes to its own tests.
- Documentation: keep both sides and cite the new locations; changelog
  bullets in "cache reliability".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 added a commit that referenced this pull request Oct 5, 2026
…n onto it

The base of this change now sits on the reorganized coordinator (#1324).
This part is provider (Swift) code plus one coordinator test and
documentation, so little moves:

- The provider sources and tests merge unchanged; the reorganization did
  not touch them.
- TestDiagnosticCacheEpochFanout moves to coordinator/tests/registry as
  an external test. It registers the two-model provider through the real
  registration path, seeds holders through the generation's tracker, and
  reads the epoch-change removals from the lifecycle status and the
  injected holder directory instead of private tracker fields. Same
  assertions.
- A comment in SSDHybridCheckpointStore+ReadAttempt.swift no longer names
  a superseded SDK pin (from the private remediation reviewed on
  2026-10-03).
- Documentation: three pages conflicted only in their freshness stamps.
  The changelog's three bullets move into this stack's "cache
  reliability" section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 added a commit that referenced this pull request Oct 5, 2026
…he tests onto it

The base of this change now sits on the reorganized coordinator (#1324).
This part adds no production code: composed tests, a benchmark and
documentation.

- The six composed cache-planning test files move to
  coordinator/tests/api/inference as external tests, where the planning
  fixtures and the retained reservation controller live. All six tests,
  their subtests and assertions are kept.
- The generic preparation baseline and its benchmark move to
  coordinator/tests/api/inference/contracts beside the bench fixture,
  which gains the optional dispatch observer and testing.TB cleanup.
- The three polled reads of the outstanding service hold go through
  conformance.OutstandingServiceHold on the fixture's reservation
  controller instead of a private map.
- The response oracle the composed tests share with the privacy contract
  tests is copied into the owner test package.
- Documentation: test commands and cited paths follow the new layout.
  The changelog needs no entry of its own; its bullets already sit once
  in "cache reliability".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gajesh2007 pushed a commit that referenced this pull request Oct 5, 2026
#1324 moved coordinator/api/dispatch.go to
coordinator/api/inference/dispatch.go. The design record still linked the
old path, so docs-check fell back to history. That lookup stopped at the
legacy stamp commit 973e14b from #1245, which is not in master history,
and docs-check failed.

Point the "Reservation, plans and retries" code-map link at the new file,
the same home that architecture/first-content-routing.md cites for
dispatchState. The record status is "In progress", the column is "Current
integration point", and the freshness stamp stays unchanged because this is
a path move only.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

4 active deployments
Preview – d-inference — 3b493838 Deployed Oct 4, 2026 by vercel[bot]
Preview – d-inference-console-ui-dev — 3b493838 Deployed Oct 4, 2026 by vercel[bot]
Preview – d-inference-landing — 3b493838 Deployed Oct 4, 2026 by vercel[bot]
Preview – eigen-homepages-darkbloom — 3b493838 Deployed Oct 4, 2026 by vercel[bot]
benchmarks — 3b493838 Deployed Oct 4, 2026 by Gajesh2007 via E2E Benchmarks #2178
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.

2 participants