feat(pulse): schedule data-freshness daemons via Pulse cron so they run on Linux - #1653
Open
elhoim wants to merge 1 commit into
Open
feat(pulse): schedule data-freshness daemons via Pulse cron so they run on Linux#1653elhoim wants to merge 1 commit into
elhoim wants to merge 1 commit into
Conversation
… cron (Linux support)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Three data-freshness daemons ship with macOS-only launchd installers and no other install path:
DerivedSyncTOOLS/InstallDerivedSync.tsPRINCIPAL_TELOS.md) when their sources changeUsageAggregatorTOOLS/InstallUsageAggregator.tsWorkSweepTOOLS/InstallWorkSweep.tsAll three use
~/Library/LaunchAgents+launchctl, so on Linux they never run and their outputs silently drift. (Observed on a headless Linux box:PRINCIPAL_TELOS.mdand 22 other derivatives were stale because DerivedSync had never fired.)Fix
Schedule them through Pulse's built-in cron heartbeat — the same cross-platform move as the Conduit jobs — by adding three
[[job]]entries to the templatePULSE.toml:derived-sync— every 30 minusage-aggregator— nightly 03:30work-sweep— hourly (self-disables cleanly untilUSER/WORK/work_repo.jsonis configured)Commands run with
cwd = PULSE/, hence the../TOOLS/…paths. Pulse's existing missing-script preflight and consecutive-failure ceiling disable any job that can't run on a given install, so this is safe by construction.Verified (headless Linux)
All three run cleanly via
--dry-runand then live under Pulse's cron:DerivedSync— regenerated the drifted derivatives; re-run reports 0 drift.UsageAggregator— rolled up real per-day usage.WorkSweep— self-disabled cleanly (no work repo configured), exit 0.Note for macOS users
If you also bootstrapped the launchd agents, disable one of the two paths to avoid double-scheduling. The jobs are idempotent, but running each twice is wasteful. Longer term these launchd installers can be retired in favor of the Pulse-cron path.
(Depends conceptually on #1652, which fixes a
DeriveDenyHashescrash that would otherwise abort everyderived-syncrun.)