Skip to content

refactor(inference): collapse coordinator's revocation ladder onto the single disruption_rank (slice 3) - #1617

Merged
joelteply merged 2 commits into
canaryfrom
feat/collapse-revocation-ladder
Jun 14, 2026
Merged

joelteply merged 2 commits into
canaryfrom
feat/collapse-revocation-ladder

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Slice 3 — compression. The revocation ladder (expired → Hard → Graceful, never an active Pinned lane) was defined twice:

Two encodings of one policy → drift risk. This collapses them onto the single definition.

Change

  • disruption_rank is now pub — the shared ladder.
  • evict_under_pressure builds candidates via disruption_rank(lane.lease(), now_ms)? (None = active Pinned → filtered out), sorts by (rank, acquired_at_ms), derives EvictionReason from rank. Inline tier() + the separate Realtime-skip deleted.

Behavior-preserving (the precondition I verified)

  • open_lane sets revocation_policy: class.revocation_policy() — Realtime→Pinned, Interactive→Graceful, Background|Sentinel→Hard (lane.rs:114).
  • lane.is_expired delegates to lease.is_expired (lane.rs:211).

So disruption_rank(lease) yields identical ranks to the former inline tier(class) (expired=0, Hard=1, Graceful=2, active-Pinned=excluded). The coordinator keeps its own selection strategy (oldest-first, ungated, lane-aware events) on top of the shared ladder — distinct from select_leases_to_revoke's broker-style strategy (largest-first, PressureTier-gated). One ladder, two strategies.

Validation (rust:1.95, continuum-core --lib)

test result: ok. 46 passed; 0 failed (full inference::coordinator + lease_revocation suites) · CARGO_EXIT=0 · behavior unchanged.

🤖 Generated with Claude Code

…e single disruption_rank (slice 3)

The revocation ladder (expired → Hard → Graceful, never an active Pinned
lane) was defined TWICE: once in `paging/lease_revocation::disruption_rank`
(slice 1 #1613, read from `lease.revocation_policy`, consumed by
`select_leases_to_revoke`), and again as a parallel inline `fn tier(class)`
in `InferenceCoordinator::evict_under_pressure` (mapping `LaneClass`→tier).
Compression-principle violation: one policy, two encodings that can drift.

Collapse them onto the single definition:
- `disruption_rank` is now `pub` — THE shared ladder.
- `evict_under_pressure` builds candidates via `disruption_rank(lane.lease(),
  now_ms)?` (None = active Pinned → filtered out), sorts by (rank,
  acquired_at_ms), and derives `EvictionReason` from rank. The inline
  `tier()` and the separate Realtime-skip are gone.

Behavior-preserving: `open_lane` sets `revocation_policy:
class.revocation_policy()` (Realtime→Pinned, Interactive→Graceful,
Background|Sentinel→Hard), and `lane.is_expired` delegates to
`lease.is_expired`, so the ranks are identical to the former inline tier().
The coordinator keeps its own SELECTION STRATEGY (oldest-first, ungated,
lane-aware side effects) on top of the shared ladder — distinct from
`select_leases_to_revoke`'s broker-style strategy (largest-first,
PressureTier-gated). One ladder, two strategies.

Validated rust:1.95 (continuum-core --lib): 46 tests pass (full
inference::coordinator + lease_revocation suites), CARGO_EXIT=0, behavior
unchanged.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…nit, #1617)

The event/EvictedLane payloads re-fetch lane.class() after lanes.remove;
the candidate field is vestigial post-ladder-collapse. Removes the
'field class is never read' warning.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@joelteply
joelteply merged commit 3743d0c into canary Jun 14, 2026
2 checks passed
@joelteply
joelteply deleted the feat/collapse-revocation-ladder branch June 14, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant