Expand description
Workspace-canonical serde-default owners — the ONE substrate site
every #[serde(default = "…")] slot on a plain scalar constant
(true, false, 0u32, …) reaches for its serde-default fn.
Pre-lift each shape lived as a per-file fn default_<X>() -> <T> { <constant> } private shim; because serde’s default = "path"
contract dispatches on a NAMED function rather than an inline
literal, every consumer file grew its own local shim body — and the
FIVE consumer files that all needed the -> bool { true } shape
each spelled the SAME three-line body byte-identically. Post-lift
every consumer routes through the ONE substrate owner here so a
future normalization (a debug-build assertion, a per-fleet override
injected via env var, a rename that folds default_true into a
serde_defaults::TRUE typed handle) lands at THIS module and every
downstream serde-default consumer inherits the upgrade mechanically.
Peer to crate::lifetime::default_ephemeral_ttl +
crate::lifetime::default_ephemeral_max_concurrent on the
“workspace-canonical serde-default owners” axis. Where those two
primitives own the ephemeral-authoring-surface-specific defaults
("1h" / 1u32), this module owns the plain-scalar-constant
defaults that no CRD-specific axis binds to a single crate — the
-> bool { true } shape recurs anywhere a boolean field’s serde
default is “on” for backward-compat, safe-default, or feature-flag
reasons, and each variant of that shape wants ONE substrate owner
rather than a private per-file shim.
Constants§
- DEFAULT_
SIGTERM_ GRACE_ SECONDS - Workspace-canonical
u32handle over the same480valuedefault_sigterm_grace_secondsreturns. Use this const for compile-time comparisons and const-context readers; usedefault_sigterm_grace_secondsfor the serdedefault = "…"slot contract. - DEFAULT_
TRUE - Workspace-canonical
boolhandle over the sametruevaluedefault_truereturns. Use this const for compile-time comparisons and const-context readers; usedefault_truefor the serdedefault = "…"slot contract. - DEFAULT_
ZOMBIE_ TIMEOUT_ SECONDS - Workspace-canonical
u32handle over the same600valuedefault_zombie_timeout_secondsreturns. Use this const for compile-time comparisons and const-context readers; usedefault_zombie_timeout_secondsfor the serdedefault = "…"slot contract.
Functions§
- default_
sigterm_ grace_ seconds - Workspace-canonical
-> u32 { 480 }SIGTERM→SIGKILL grace-window serde-default owner — the ONE substrate site every#[serde(default = "…")]slot on au32field whose semantic is “seconds to wait after delivering SIGTERM before escalating to SIGKILL” routes through. - default_
true - Workspace-canonical
-> bool { true }serde-default owner — the ONE substrate site every#[serde(default = "…")]slot on aboolfield whose “on by default” invariant matches the pre-lift shape routes through. - default_
zombie_ timeout_ seconds - Workspace-canonical
-> u32 { 600 }Zombie-phase force-reap timeout serde-default owner — the ONE substrate site every#[serde(default = "…")]slot on au32field whose semantic is “seconds a Process is permitted to sit inZombiebefore PID 1 force-reaps it” routes through, PLUS the ONE substrate anchor every hand-authoredProcessTableSpeccomposer that pre-populates thezombie_timeout_secondsslot with the workspace-canonical wire-form routes through.