Skip to main content

Module sweep

Module sweep 

Source
Expand description

The startup sweep: the one list of housekeeping that serve runs at startup and gc reuses (spec “gc”). Every failure is collected, never fatal.

Structs§

SweepReport

Constants§

STALE_FILE_MS
Sentinel files and claim temps are removed when untouched for this long.

Functions§

age_ms 🔒
is_sentinel_name 🔒
pair_file_parts 🔒
pair.<id>.<rest> -> (id, rest) for a valid id.
pair_is_dead
The pair’s record is gone, or both its sides read dead or none. The record is looked up by the id in the FILE NAME, and liveness is derived for that id even if the record’s contents disagree. An unreadable record is not “dead”.
startup_sweep
Log retention, dead stdout dirs, aged created.*, resume-lock files whose owner is dead, opencode-pair.exe.old (Windows), sentinel files without a record older than 24 h and *.tmp-* claim temps older than 24 h.
sweep_old_launcher
Windows launcher leftover: opencode-pair.exe.old under the launcher install directory.