Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
9d4509b
fix(runtime): airc room-route error echoes aircRoom target — unbreak …
joelteply Jul 27, 2026
3152989
feat(capacity): expert_observe harness — glass-box LIVE MoE expert ro…
joelteply Jul 27, 2026
afef132
fix(chat): ChatModule executor fails loud per-request, not process pa…
joelteply Jul 27, 2026
ca95b75
test(cognition): align tool-surface test name+doc with the deleted sh…
joelteply Jul 27, 2026
97011f4
feat(serving): elastic demand-driven context window — thread the ceil…
joelteply Jul 27, 2026
c29e92d
feat(serving): WorkingSetDemand — the live demand producer for the el…
joelteply Jul 27, 2026
8501c5e
feat(serving): serving daemon is demand-aware — elastic window thread…
joelteply Jul 27, 2026
e6b3f1c
feat(serving): close the elastic-window loop — turn demand feeds the …
joelteply Jul 27, 2026
0ea9538
feat(serving): opt-in KV cache quantization — q8_0 halves KV, feeds t…
joelteply Jul 27, 2026
175cd6d
feat(serving): KV-quant fit coupling — the window GROWS into the free…
joelteply Jul 27, 2026
10fed27
feat(serving): opt-in flash attention — faster prefill+decode, lower …
joelteply Jul 27, 2026
e47661a
feat(capacity): expert_observe — per-domain concentration + working-s…
joelteply Jul 27, 2026
98a6a16
feat(capacity): ModelFootprint::grid_lease_request — serving demand →…
joelteply Jul 27, 2026
e526710
feat(capacity): ModelResidencyView — the residency eligibility gate f…
joelteply Jul 27, 2026
4084e3e
feat(capacity): ResidencyBeacon + ResidencyLedger — the receive/proje…
joelteply Jul 27, 2026
dc806d5
feat(capacity): GridResidencyModule + grid_residency envelope — resid…
joelteply Jul 27, 2026
c5600bf
feat(capacity): route_grid_overflow — remote-only overflow placement …
joelteply Jul 27, 2026
979d93d
feat(persona): grid-overflow effector seam — materialize_adapters ove…
joelteply Jul 27, 2026
b7b5264
feat(persona): grid-overflow effector LIVE closure — a persona's brai…
joelteply Jul 27, 2026
eccb573
fix(windows-build): CUDA serving build — cuda-guard + cmake/llvm runt…
joelteply Jul 27, 2026
f829ed6
fix(ipc): interceptor-attach must use rt_handle.spawn, not bare tokio…
joelteply Jul 27, 2026
5f90f26
Merge remote-tracking branch 'origin/feat/elastic-serving-window-232-…
joelteply Jul 28, 2026
8b56c32
feat(catalog): register qwen3-coder-30b-a3b-compacted-19b-256k as a s…
joelteply Jul 28, 2026
c25d45e
fix(windows): portable serving-node lifecycle — no hand steps survive
joelteply Jul 28, 2026
34a7d31
docs(planning): Sentinel-in-the-Substrate — absorb sentinel-ai's idea…
joelteply Jul 28, 2026
185e512
docs(planning): sentinel plan — cloning/mitosis, per-component quant …
joelteply Jul 28, 2026
b7fa7fb
refactor(start-server): stop-then-build — restarts are commonplace by…
joelteply Jul 28, 2026
5edaeaa
docs(planning): BETA-ACTUALIZATION — the positronic homelab, pillars …
joelteply Jul 28, 2026
221b0cc
fix(start-server): orphan engine clearing was a pkill no-op on Window…
joelteply Jul 28, 2026
c468ea3
docs(architecture): Persona-RAID write-behind design — bounded-amnesi…
joelteply Jul 28, 2026
a0b8420
feat(memory): persona-RAID slice 1 — write-behind journal tee + Repli…
joelteply Jul 28, 2026
6eaf535
feat(memory): persona-RAID slice 2a — replicate-batch receiver + repl…
joelteply Jul 28, 2026
9dbf054
refactor(memory): ReplicationLedger — kill the statics, one owned obj…
joelteply Jul 28, 2026
4e8830b
feat(memory): persona-RAID slice 2b — the write-behind shipper (RTOS-…
joelteply Jul 28, 2026
8aa4d87
docs(planning): Benchmark-as-Learning-Flywheel — the grid task engine…
joelteply Jul 29, 2026
9ee387e
docs(planning): Benchmark Target Map — our collections <-> K3 frontie…
joelteply Jul 29, 2026
9c7533f
feat(benchmark): livecodebench-rs runnable Program-Bench proxy + full…
joelteply Jul 29, 2026
b33abb1
docs(planning): catalog IS the curriculum — in-repo, accumulating, pe…
joelteply Jul 29, 2026
d83e57f
docs(planning): K3 paging diagnosis — accuracy is FREE, it's all spee…
joelteply Jul 29, 2026
b56dc27
docs(planning): the adapter path to K3 par (Joel: Adapters) — compens…
joelteply Jul 29, 2026
d1df7b5
docs(planning): K3 conversion status — done + precise remaining gaps …
joelteply Jul 29, 2026
7dab277
feat(capacity): node_content — the grid who-has-what registry (founda…
joelteply Jul 29, 2026
0983320
docs(paging): correct tiering — mechanical disk never a live fault so…
joelteply Jul 29, 2026
b4a5d37
docs(paging): working-set-not-model-size reframe — a focused task's ~…
joelteply Jul 29, 2026
a922583
docs(paging): NO PRUNING — all experts stay available; cache levels +…
joelteply Jul 29, 2026
3258553
docs(k3): the Windows >RAM-MoE load-wedge is a fork-fixable loader bu…
joelteply Jul 29, 2026
0684aaa
feat(disk): cross-drive cold offload — the missing consumer of DriveR…
joelteply Jul 29, 2026
db2d831
docs(k3): design — modify llama.cpp fork for GPU expert paging (never…
joelteply Jul 29, 2026
ab3bc97
docs(k3): instrument GPU expert paging — measure latency + expert val…
joelteply Jul 29, 2026
3d42dc7
docs: self-calibration — node finds its own bearings per activity, co…
joelteply Jul 30, 2026
0459389
docs: experience score is criticality-gated + temporal + difficulty-e…
joelteply Jul 30, 2026
231eb73
docs(k3): build agent findings — ggml op-offload IS the mechanism (fl…
joelteply Jul 30, 2026
a630eaa
docs: beta architecture — activities as the unit, learned per-activit…
joelteply Jul 30, 2026
286d534
docs: multi-user + contention — human foreground GPU work is top-prio…
joelteply Jul 30, 2026
177be8d
docs(k3): the foundry model-reduction path — shrink K3 to fit, no pag…
joelteply Jul 30, 2026
a345d0a
docs(k3): reduce PRECISION not knowledge — head-targeting mechanism -…
joelteply Jul 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 56 additions & 30 deletions core/continuum-core/src/airc/discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,55 @@ async fn airc_on_path() -> bool {
.unwrap_or(false)
}

/// Probe attempts before declaring the substrate unresponsive. A single 5s shot
/// is a coin flip on a loaded box: Windows process spawn alone can transiently
/// eat seconds when the machine is compiling/converting/downloading (observed
/// 2026-07-28 BigMama — the updated airc answered instantly when idle, yet the
/// one-shot probe timed out mid-build and the core refused full-citizen boot).
/// Retries stay BOUNDED (3 × deadline ≈ 15s worst case) — resilient to transient
/// load, still fail-loud when airc is genuinely dead.
const DISCOVERY_PROBE_ATTEMPTS: u32 = 3;

/// How an `airc <subcommand>` probe failed — timeout (every attempt) vs spawn error.
enum ProbeError {
TimedOut,
Io(String),
}

/// Run `airc <arg>` with the discovery deadline and bounded retries (see
/// [`DISCOVERY_PROBE_ATTEMPTS`]). ONE probe implementation for every discovery
/// subcommand — the retry-on-transient-stall policy lives here, not copy-pasted
/// per call site.
async fn probe_airc(arg: &str) -> Result<std::process::Output, ProbeError> {
for attempt in 1..=DISCOVERY_PROBE_ATTEMPTS {
let call = TokioCommand::new("airc").arg(arg).output();
match timeout(DISCOVERY_SUBPROCESS_DEADLINE, call).await {
Ok(res) => return res.map_err(|e| ProbeError::Io(e.to_string())),
Err(_) if attempt < DISCOVERY_PROBE_ATTEMPTS => {
warn!(
attempt,
"`airc {arg}` did not exit within {DISCOVERY_SUBPROCESS_DEADLINE:?} \
— retrying (transient spawn stall under load)"
);
}
Err(_) => {}
}
}
Err(ProbeError::TimedOut)
}

fn probe_timeout_msg(arg: &str) -> String {
format!(
"`airc {arg}` did not exit within {DISCOVERY_SUBPROCESS_DEADLINE:?} \
× {DISCOVERY_PROBE_ATTEMPTS} attempts — substrate is unresponsive, refusing to wait",
)
}

async fn query_airc_endpoint() -> Result<PathBuf, DiscoveryError> {
let call = TokioCommand::new("airc").arg("ipc-endpoint").output();
let out = timeout(DISCOVERY_SUBPROCESS_DEADLINE, call)
.await
.map_err(|_| {
DiscoveryError::EndpointCommandFailed(format!(
"`airc ipc-endpoint` did not exit within {DISCOVERY_SUBPROCESS_DEADLINE:?} \
— substrate is unresponsive, refusing to wait",
))
})?
.map_err(|e| DiscoveryError::EndpointCommandFailed(e.to_string()))?;
let out = probe_airc("ipc-endpoint").await.map_err(|e| match e {
ProbeError::TimedOut => DiscoveryError::EndpointCommandFailed(probe_timeout_msg("ipc-endpoint")),
ProbeError::Io(msg) => DiscoveryError::EndpointCommandFailed(msg),
})?;
if !out.status.success() {
return Err(DiscoveryError::EndpointCommandFailed(format!(
"exit {}: {}",
Expand Down Expand Up @@ -200,16 +238,10 @@ pub async fn discover_default_channel() -> Result<uuid::Uuid, DiscoveryError> {
))
});
}
let call = TokioCommand::new("airc").arg("room").output();
let out = timeout(DISCOVERY_SUBPROCESS_DEADLINE, call)
.await
.map_err(|_| {
DiscoveryError::RoomCommandFailed(format!(
"`airc room` did not exit within {DISCOVERY_SUBPROCESS_DEADLINE:?} \
— substrate is unresponsive, refusing to wait",
))
})?
.map_err(|e| DiscoveryError::RoomCommandFailed(e.to_string()))?;
let out = probe_airc("room").await.map_err(|e| match e {
ProbeError::TimedOut => DiscoveryError::RoomCommandFailed(probe_timeout_msg("room")),
ProbeError::Io(msg) => DiscoveryError::RoomCommandFailed(msg),
})?;
if !out.status.success() {
return Err(DiscoveryError::RoomCommandFailed(format!(
"exit {}: {}",
Expand Down Expand Up @@ -241,16 +273,10 @@ pub async fn discover_default_room_name() -> Result<String, DiscoveryError> {
return Ok(raw);
}
}
let call = TokioCommand::new("airc").arg("room").output();
let out = timeout(DISCOVERY_SUBPROCESS_DEADLINE, call)
.await
.map_err(|_| {
DiscoveryError::RoomCommandFailed(format!(
"`airc room` did not exit within {DISCOVERY_SUBPROCESS_DEADLINE:?} \
— substrate is unresponsive, refusing to wait",
))
})?
.map_err(|e| DiscoveryError::RoomCommandFailed(e.to_string()))?;
let out = probe_airc("room").await.map_err(|e| match e {
ProbeError::TimedOut => DiscoveryError::RoomCommandFailed(probe_timeout_msg("room")),
ProbeError::Io(msg) => DiscoveryError::RoomCommandFailed(msg),
})?;
if !out.status.success() {
return Err(DiscoveryError::RoomCommandFailed(format!(
"exit {}: {}",
Expand Down
41 changes: 41 additions & 0 deletions core/continuum-core/src/airc/inbound_attach.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,31 @@ pub async fn publish_transcript_event(
"first capacity offer heard from a grid peer",
);
}
} else if let Some(beacon) = residency_beacon_from_envelope(&envelope) {
// Residency beacon (grid-overflow eligibility): fold the heard beacon into the
// process-global residency ledger, keyed on the WIRE's peer id — the orthogonal
// sibling of the capacity fold above. Our own echo lands here too (the loopback
// proof that publish→hear works before a second node exists).
let now_ms = std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
.map(|d| d.as_millis() as u64)
.unwrap_or(0);
let model_count = beacon.resident_models.len();
let is_new = crate::capacity::model_residency::global_residency_ledger().hear(
event.peer_id.as_uuid(),
beacon,
now_ms,
);
if is_new {
crate::probe!(
class = "grid.residency.heard",
from_peer = %event.peer_id.as_uuid(),
model_count = model_count,
heard_peers =
crate::capacity::model_residency::global_residency_ledger().heard_count(),
"first residency beacon heard from a grid peer",
);
}
} else if let Some((name, payload)) = chat_posted_from_envelope(&envelope, event) {
crate::probe!(
class = "airc.chat.projected",
Expand Down Expand Up @@ -284,6 +309,22 @@ fn capacity_offer_from_envelope(
serde_json::from_value(payload.inline.clone()?).ok()
}

/// Decode a `grid_residency` envelope's inline payload into a [`ResidencyBeacon`].
/// Returns `None` for any other envelope — the residency sibling of
/// [`capacity_offer_from_envelope`], same honest schema gate.
fn residency_beacon_from_envelope(
envelope: &AircRealtimeEnvelope,
) -> Option<crate::capacity::model_residency::ResidencyBeacon> {
let crate::airc::realtime::AircRealtimePayload::ExistingSchema { payload } = &envelope.payload
else {
return None;
};
if payload.schema != crate::airc::realtime::AircRealtimeSchema::GridResidency {
return None;
}
serde_json::from_value(payload.inline.clone()?).ok()
}

/// Project a plain airc chat message into the THIN `chat:posted` bus
/// payload the positron chat projection consumes (`AircChatPosted` in
/// `ipc/positron_source.rs`). Returns `None` for any non-message event
Expand Down
11 changes: 10 additions & 1 deletion core/continuum-core/src/airc/realtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ pub enum AircRealtimeSchema {
/// presence-of-compute. EphemeralCoalesced: latest wins, never replayed
/// (a stale capacity reading is a lie).
GridCapacity,
/// A node's residency beacon (`capacity::model_residency::ResidencyBeacon`) —
/// which models it holds resident, the grid-overflow ELIGIBILITY signal (a peer
/// is only a fast overflow target for a model it already holds). Orthogonal to
/// GridCapacity (concurrency): the governor composes the two. EphemeralCoalesced
/// like capacity, but published on a slower cadence — residency changes on model
/// page-in/out (minute-scale), not the 10s capacity beat.
GridResidency,
}

/// Handle to a payload already defined by a Continuum schema.
Expand Down Expand Up @@ -458,7 +465,9 @@ impl AircRealtimePayload {
| AircRealtimeSchema::LiveKitBridgeEvent => AircRealtimeDelivery::Control,
// Capacity offers are presence-of-compute: latest wins, never
// replayed — a stale reading must not outlive its freshness.
AircRealtimeSchema::GridCapacity => AircRealtimeDelivery::EphemeralCoalesced,
AircRealtimeSchema::GridCapacity | AircRealtimeSchema::GridResidency => {
AircRealtimeDelivery::EphemeralCoalesced
}
_ => AircRealtimeDelivery::Durable,
},
Self::Presence { event } => event.delivery(),
Expand Down
Loading