Expand description
Agent-safe force-resync for stale path-dependency roots (bd-session-history-remediation-ocv9i.8.3).
When stale dependency roots block verification, an agent needs ONE supported
command that invalidates the worker-side cache for those roots, resyncs the
closure, and explains what changed — without ever deleting worker data
outside an RCH-managed root. This module plans that invalidation
(plan_force_resync) with a hard safety guard (every target must live
strictly under the RCH-managed base, and the base itself can never be the
target), and reports the outcome (apply_force_resync) — deferring
safely, with no destructive action, when the worker is unreachable.
Structs§
- Force
Resync Plan - A safety-checked force-resync plan.
- Force
Resync Report - The agent-facing report of a force-resync.
- Invalidation
Action - A planned, safety-checked cache invalidation.
- Refused
Invalidation - A refused invalidation (its target would escape the RCH-managed root).
- Stale
Root - A stale root to force-resync: its local project root and the worker-side RCH-managed cache path that should be invalidated.
Enums§
- Resync
Outcome - Outcome of applying a force-resync plan.
Functions§
- apply_
force_ resync - Apply a plan, gated on worker reachability. When the worker is unreachable
the resync is deferred and NO invalidation is reported (no destructive
action is taken). The actual
rm+ resync transfer is performed by the caller usingreport.invalidated; this models the safe decision + report. - is_
safe_ invalidation_ target - Whether
targetis a safe invalidation target undermanaged_base: it must be strictly inside the base (never the base itself, never an ancestor, never an escaping..path). - plan_
force_ resync - Plan the force-resync: each stale root whose worker cache path is safely
under
managed_basebecomes an invalidation; any other is refused (never invalidated) so no worker data outside the managed root is ever touched.