Skip to content

Commit e29269f

Browse files
authored
fix(schedule): pin the job's state and log, and report failed runs (#81)
The launchd plist took its log path from the creating shell's VANA_HOME but started the job without it, so a schedule made from a test state collected into ~/.vana while logging into a /tmp home the OS wiped. With --quiet the run printed nothing and exited 0 even when every sync failed. - schedule add writes EnvironmentVariables (VANA_HOME always, plus network, account and server selection when set; never tokens) and puts the log in that home's logs dir; the cron line carries the same env. Re-running add repairs an outdated job, keeps its interval and says what was wrong. - schedule list shows the state and log the job uses and warns when the job is outdated or serves a different state than the current shell. - collect --all exits 1 when any source failed to collect or sync (5 when the only problem is that no Personal Server answered) and names each failed source on stderr, even under --quiet. - A scheduled run records its outcome in state and vana status shows the last one, with the failure count and log path when it failed. Claude-Session: https://claude.ai/code/session_01Fcv6uEy4zcXaigzDNxeW3j
1 parent 887e98d commit e29269f

7 files changed

Lines changed: 1497 additions & 422 deletions

File tree

‎docs/CLI-EXIT-CODE-MATRIX.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ field carries the finer-grained reason (`owner_not_ready`, `grant_revoked`,
3838
`exitCodeForOutcome`; the mapping for their statuses is:
3939
`personal_server_unavailable -> 5`, `needs_input -> 7`, success -> `0`,
4040
everything else `1`.
41+
- `collect --all` (what the schedule runs) exits `0` only when every source
42+
it touched collected and synced. A source whose sync failed, even though
43+
its data was kept locally, makes it exit `1`; when the only problem is
44+
that no Personal Server answered, it exits `5`. Each failed source is
45+
named on stderr, also under `--quiet`.
4146
- The builder command group (`vana app ...`) emits through the mapper from
4247
its first release.
4348

0 commit comments

Comments
 (0)