pub struct Snapshot {Show 14 fields
pub workspaces: Vec<Workspace>,
pub projects: Vec<PathBuf>,
pub trees: HashMap<PathBuf, GitTree>,
pub bills: HashMap<PathBuf, Vec<StepBill>>,
pub windows: BTreeMap<String, u64>,
pub balls_by_project: HashMap<PathBuf, Vec<Ball>>,
pub closed_by_project: HashMap<PathBuf, Vec<Ball>>,
pub join_rows: Vec<JoinRow>,
pub ops: Vec<OpRow>,
pub growth: Vec<Growth>,
pub ui_bytes: Option<Vec<u8>>,
pub derived_at_unix: i64,
pub cadence: Cadence,
pub fleet: BTreeMap<String, Policy>,
}Expand description
A completed derivation (§7.2). Cheap to hand out (Arc), never mutated.
Fields§
§workspaces: Vec<Workspace>Every enumerated workspace, classified (§3.1).
projects: Vec<PathBuf>Every enumerated project’s decoded invocation path (§5.1 #1), internal
clones included — the set the §11 roster labels and the boundary’s
project names are both derived over ([names], REMOTE §8). Ridden
out on the snapshot for the same reason the workspace set is: a name is
a query over the live enumeration, and neither frontend may readdir to
resolve one.
trees: HashMap<PathBuf, GitTree>Per-workspace derived trees; a workspace absent here failed to derive.
bills: HashMap<PathBuf, Vec<StepBill>>Per-workspace steps/ walk (§3.5, bl-9dd4): every step’s Usage fold and
the model that billed it, folded once per pass on the worker. Every
spend figure — a conversation’s, a ball’s, the V4 board’s column, an epic
rollup across workspaces — is a filter over this, so a board of N balls
costs one walk rather than N on the frame thread (§7.2). Derived, never
stored: it is re-walked from disk like every other §5.1 fact.
windows: BTreeMap<String, u64>The context windows models.yaml declares, wire-model id → tokens
(§5.1 #35): the denominator of every context-fullness figure, read by
the worker on the same 15 s full sweep the balls fetch rides. World-wide
rather than per-workspace because the file is — §9.2’s global litany
config, one home for the declaration. Empty is the ordinary quiet case:
nothing declared, so nothing is rendered.
balls_by_project: HashMap<PathBuf, Vec<Ball>>Cached live balls per visible project (§5.1 #2).
closed_by_project: HashMap<PathBuf, Vec<Ball>>Cached closed balls per project (§5.1 #4) — fetched on demand, never on the cadence, so this is sparse by design. Published beside the live map because the §3.5 Delivered rows and the §8.5 search corpus are the same fact asked twice: whatever closed set this world has fetched.
join_rows: Vec<JoinRow>The derived §3.5 join (roster badges + verb enablement).
ops: Vec<OpRow>The ops.jsonl tail (§4.2), the ops-pane render source.
growth: Vec<Growth>Conversations whose descent grew since the previous snapshot (§7.2).
ui_bytes: Option<Vec<u8>>Externally-changed ui.json bytes for the frame to adopt (§4.1).
derived_at_unix: i64When this derivation completed, in unix seconds off the injected clock
— the staleness datum (§7.2), and the one the workspaces answer dates
its stale line against.
cadence: CadenceThe clock’s live periods (bl-3381): the worker’s read of cadence.yaml
(or the defaults), ridden out so every frame-side derived period — the
wound grace, the staleness bound, the I4 poll floor — follows the
operator’s tuning without the frame reading disk (§7.2).
fleet: BTreeMap<String, Policy>The armed §4.3 fleet loops, keyed by workspace (bl-66fb): the worker’s
read of the same cadence.yaml, ridden out for the same reason the
periods above are — the V4 board renders the cap and the count, and a
frame must not read disk to say them. Empty is the default and the
ordinary world: no entry, no loop, no fact.
Implementations§
Source§impl Snapshot
impl Snapshot
Sourcepub fn ws_name(&self, path: &Path) -> String
pub fn ws_name(&self, path: &Path) -> String
The wire name of the workspace at path (§3.1: its leaf is its
name). Total over any path — the enumeration is not consulted, because
a workspace’s name is not derived from the set it sits in.
Sourcepub fn ws_path(&self, name: &str) -> Result<PathBuf, String>
pub fn ws_path(&self, name: &str) -> Result<PathBuf, String>
The workspace name addresses, or the refusal naming the token.
Sourcepub fn project_name(&self, path: &Path) -> String
pub fn project_name(&self, path: &Path) -> String
The wire name of the project at path (§5.1 #1) — the §11 roster label
before its cosmetic elision.
Source§impl Snapshot
impl Snapshot
Sourcepub fn scoped(&self, allowed: &BTreeSet<String>) -> Snapshot
pub fn scoped(&self, allowed: &BTreeSet<String>) -> Snapshot
This derivation as a client registered in allowed sees it: every
workspace-keyed field filtered to those names, everything else untouched.
Total over any name set — an empty one yields a snapshot with no
workspace at all, which is the honest view a certificate the operator has
not seated gets, and which every read surface already answers without a
bootstrap branch (Snapshot::empty is that same shape).
Trait Implementations§
impl Eq for Snapshot
impl StructuralPartialEq for Snapshot
Auto Trait Implementations§
impl Freeze for Snapshot
impl RefUnwindSafe for Snapshot
impl Send for Snapshot
impl Sync for Snapshot
impl Unpin for Snapshot
impl UnsafeUnpin for Snapshot
impl UnwindSafe for Snapshot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.