Check External Sentinel Staleness for targets
Path to sentinel file, either relative to project root or absolute
Character vector of input file paths, either relative to project root or absolute
Action when sentinel missing: "stop" (default) or "warn"
Action when sentinel stale: "stop" (default), "warn", or "delete"
Relative path to sentinel (invisibly) if valid, otherwise stops with informative error
All paths are resolved relative to the project root using `here::here()`. Absolute paths are automatically converted to relative paths for comparison with stored paths, ensuring consistency across platforms and working directories.
All timestamps are compared in UTC, ensuring correct staleness detection even when sentinels are shared across machines in different timezones.
Validates sentinel by checking: 1. Sentinel file exists 2. Input files haven't changed since external process ran (compared in UTC) 3. All expected input files are tracked in sentinel
If validation fails, provides clear error message and optionally deletes stale sentinel.
if (FALSE) { # \dontrun{
# Using relative paths (recommended)
check_external_sentinel(
sentinel_path = ".external/job_complete.json",
input_files = c("data/raw.csv", "params.json")
)
} # }