Skip to content

ADR 0004 phase 5: unify pricing resolution and offline-first catalogue refresh #10295

Backlog
1 of 1 issue completed

Description

@lpcox

Objective and dependencies

Implement ADR 0004 Gate 5. Parent: #10290. Phase 3 (#10293) is complete in #10317 and is no longer a blocker. Can develop alongside Phase 4; refresh-triggered harness re-evaluation must integrate with Phase 4 before this phase closes. Use bounded PRs to finish the remaining shared/component resolution, scoped input migration and parity work, reusing the shipped refresh integration.

Delivered runtime integration and remaining boundary (2026-10-31 UTC)

Still open: full shared/component/tier resolver and governed-import provider-scope migration; old-authoritative shadow/parity evidence for remaining legacy/maintained resolver replacement; complete decimal/assembled-tariff/expiry/promotion coverage; Phase 4 overlays and complete supported-path actual-harness producers/enforcement (the shared re-evaluation API is delivered in #10878). The shipped loader must not be described as unimplemented or rebuilt to satisfy these residual criteria.

The current publication projection is reviewed maintained Copilot pricing, not a raw OpenRouter export or evidence of executable models. Governed import refreshes can change legacy bundled fallback lookups without changing the published feed; latest publication 41089597313 passed with unchanged. #10029 remains open; assess its current named evidence/activation criteria rather than treating imports or already shipped curated entries as completion.

Eligibility handoff update (2026-11-04 UTC)

#10878 completed #10877's shared scoped eligibility decision and immutable request-pinned re-evaluation API with real consumer integration. That interface is no longer an unimplemented Phase 5 dependency. #11057/#11064 add shared observation-report pinning and a Cloud Hypervisor primary-guest producer on main, not yet in v0.29.6.

User-confirmed supported targets: cloud-hypervisor, nvx, docker, and arc/dind only. ARC/DinD is a Docker deployment topology, not a separate runtime backend. sbx is unsupported; historical enum/backend names (including runc/gVisor/Kata) are not additional product support targets. Do not count sbx coverage toward phase completion or plan new sbx work.

Docker/ARC-DinD and NVX observations and complete enforcement remain open; primary evidence cannot stand in for per-enclave/session evidence. Deterministic fixtures are not live guest validation. Bundled constraints remain empty and feed constraints remain rejected as catalogue_harness_unsupported. Do not use the new API as authorization to activate them.

Active bounded resolution/parity work

  • Phase 5: authoritative shared pricing cutover and provider-free smoke validation #11111 — shared pricing resolution with legacy-authoritative shadow parity. Start on current main in an isolated worktree; preserve current accounting, warning/undercount policy and request pins. Compare candidate results on identical captured inputs, record sanitized differences, and retain full exact-decimal/component/import-scope/cutover gates as later work. Reuse shipped loader/updater/naming and do not couple this work to microVM invocation or compiler-overlay implementation.

Scope

Move accounting to the shared provider/channel/deployment-scoped resolver. Resolve per component/tier using operator overlay -> existing configured catalogue v1 -> complete fresh provider observation -> validated fresh central snapshot -> maintained record -> governed import -> explicit policy fallback, with field-specific applicability rules. Preserve the shipped configured-catalogue authority above runtime observations; configured data is not reclassified as fetched central data. Preserve existing credit calculations unless an intentional correction is separately reviewed.

Represent exact decimal accounting, long-context thresholds, units/currency, cache prices, non-token charges where needed, effective dates, promotions/successors, dynamic-selector ceilings, and #10757's warning/undercount policy for unpriced models. Mixed-source tariffs are assembled, with per-component provenance; fill omissions only when scope, token applicability, units, currency, and effective dates are compatible. Missing is not zero. Provider-advertised discounts stay informational and never lower maxAiCredits accounting.

Reuse the configurable central feed/local snapshot, enabled/offline mode, bounds, authentication, atomic validation and private source/schema-partitioned cache shipped in #10494; do not implement a second loader. Source replacement must not contact the default or another unconfigured endpoint. Assume the default feed is blocked: approved operator/workflow/bundled fallback permits startup; never implicitly allowlist or bypass a denial. Pin each request's tariff/time/revision; refresh never reprices past usage. Integrate fresh harness constraints before subsequent dispatch.

Wire governed provider-qualified models.dev fallback for unsupported/custom pricing providers without requiring native adapters or runtime access to models.dev. Imported pricing does not imply execution, availability, or protocol support.

Entry points: containers/api-proxy/{ai-credits-pricing.js,provider-pricing-overlays.js,runtime-model-catalog.js,models-dev-catalog.js,guards/ai-credits-guard.js}, usage/accounting consumers, Phase 2 source config, and Phase 4 eligibility.

Acceptance criteria

Non-goals

Do not publish centrally reviewed feeds (Phase 8), infer request-level promotion eligibility, silently use expired data, or add /reflect/v2. Retain legacy adapters until Phase 9's release/parity gates.

Sub-issues

Sub-issues

1 of 1 Issues completed
Loading 1 sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions