struct NudgeCounterState {
registration_nonce: u64,
block_id: String,
count: u32,
last_nudge_at_ms: u64,
}Expand description
Per-target-agent consecutive-nudge tracking for the Warden Supervisor
guardrail. Keyed on the target agent’s lowercased name in
Handler::nudge_counters.
Fields§
§registration_nonce: u64The target’s AgentRegistration::registration_nonce as of the last
nudge — a respawn (new nonce) resets the counter, since “consecutive”
only makes sense within one continuous run. Real nonces are ≥ 1
(persistent-controller spawns only — persistent::next_registration_ nonce); PTY/shell and HTTP-register paths always register with 0
(“not recorded”), so nonce alone can’t detect a respawn for them —
block_id below covers that case instead.
block_id: StringThe target’s block id as of the last nudge. A PTY/shell-registered
agent that’s closed and relaunched gets a fresh block id (a new
pane), which nonce (always 0 for these paths) can’t see — comparing
block_id catches that respawn case reagent flagged as a P1 gap
(nonce-only reset never fires for PTY agents). Doesn’t help detect a
respawn that reuses the same pane/block id (e.g. a one-shot
SubprocessController that re-registers every turn in-place) — that
case still relies on NUDGE_COOLDOWN_RESET_MS alone, same as before.
count: u32§last_nudge_at_ms: u64Auto Trait Implementations§
impl Freeze for NudgeCounterState
impl RefUnwindSafe for NudgeCounterState
impl Send for NudgeCounterState
impl Sync for NudgeCounterState
impl Unpin for NudgeCounterState
impl UnsafeUnpin for NudgeCounterState
impl UnwindSafe for NudgeCounterState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more