Expand description
Owned residual path discovery (CLI marker + chromium tmp). Owned residual path discovery for one-shot Chrome (GAP-017 / GAP-020 / RES-01…12).
Never wipes host Chromes (Flatpak/VS Code). Only paths that are:
- under our marker prefix
browser-automation-cli-chrome-*, or - Singleton files inside our profile, or
/tmp/org.chromium.Chromium.*//tmp/.org.chromium.Chromium.*that are Singleton-only (or empty), owned by this uid, with no live process holding the path — either from this invocation window or cross-run stale GC.
Host Flatpak tmp noise (.com.google.Chrome.* / com.google.Chrome.*) is
never deleted by cross-run GC (product law).
§Workload
I/O-bound temp//proc scan during BORN and FINALIZE. Discovery of temp
entries stays sequential (directory iterator).
PAR-89: live-process checks use a single /proc cmdline index
(index_proc_cmdlines) then crate::concurrency::map_cpu over candidates
(threshold 32). Never rescan /proc inside each parallel task (that would
be O(N×P) thrashing under Rayon).
PAR-90: independent wipe of disjoint paths uses map_cpu when large.
Subprocess Chrome itself is never unbounded-forked (one launch per one-shot
process). The brief std::thread::sleep settle in browser residual path is
on the sync FINALIZE path (not a Tokio worker).
Structs§
- Residual
Disk Report - Machine-readable residual disk hygiene report (doctor / agents).
Constants§
- CHROMIUM_
TMP_ DOT_ PREFIX - Hidden Chromium side-channel prefix under the process temp dir.
- CHROMIUM_
TMP_ PREFIX - Chromium side-channel prefix under the process temp dir.
- CLI_
CHROME_ MARKER_ PREFIX - Prefix for CLI-owned temp Chrome user-data-dir profiles.
- INVOCATION_
SIDE_ CHANNEL_ WINDOW_ SECS - Tight window after launch for unattributed chromium tmp (seconds).
- MTIME_
SKEW_ SECS - Skew allowance when comparing mtime/ctime to
not_before(seconds). - SINGLETON_
MAX_ BYTES - Max file/dir payload size treated as Singleton-only residue (bytes).
- SINGLETON_
MAX_ ENTRIES - Max directory entries allowed when classifying Singleton-only residue.
- STALE_
MIN_ AGE_ SECS - Minimum age for cross-run stale Singleton GC (seconds).
Functions§
- discover_
owned_ chromium_ tmp_ side_ channels - Discover Chromium side-channel paths in the process temp dir that belong to this launch (GAP-020).
- index_
proc_ cmdlines Unix - One-shot index of live process cmdlines under
/proc(unix). - list_
cli_ chrome_ marker_ dirs - Collect residual marker profile dirs left under temp (should be empty after healthy DIE).
- residual_
disk_ report - Snapshot residual disk hygiene without mutating the filesystem.
- scavenge_
owned_ chromium_ tmp_ orphans - FINALIZE scavenger (GAP-A002): wipe owned Chromium tmp leftovers that are
safe to remove — our uid, chromium/cli marker name, no live process holding
the path, and either created after
not_beforeor Singleton-only / empty. - scavenge_
stale_ singleton_ orphans - Cross-run GC of stale Singleton-only Chromium tmp + CLI marker orphans (RES-02).
- scavenge_
stale_ singleton_ orphans_ with_ min_ age - Same as
scavenge_stale_singleton_orphanswith an explicit age floor.