Repository navigation
continuum-service: the node notices its own slowdown (card 1c157668, slice 1: sample, baseline, detector) - #5477
Merged
Merged
Conversation
joelteply
added a commit
that referenced
this pull request
Oct 26, 2026
…lls are their own verdict; predictions carry their calibration (Codex on #5477) - A window that starts before the node's last one ended (duplicate, overlap, out of order) is refused before it is judged or learned (NotAfterLast). - A slow streak counts only ADJACENT judged windows on one engine incarnation: a gap, a restart, or an ineligible window (warm-up, unknown, mixed, idle) ends it. The streak lives in the node's stream position, not in a baseline. - Demand with zero completions is Verdict::Stalled, never NoDemand or healthy, never learned. - Prediction { p50_ms, calibration }: ratios are compared only under one calibration, so a recalibrated predictor never reads as the engine changing. Four fixtures, one per defect; 10/10. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
added a commit
that referenced
this pull request
Oct 26, 2026
…hout duration are refused (Codex on #5477) - A window with end <= start is refused (EmptyWindow) before any state changes: a zero-length window at the last end no longer trains the baseline or grows a streak, and a reversed one no longer rewinds the stream. - The streak is bound to its Comparison (BaselineKey, plus the predictor calibration when judged by ratios), not only node and incarnation: adjacent slow windows under different configurations, builds, models, strata or references are separate runs, never one sustained regression. Two fixtures; 12/12, clippy clean. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…slice 1: sample, baseline, detector) Joel: "system should self recognize slowdown and figure it out." On 10-26 the M5's engine came back degraded from a Compute-error burst and ran 3 h at 54 generations/h, median 174 s, on the same plan that served 118/h at 88 s after a clean restart; nothing noticed. A pure crate (serde only, no I/O, no global state; the caller owns ServiceState): - ServiceSample (schema 1), keyed by node, model, builds, a ServingConfig fingerprint (lanes, ctx, cache, KV type, backend, expert residency) kept separate from the EngineIncarnation; workload, offered demand and queue time, generations vs citizen acts, failures, p50/p90, the node's rate-predicted p50, a Warm/WarmingUp/Unknown flag, the memory ceiling. - A baseline per (node, model, builds, configuration, workload stratum by fresh and output tokens in powers of two), across engine restarts; per (node, model, builds), the healthy windows' observed/predicted ratios, which judge a configuration with no history of its own. - observe(state, policy, sample) -> Healthy | Suspect | Regressed(evidence, cause hints) | Insufficient. Warm-up, unknown warm-up, mixed windows and idle windows are never judged or learned; a slow window never joins a baseline; every bound is the caller's policy. Tests replay the 10-26 timeline (healthy 5-lane morning, the 2-lane plan first seen degraded, the clean restart), a same-config slowdown after a restart, an upgrade, a heavier workload, and fingerprint stability. The CI scope test names continuum-service among the crates a kernel or host change cannot reach (it depends on nothing in the workspace). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…lls are their own verdict; predictions carry their calibration (Codex on #5477) - A window that starts before the node's last one ended (duplicate, overlap, out of order) is refused before it is judged or learned (NotAfterLast). - A slow streak counts only ADJACENT judged windows on one engine incarnation: a gap, a restart, or an ineligible window (warm-up, unknown, mixed, idle) ends it. The streak lives in the node's stream position, not in a baseline. - Demand with zero completions is Verdict::Stalled, never NoDemand or healthy, never learned. - Prediction { p50_ms, calibration }: ratios are compared only under one calibration, so a recalibrated predictor never reads as the engine changing. Four fixtures, one per defect; 10/10. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…hout duration are refused (Codex on #5477) - A window with end <= start is refused (EmptyWindow) before any state changes: a zero-length window at the last end no longer trains the baseline or grows a streak, and a reversed one no longer rewinds the stream. - The streak is bound to its Comparison (BaselineKey, plus the predictor calibration when judged by ratios), not only node and incarnation: adjacent slow windows under different configurations, builds, models, strata or references are separate runs, never one sustained regression. Two fixtures; 12/12, clippy clean. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…rap_or_default calls) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
force-pushed
the
fable/continuum-service
branch
from
October 26, 2026 20:07
0d567ea to
42e7745
Compare
Contributor
Author
|
Exact-head source PASS at 42e7745: independently compared core/continuum-service against reviewed 0d567ea; git diff is empty. Earlier six detector findings remain resolved. CI at this head is still pending, so merge remains subject to green gates. This approves the pure detector scope, not automatic restart actuation or S2-S4 custody. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This gives every node the means to notice when its own minds are being served slower than it can serve them, so a degraded engine stops costing residents hours unnoticed. Order-of-work line 2 (speed), card 1c157668 (self-healing), and the base Codex builds the planner's reaction on.
Why: on 2026-10-26 the M5's engine came back degraded from a Compute-error burst. For 3 h it ran 54 generations/h at a median of 174 s, on the same plan that served 118/h at 88 s after a clean restart. Nothing noticed until an agent read the prompt captures by hand.
What (a new pure crate,
core/continuum-service, serde only, no I/O, no global state):sample::ServiceSample(schema 1): node, model, builds, and aServingConfigfingerprint covering lanes, ctx, cache, KV type, backend and expert residency. The config identity is kept separate from theEngineIncarnation(pid, start). The sample also carries the workload, offered demand and queue time, generations kept apart from citizen acts, failures, p50/p90, the node's rate-predicted p50, aWarm/WarmingUp/Unknownflag, and the memory ceiling.baseline: one baseline per node, model, builds, configuration and workload stratum (fresh and output tokens in powers of two), across engine restarts. Separately, per node, model and builds, the healthy windows' observed/predicted ratios. These judge a configuration that has no history of its own, which is exactly the 10-26 case: the 2-lane plan was first seen degraded.detect::observe(state, policy, sample)returnsHealthy,Suspect,Regressed(with evidence andCauseHints: engine restarted since baseline, failures, queue grew, slower than its rates) orInsufficient.history,min_evidence,sustained) is the caller'sServicePolicy; none is a constant here.Seam for Codex (planner reaction): the reaction consumes
Regressed(Regression), which carries the key, what the window was judged against and its cause hints, together with the feasible actions and lifecycle readiness. It only proposes until stop-drain (920619c5) is proven. The feed comes in later slices: cognition's capture-completion path builds samples, serving publishesServingConfigandEngineIncarnation(serving/statusgains pid and started_ms), the predicted p50 comes fromserving_ratesand the contention dyno, and a replay validator runs over the M5's prompt captures.Tests (6,
cargo test -p continuum-service):Gates:
cargo test -p continuum-service: 6/6.cargo clippy -p continuum-service --all-targets -- -D warnings: clean.cargo test -p source-hygiene: 66/66.ratchets origin/canary: exit 0, every row equal.node --test tools/scripts/tests/ci-change-scope.test.cjs: 21/21. The test's two hand-kept "below the kernel" lists became oneBELOW_KERNELconstant that includescontinuum-service, which depends on nothing in the workspace.The crate is about 630 lines including tests. No other crate is changed besides the workspace member line and
Cargo.lock.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo