MCPcopy
hub / github.com/garrytan/gstack / rebuildSnapshot

Function rebuildSnapshot

lib/gstack-decision.ts:244–248  ·  view source on GitHub ↗
(paths: DecisionPaths)

Source from the content-addressed store, hash-verified

242
243/** Recompute active from the event log and refresh the snapshot. Returns active. */
244export function rebuildSnapshot(paths: DecisionPaths): ActiveDecision[] {
245 const active = computeActive(readEvents(paths));
246 writeSnapshot(paths, active);
247 return active;
248}
249
250export interface CompactResult {
251 activeCount: number;

Callers 1

Calls 3

computeActiveFunction · 0.85
writeSnapshotFunction · 0.85
readEventsFunction · 0.70

Tested by

no test coverage detected