Skip to content

fix(provider): keep newest performance observation timestamp - #1398

Closed
darkbloombugs wants to merge 6 commits into
Layr-Labs:masterfrom
darkbloombugs:bugfix/measurement-observation-order-20261008
Closed

darkbloombugs wants to merge 6 commits into
Layr-Labs:masterfrom
darkbloombugs:bugfix/measurement-observation-order-20261008

Conversation

@darkbloombugs

@darkbloombugs darkbloombugs commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Completed performance observations can reach the provider bridge out of timestamp order. EnginePerformanceMeasurements.Rate.observe overwrites its timestamp with each receipt, so a late older receipt can make fresh evidence appear expired and make the next sample reseed across a false evidence gap.

Keep the newest timestamp with at = max(at, now). The same private rate owner serves aggregate, current-posture and workload-bucket observations. Existing receipt-order EWMA contributions, sample counts, completed-work counters and independent shape buckets remain intact.

Before

flowchart TD
  E["Newer engine observation, then delayed older terminal"] --> B["EngineV2Bridge records completed work"]
  B --> R["Rate.observe replaces at with older timestamp"]
  R --> X["Snapshot age and expiry move backward"]
  X --> O["Fresh evidence disappears; next sample sees false gap"]
  classDef input fill:#fef3c7,stroke:#b45309,color:#78350f
  classDef code fill:#dbeafe,stroke:#2563eb,color:#1e3a8a
  classDef failure fill:#fee2e2,stroke:#dc2626,color:#7f1d1d
  class E input
  class B,R code
  class X,O failure
Loading

After

flowchart TD
  E["Same observations and terminal delivery order"] --> B["Same bridge accounting and receipt-order EWMA"]
  B --> R["Rate.observe keeps max of observation timestamps"]
  R --> F["Snapshot age and expiry follow newest observation"]
  F --> O["Fresh evidence remains; real forward gaps still reseed"]
  classDef input fill:#fef3c7,stroke:#b45309,color:#78350f
  classDef code fill:#dbeafe,stroke:#2563eb,color:#1e3a8a
  classDef success fill:#dcfce7,stroke:#16a34a,color:#14532d
  class E input
  class B,R code
  class F,O success
Loading

Amber is completed work, blue is the production code path, red is incorrect freshness, and green is the corrected result.

Current refresh validation (October 9)

Signed refresh 2574f44f7ef479819f23693a26ff1576f5a5561b includes master cea374e88c1fd970859fccc949e3bb5f51513874. Production code and regression tests remain unchanged from the previous public head. The incoming provider build-environment and retired development-host changes are retained. The changelog preserves all incoming entries and this fix once; canonical documentation was reverified for October 9.

  • swift build --build-tests --jobs 2 --force-resolved-versions: full test executable builds.
  • swift test --skip-build --no-parallel --filter EngineMeasurementOrderingTests: 4/4 pass; the focused selection passes again after review.
  • Broader documented CPU selection: 55 tests in seven suites pass, no skips; separate BuildEnvironmentTests: 4/4 pass, checking compiled production defaults and pure URL resolution.
  • Final make docs-impact-check BASE=cea374e88c1fd970859fccc949e3bb5f51513874: six-file delta passes. make docs-check: 368 files pass. The earlier c93380 historical-link failure is retained in local evidence; master now contains the source-citation repair.

Independent exact-patch correctness review and dedicated refactor assessment found no actionable issue and recommended no cleanup changes. Review included the actual code/callers, retained failing baseline and current validation logs; the reviewer did not rerun tests independently.

Normal commit and push hooks passed. The signed refresh was pushed non-force to private staging before the existing public branch, and GitHub verifies its signature. Hooks that traverse coordinator tests run without database/service credentials; database-dependent skips do not qualify a PostgreSQL lane. Checks use pinned installed dependencies, the existing CPU lane, at most two jobs, and a 590-second command limit plus up to ten seconds for teardown.

Validation still uses the actual measurement owner and bridge with the existing scripted engine and synthetic usage/clock boundaries. It does not qualify GPU/model inference, native hardware, a live fleet, or the general provider runtime suite. Receipt-order averaging and the separate combined-prefill scalar reset policy remain unchanged.

The PR was marked ready for code review on October 10, 2026. Latest-head CI and reviewer/approval gates are separate from these local results. No merge, deployment or release is requested.

Reproduction and validation (original reproduction)

Base: e3575b993cb56f1930b9ee7825c0d0553410e820; Apple Swift 6.3.2 on macOS 26.3.1 arm64. Local SDK pin: 3fd4944c3b3ee5cb45c5cbfac8805876332d3a29. Checks use existing pinned dependencies, two build jobs, sequential tests and 600-second command caps.

  • Unchanged-source baseline: swift test --skip-build --no-parallel --filter EngineMeasurementOrderingTests — 2 tests fail with 10 assertions; 2 controls pass. The owner reports age 122,000 ms instead of 1,000 ms, loses aggregate/qualified/shape freshness, and reseeds the next sample to 500 instead of 1,151 TPS.
  • A second regression submits two real EngineV2Bridge requests against the existing scripted engine, captures actual monotonic completion timestamps, then delivers their terminals in reverse order. Decode expiry moves backward on baseline. Both requests and all 32 generated tokens are still counted.
  • Identical regression with the one-line fix: 4/4 pass, preserving rate averaging and counters. Ordered/equal timestamps, true forward gaps and independent recordAggregate: false buckets are controls.
  • Broader selected CPU checks: 55 tests in 7 suites pass, covering bridge prefill and atomic deadline behavior, cancellation/accounting, calibration, posture epochs, recovery state, native media numeric observations, wire compatibility and heartbeat materiality.
  • Final swift build --build-tests --jobs 2 --force-resolved-versions passes. The final 55-test CPU selection passes after the refactor review. make docs-impact-check BASE=e3575b993cb56f1930b9ee7825c0d0553410e820 passes for the six-file delta; make docs-check passes for 363 files.
  • Dedicated refactor review found no structural cleanup needed; its three wording clarifications are integrated. A separate correctness reviewer verified exact patch/source identity, real caller reachability and the retained failing/passing evidence. Both reviewers approve the final patch; neither independently ran tests.

The architecture, measurement-age reference, regression guide and topical Unreleased changelog are updated. No wire fields, dependencies, configuration or release version change.

Scope and limitations

This is a reproduced provider measurement defect. The tests execute the actual measurement owner, bridge event pump, terminal accounting and capacity projection, with an existing scripted engine and synthetic numeric usage. The 121-second boundary uses a synthetic clock; the bridge ordering case captures real timestamps after submission. No fleet incident, live inference, GPU/model, hardware or coordinator routing qualification is claimed.

The full test target compiles and links, but make provider-test and its general/native GPU lanes are not run under the CPU-only scope. Initial setup failures (a relocated compiler cache and a corrected test-fixture integer type) are retained separately and excluded from the failing-baseline proof.

The fix preserves receipt-order averaging, including delayed samples; it does not introduce timestamp-sorted reweighting or sample rejection, change posture-epoch qualification, or revise the separate combined-prefill scalar reset policy. The completed/partial-prefill cancellation work in merged #1233 is distinct. Fresh deduplication of all 89 open PR file lists, 81 all-state search-matched PRs and owner history found no usable equivalent fix, including #1326 and #1354.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@vercel

vercel Bot commented Oct 8, 2026

Copy link
Copy Markdown

@darkbloombugs is attempting to deploy a commit to the EigenLabs Team on Vercel.

A member of the Team first needs to authorize it.

@darkbloombugs
darkbloombugs marked this pull request as ready for review October 10, 2026 14:57
@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Threat model review — advisory

Reviewed head c4f88a49e91d against base eaaf5e6156fa.

Review not completed for this head. Previous findings are superseded, not confirmed resolved.
normal spending limit reached; remaining coverage deferred

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

Failure diagnostics: REVIEW_BUDGET_STOPPED

Coverage: 26/38 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.5091 reported, $0.0000 reserved with unknown cost; 6 paid request(s), 0 reused batch(es), 58855 provider cache-hit tokens.

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

@darkbloombugs

Copy link
Copy Markdown
Contributor Author

Maintenance candidate 72fee264f36884e8aac0378e74d720a47838aef0 was qualified against integrated master 52b8fd9bc89e546ff75f5007dc2a33476c48178b. The timestamp fix/tests are unchanged; upstream history was preserved and this PR’s changelog note moved into its own fragment.

Fresh candidate compilation used copied local dependency/build caches: the first single-job attempt hit its preserved 590-second limit, then a sequential continuation succeeded in 586.490 seconds. 59 distinct functions / 64 cases passed, including ordering and build-environment tests; the separately rerun four ordering tests overlap that total. Checks on that candidate passed 14 changelog tests, five fragments, 368 documents and six-file documentation coverage.

Newer master 7796fe2a1dadcc9b3795dec359be475325e5ad09 (#1439) changes release workflows/tooling and documentation. Provider source/tests, package inputs and dependency gitlinks are unchanged between those master pins. The newer combined tree, release changes/new checks and changed documentation were not newly built or tested here; no source refresh or additional push occurred.

The baseline’s two failing tests / ten assertions and two passing controls remain historical, not freshly executed against master. This does not qualify the full provider runtime suite, live inference, GPU/model execution, hardware performance or coordinator routing. CI/reviewer gates remain; advisory review stopped with HTTP 409 at 0/52 units. No merge or deployment.

@jonathan308

jonathan308 commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Reviewed remote head 72fee264f36884e8aac0378e74d720a47838aef0.

Source review found no actionable defect in the timestamp fix. max(at, now) preserves the newest engine observation for aggregate, qualified and workload-bucket freshness while retaining receipt-order averaging and counters. Snapshot/receipt time does not renew evidence, and existing posture-epoch qualification remains in place.

A signed local refresh against master 5dc5313e5201e8d84db15adc153ceaf56147cc71 resolves the two documentation conflicts while preserving all incoming qualification guidance; the production fix and ordering regression are unchanged.

Fresh validation of local candidate 2dde5b4adcd56125ad2fa47111e34ef5b71a45b2: the Swift test build and all 59 selected CPU tests pass, including the four ordering regressions and related freshness, deadline/posture-epoch, calibration, sampling and configuration checks; no skips. Against exact current-master production code, the unchanged ordering assertions reproduce two failures (10 assertions), while both controls pass. Restoring the exact signed candidate, rebuilding and rerunning all 59 tests passes again. This includes the real bridge's reversed terminal delivery; observation clocks are not replaced with receipt/snapshot time.

Documentation impact/checks, changelog checks and 31 Python tooling tests also pass. No GPU/model, live-fleet or native Apple qualification is claimed.

Publication is held: these non-draft PRs trigger the paid-capable threat-review workflow on synchronize, whereas this task explicitly excludes paid execution. Existing ordinary CI/Contribution Policy/Integration/E2E runs are action_required, Vercel requires team authorization, and advisory review coverage is incomplete. These are not passing gates. No approval, merge, deployment or workflow change is claimed.

@jonathan308

Copy link
Copy Markdown
Collaborator

Refreshed onto master b32e9008 and re-validated.

Conflicts fixed: docs/architecture/inference.md, docs/developer/test.md, docs/reference/protocol-messages.md. These were "Last updated" date stamps, and the test paragraph moved into a short "Performance Observation Ordering" section of master's restructured test.md. No source change.

Proof:

  • With the fix: EngineMeasurementOrderingTests passes (4 tests).
  • Without the fix (EnginePerformanceMeasurements.swift reverted to master): 2 tests fail with 10 assertions: the aggregate/qualified/shape expiry test and the reversed real-bridge terminal delivery test.
  • docs, docs-impact and changelog checks pass.

Review checked master's #1446 calibration paths. Nothing depends on at being the last-received timestamp, and the reseed check handles a negative now - at correctly.

Non-blocking follow-up: EngineV2Bridge+RateObservations.swift:30-32 calls freshRate(..., now: value.at), so a late, older cold-prefill sample can still reset prefillEwmaInitialized. That bug predates this PR and is outside its scope.

davidtai
davidtai previously approved these changes Oct 21, 2026

@davidtai davidtai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed. at = max(at, now) is the right one-line fix: freshness tracks the newest observation while EWMA order and counts stay receipt-ordered, and the reseed check already handles a negative now - at. Wire format unchanged. Approving; merge once the approved CI run is green.

Keep both the Performance Observation Ordering and Watchdog Launch Evidence
sections of docs/developer/test.md.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

@davidtai davidtai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-approving after resolving a docs-only conflict in docs/developer/test.md (kept both the Performance Observation Ordering and Watchdog Launch Evidence sections). No source change; the one-line max(at, now) fix is unchanged.

@davidtai
davidtai requested a review from jonathan308 October 21, 2026 11:29
Gajesh2007 added a commit that referenced this pull request Oct 22, 2026
* fix(provider): correct the deadline-admission rate estimators

Deadline refusals on ordinary engines (each one a failover hop, then
another queue and prefill elsewhere) came from three estimator defects:

- Decode was charged per running row against a per-request EWMA, about B
  times too much at batch width B (#1521), and every MTP row was charged
  its full 1+k draft width. The bridge now measures each completed
  request's decode-step shape (rows, confirmed tokens and assigned width
  per step), smooths and resets it with the decode EWMA, and passes it to
  the SDK's per-batch charge. A request carrying a reviewed deadline
  calibration gets no shape: its calibrated conversion and its fallback
  keep the per-row charge its error envelope was measured against, so
  serving qualification's two-conversion proof (calibratedPathProven)
  still holds. The deadline catalog is empty, so no production request
  carries a calibration today.
- One externally contended "isolated" prefill sample after an idle gap
  replaced the estimate and could lock an ordinary EngineV2 engine out
  until restart (#1429). Admission now prices no lower than one eighth of
  the startup calibration cell's idle rate, and restores that rate when
  the evidence expired while the engine sat idle at nominal posture.
  Evidence older than 30 minutes on an idle engine is treated as absent,
  anchored or not, because a calibration cell can itself run under
  another process's GPU load. Published rates are unchanged.
- A late older completed observation moved freshness backward (the fix
  of open #1398, max(at, now), carried here with its test) and could
  restart the combined prefill EWMA.

Deadline decision and request-profile telemetry keep their wire fields,
but projected_service_us is no longer the per-row formula of the
projected tokens and rates. DARKBLOOM_TTFT_ADMISSION_FIXES=0 restores the
previous estimators.

libs/mlx-swift-lm moves to the per-batch charge commit on SDK main.
SDK main's Package.swift requires mlx-swift 81f58d79, whose
GPU.CommandBufferLimits (mlx-swift #57) MLXLMCommon uses, so
libs/mlx-swift moves to that commit and libs/mlx to its nested MLX
71271f08 (mlx #36). That MLX change is host-side only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(provider): forward the admission-estimator rollback to launchd

launchd does not inherit the installing shell, so a
DARKBLOOM_TTFT_ADMISSION_FIXES=0 export reached only a foreground
provider: the background provider job kept the corrected estimators, and
restarts and watchdog recovery reuse its saved plist. Add the key to
LaunchAgent.inferencePassthroughEnvKeys beside
DARKBLOOM_PREFILL_DEADLINE_MODE, so darkbloom start persists it into the
provider plist. The watchdog plist stays without it: it never runs
inference.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(provider): tidy deadline-admission comments, docs and coverage

Behavior-preserving follow-up from the independent refactor pass:
- IsolatedPrefillAdmissionRate.resolve drops its freshness parameter,
  which no caller passed, and reads EnginePerformanceMeasurements.freshness.
- ServingQualificationDeadlineEvidence said the SDK has exactly two
  service conversions. That now holds only for requests carrying a
  reviewed calibration, which get no per-batch decode shape; say so.
- Add AdmissionRateEstimatorTests.completedRequestRecordsDecodeShape: a
  scripted request finishes through the real bridge event pump and its
  terminal timing must reach the decode-shape estimate. Dropping the
  decodeShape argument in recordPerformanceFinish failed no test before.
- inference.md: a step costs one measured step only while it is no wider
  and has no more decode rows than the measured steps; it said a plain
  step costs one cadence whatever its batch size. Split the estimator
  paragraph and list AdmissionRateEstimators.swift in the code map.
- prediction-decision-telemetry.md: MTP rows can be charged fewer than
  1+k tokens without dropping to one.
- Changelog: subject-verb agreement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(provider): move libs/mlx-swift-lm to the SDK refactor-pass commit

4b8a1bbd adds the paired SDK PR's refactor-pass follow-up on top of
51773fe1: documentation comments in FirstTokenDeadlineAdmissionV2.swift
and the request fixture of one unit test. No library code changes, so
the provider build and its metallib are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(provider): trim line endings from the admission-estimator rollback value

DeadlineAdmissionFixes.resolve trimmed only .whitespaces, so a
DARKBLOOM_TTFT_ADMISSION_FIXES value ending in a line ending (from a file
or a deployment template, which LaunchAgent forwards to the provider job
unchanged) matched none of 0/false/no/off and silently left the
estimator corrections on. Trim .whitespacesAndNewlines, as the other
documented "trimmed, case-insensitive" rollbacks do
(MiMoV26WiredResidency.isEnabled, MiMoV26DecodeDefaults.isEnabled).

killSwitchParsing now covers newline-terminated off and on values, and
forwardsDeadlineAdmissionRollbackToProviderJob checks that a forwarded
"off\n" still disables the corrections in the job. Both fail with the
previous trimming.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(provider): state deadline-admission estimator effects in hardware support

docs/AGENTS.md maps native admission changes to both
architecture/inference.md and architecture/hardware-support.md; the
estimator corrections updated only the former. Add a "Deadline admission
rates" section: the corrections grant no memory and leave KV grants,
load quotations, activation floors, serving width and memory concurrency
unchanged; the MTP depth charge follows the chip's automatic
verification envelope; the isolated-prefill anchor is the serving Mac's
own startup calibration and is restored only at nominal posture, so Low
Power Mode or a non-nominal thermal state keeps only its floor. List the
estimator sources in the code map.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(provider): cite the measurement producer by full path and symbol

The newest-observation age rule cited a bare
EnginePerformanceMeasurements.swift, which docs-check cannot resolve.
Cite
provider-swift/Sources/ProviderCore/Inference/Engine/Bridge/EnginePerformanceMeasurements.swift
and EnginePerformanceMeasurements.observe, which applies the rule to the
aggregate, current-posture and workload-bucket series.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Re-pin libs/mlx-swift-lm to the merged SDK change (#329)

Layr-Labs/mlx-swift-lm#329 squash-merged as e28f89de ("fix(cbv2): charge first-token deadline decode once per batch step (#329)").
Move the gitlink from the PR branch head 81f0ef74 to that commit on SDK main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(provider): bound only the aggregate prefill rate, on a whole-Mac idle check

Two corrections to the anchored isolated-prefill rate on ordinary engines.

The one-eighth startup-anchor floor was applied after the fresh
prompt-size bucket had tightened the rate, so it could raise a fresh,
legitimately slow long-prompt bucket: a 5,000 tok/s 512-token anchor
priced a fresh 100 tok/s 32K-prompt bucket at 625 tok/s. The floor now
bounds only the aggregate, and the fresh bucket still tightens the
result afterwards. Bucket evidence expires after 120 seconds, so this
cannot bring back the restart-long lockout.

Restoring the idle anchor, and treating evidence older than 30 minutes
as absent, checked only this bridge's own requests. On a multi-model
provider another resident model could be using the GPU. Both now also
require that the shared whole-Mac service budget holds no other
model's lease and no load, encoder preparation or cache transfer
(WholeMacServiceBudget.isIdle(except:)); the request's own lease does
not count. Without a shared budget the bridge-local check remains.

Regression tests: freshLongPromptBucketBelowFloor and
otherModelWorkKeepsAnchorOff fail with either change reverted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(provider): smooth decode step time together with its shape

Per-batch decode charging prices each projected step as one measured
step, tokensPerStep / rate, scaled by rows and width. The per-request
decode TPS and the step shape were smoothed independently, so samples
from different batch widths produced a pair no request measured: 10
tok/s at eight rows, then 100 tok/s solo, gave 37 tok/s at 5.9 rows and
priced an eight-row step at about 0.037 s against 0.1 s measured.

MeasuredDecodeStep now smooths each request's mean step duration and
its shape with one weight and is reset with the decode EWMA, and
admission passes the rate implied by that duration
(DeadlineAdmissionFixes.decodeCharge). The priced step time and time
per row are weighted averages of measured ones, so they stay inside the
measured range; the eight-row step above is now priced at about 0.099 s.
The published per-request decode EWMA, the per-row charge kept for
reviewed calibrations and the kill-switch path are unchanged.

Regression test: decodeRateAndShapeStayCoupled fails with the
independent smoothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(provider): leave the first-token step's rows out of the decode shape

engineDecodeRate times decode from the first token to the last, so it
covers only the decode steps. The measured step shape averaged
batchRowsSum, which also counts the step that confirmed the first token,
over decodeSteps + 1. A first token produced in an eight-row step
followed by solo decode reported 4.5 rows for a solo-step rate, letting
admission price several projected rows at that rate without scaling.

The engine publishes prompt completion from the first-token step right
after recording the row's participation in it, so the prefill receipt's
sample carries that step's row count
(EnginePrefillReceipt.firstTokenStepRows). engineDecodeShape subtracts
it and averages over the decode steps alone; without a usable count
(cancelled before the first token, native block timing, inconsistent
counters) it keeps the previous average. No SDK change is needed.

Regression tests: firstTokenStepRowsExcluded drives the real bridge
pump and fails when the receipt's count is not passed; decodeShapeFromTiming
pins the arithmetic and fallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(provider): pin measurement-ordering tests to the fixed estimators

EnginePerformanceMeasurements and EngineV2Bridge default their
estimator flag to the process-wide DARKBLOOM_TTFT_ADMISSION_FIXES, so
exporting the kill switch made the newest-observation assertions fail.
Set keepsNewestObservationTime and admissionFixes explicitly, as the
kill-switch test already does for the old behavior.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: correct the DARKBLOOM_PREFILL_DEADLINE_MODE default to enforce

PrefillDeadlineMode.resolve returns .off only for an exact "off" and
enforces otherwise, including when the variable is unset; an explicit
[backend] prefill_deadline_mode in provider.toml takes precedence. The
configuration reference listed the default as off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: describe the corrected deadline estimators with full source citations

- inference.md and hardware-support.md: cite paths with every symbol
  (CBv2DecodeRateShape, CBv2MTPRoundDriver.speculationDepthCeiling,
  CBv2MTPConfig, MTPAutomaticVerificationPolicy.maxRectangularTokens,
  EngineV2Bridge.calibrationPosturePermitsWork,
  ServingQualificationDeadlineEvidence). Describe the coupled step
  smoothing and qualify the scaling claim: it is a bound for a single
  measurement, and across batch widths an average of measured steps.
  Describe first-token-step row exclusion, whole-Mac idleness, and the
  floor applying to the aggregate only.
- prediction-decision-telemetry.md: decode_tps under per-batch charging
  is the step-implied rate, which can differ from observed_decode_tps.
- test.md and the changelog fragment cover the new behavior and tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(provider): tidy the deadline-estimator review fixes

Drop the unused Equatable conformance from MeasuredDecodeStep, state
precisely why the prefill receipt's row sum is the first-token step's
rows, and attach the 30-minute-expiry comment in
otherModelWorkKeepsAnchorOff to the block that exercises it. No
behavior change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <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.

3 participants