feat(shipote): throughput card + rate-limit + snapshot incremental (fase Q)
- shipote-shell Flow channels card extiende con bytes_total + bytes/s por socket. Lookup helper evita borrows en closures. - DiscernPolicy.max_bytes_per_sec: splitter task hace sleep proporcional al tamaño de chunk tras cada broadcast. Token-bucket simple v1. - WorkspaceManager.dirty: AtomicBool. mark_dirty() en mutaciones que afectan al snapshot. save_snapshot skip si clean y path existe. restore_snapshot resetea dirty=false (hidratación no es mutation). 85 tests pasan (ente-incarnate 16, nouser-core 27, shipote-card 8, shipote-core 26, shipote-discern 5, yahweh-provider-fs 3). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -274,6 +274,11 @@ pub struct DiscernPolicy {
|
||||
/// productores con chunks de tamaño variable.
|
||||
#[serde(default)]
|
||||
pub replay_bytes: usize,
|
||||
/// Rate-limit del flow channel (bytes/s). `0` = sin límite. Si está
|
||||
/// definido, el splitter sleeps proporcional al tamaño del chunk
|
||||
/// antes de re-broadcastear. Protege subscribers lentos.
|
||||
#[serde(default)]
|
||||
pub max_bytes_per_sec: u64,
|
||||
}
|
||||
|
||||
impl Default for DiscernPolicy {
|
||||
@@ -283,6 +288,7 @@ impl Default for DiscernPolicy {
|
||||
enrich_producer: default_true(),
|
||||
replay_chunks: default_replay_chunks(),
|
||||
replay_bytes: 0,
|
||||
max_bytes_per_sec: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user