Skip to content

Keep an idle slot's decode rate while the coordinator decays stale rates (trust_status.coordinator_features) - #2703

Merged
jonathan308 merged 2 commits into
devfrom
feat/coordinator-decode-rate-age-decay
Nov 24, 2026
Merged

jonathan308 merged 2 commits into
devfrom
feat/coordinator-decode-rate-age-decay

Conversation

@jonathan308

@jonathan308 jonathan308 commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The provider half of the coordinator's stale decode-rate decay (follow-up to #2569 and #2672). trust_status gains an optional coordinator_features list of strings. While the connected coordinator's latest trust_status lists decode_rate_age_decay, the heartbeat stops omitting an idle slot's observed_decode_tps after DARKBLOOM_DECODE_RATE_IDLE_MAX_AGE_SECONDS. It sends the rate with its observed_decode_tps_age_ms (#2672), and the coordinator decays a stale rate toward the fleet median. That ends the alternation between no rate (idle, performance_missing on the coordinator) and an old rate (busy).

It does nothing until a coordinator sends the entry, and none does today. The coordinator change that sends it ships separately, default off.

  • CoordinatorMessage.TrustStatus.coordinatorFeatures (coordinator_features, optional). A malformed value decodes as absent (try?), so a trust_status is never refused because of it.
  • DecodeRateIdleAge.coordinatorDecays (CoordinatorDecayAdvertisement): set from each trust_status (CoordinatorClient+Inbound), cleared on disconnect (CoordinatorClient+Connection).
  • EngineV2Bridge+Capacity passes DecodeRateIdleAge.effectiveMaximum. That is configured exactly as before, or nil while the feature is advertised.

Linked issue

None. Follow-up to #2569 and #2672.

Test plan

  • Red control: Red control for #2703: tests without the change (do not merge) #2704 (head 059acbf022): the new tests, the shared wire cases and inert declarations they compile against, on the same base. It must fail at exactly the 4 new tests in CoordinatorDecodeRateDecayTests: sharedFixture, wireShape, advertisementLifecycle and heartbeatBytes.
  • CI (dev) on the exact head.
  • New suite CoordinatorDecodeRateDecayTests:
    • sharedFixture: every case in Fixtures/Protocol/coordinator_features_wire.json decodes. That covers absent, empty, another name, the feature, the feature among others, and a malformed string. Only the two advertised cases turn the idle age off. The coordinator's emission test reads the same file;
    • wireShape: a trust_status without the field (an older coordinator) decodes with nil and re-encodes without the key; the list round-trips;
    • advertisementLifecycle: set by a trust_status with the feature, cleared by one without it and by a disconnect reset;
    • heartbeatBytes: for a stale idle slot at 60 s, 1,801 s and 7,200 s, the heartbeat without the feature is byte for byte the heartbeat the process sends today. With the feature, the rate (16) and its age stay on the wire; while fresh, both heartbeats are identical.
  • Existing DecodeRateIdleAgeTests and ProviderAuthorizationProtocolTests.legacyCoordinatorStatusRemainsCompatible pass unchanged.
  • python3 provider-swift/Tests/test_protocol_fixture_resources.py, python3 scripts/changelog.py check, python3 scripts/docs-impact-check.py --base 4fd38a1a64

Components touched

  • provider-swift (Swift CLI)
  • docs

Protocol / interface changes

  • Yes, described above: one optional coordinator → provider field, trust_status.coordinator_features. The matching coordinator side (advertising decode_rate_age_decay only behind its own default-off switch, with the same wire cases) is a separate platform change. No heartbeat field changes.

Documentation impact

  • Canonical documentation updated (docs/reference/protocol-messages.md trust_status and observed_decode_tps, docs/reference/configuration.md, docs/architecture/inference.md, docs/developer/serving-performance-qualification.md)

Changelog

  • Added changelog.d/coordinator-decode-rate-age-decay.md.

Notes

  • The advertisement is process-wide: each trust_status replaces it, and a disconnect clears it, so a coordinator rolled back to one without the feature restores the idle age at its first trust_status. Heartbeat tests take a task-local value and never touch it.
  • With the feature on, the provider sends exactly what DARKBLOOM_DECODE_RATE_IDLE_MAX_AGE_SECONDS=0 sends today, plus the age feat(provider): the heartbeat sends the published decode rate's own age #2672 already adds.

Before And After

flowchart TD
  subgraph Before
    A1[idle slot, newest sample > 30 min] --> B1[observed_decode_tps omitted]
  end
  subgraph After
    A2[idle slot, newest sample > 30 min] --> C2{latest trust_status lists decode_rate_age_decay?}
    C2 -->|no, absent, malformed, disconnected| B2[observed_decode_tps omitted, as before]
    C2 -->|yes| D2[rate + observed_decode_tps_age_ms sent; coordinator decays it]
  end
Loading

Refactor Pass

Refactor pass: no change justified.

trust_status gains an optional coordinator_features list. While the connected
coordinator's latest trust_status lists decode_rate_age_decay, the heartbeat
stops omitting an idle slot's observed_decode_tps after
DARKBLOOM_DECODE_RATE_IDLE_MAX_AGE_SECONDS: it sends the rate and its
observed_decode_tps_age_ms, and the coordinator decays a stale rate toward the
fleet median itself. This removes the alternation between no rate (idle) and
an old one (busy) for such a coordinator.

Absent, malformed or unknown entries, a later trust_status without the entry,
and a disconnect keep today's behaviour; the heartbeat is then unchanged byte
for byte. Older coordinators never send the field and are decoded as before.

Tests: CoordinatorDecodeRateDecayTests (shared wire cases in
Fixtures/Protocol/coordinator_features_wire.json, wire shape, advertisement
lifecycle, heartbeat bytes with and without the feature).
@vercel

vercel Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
d-inference-landing Ready Ready Preview Nov 24, 2026 7:08pm UTC
darkbloom-status Ready Ready Preview Nov 24, 2026 7:08pm UTC
eigen-homepages-darkbloom Ready Ready Preview Nov 24, 2026 7:08pm UTC

Request Review

@jonathan308 jonathan308 added the run-ci Trigger one-shot PR CI run (auto-removed when run starts) label Nov 24, 2026
@github-actions github-actions Bot removed the run-ci Trigger one-shot PR CI run (auto-removed when run starts) label Nov 24, 2026
@jonathan308 jonathan308 added the run-ci Trigger one-shot PR CI run (auto-removed when run starts) label Nov 24, 2026
@github-actions github-actions Bot removed the run-ci Trigger one-shot PR CI run (auto-removed when run starts) label Nov 24, 2026
@jonathan308
jonathan308 changed the base branch from feat/decode-rate-age-on-heartbeat to dev November 24, 2026 18:51
Conflict in docs/developer/serving-performance-qualification.md only: both sentences kept (the decode rate before a slot's first completed request, then the decode_rate_age_decay advertisement).
@jonathan308 jonathan308 added the run-ci Trigger one-shot PR CI run (auto-removed when run starts) label Nov 24, 2026
@github-actions github-actions Bot removed the run-ci Trigger one-shot PR CI run (auto-removed when run starts) label Nov 24, 2026
@jonathan308
jonathan308 merged commit 0d4154d into dev Nov 24, 2026
27 checks passed

This branch was successfully deployed

3 active deployments
Preview – eigen-homepages-darkbloom — 810d2bd6 Deployed Nov 24, 2026 by vercel[bot]
Preview – d-inference-landing — 810d2bd6 Deployed Nov 24, 2026 by vercel[bot]
Preview – darkbloom-status — 810d2bd6 Deployed Nov 24, 2026 by vercel[bot]
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