tidy: project finished backup jobs onto host row + smoke doc tweaks #20

Merged
steve merged 1 commits from tidy-up-last-backup-projection into main 2026-05-07 17:58:16 +01:00
Owner

Summary

  • Fix: the WS `job.finished` handler had a switch on `job.kind` covering `init` (writes `hosts.repo_status`) but silently dropped `backup` terminations. The dashboard's "Last backup" column reads `hosts.last_backup_at` / `last_backup_status` and was therefore stale until the next snapshot-list push refreshed something else. Add a `SetHostLastBackup` store method and a `case api.JobBackup:` arm.
  • Doc: CLAUDE.md restage block referenced `/tmp/rm-smoke` (the original smoke env path); the dev box runs out of `$HOME/smoke`. Updated to match.

Test plan

  • Trigger a backup on any host. After completion, check that the dashboard "Last backup" column updates without waiting for a snapshot-list refresh.
  • `go test ./internal/store/ ./internal/server/ws/` green (covered by existing tests; the new `SetHostLastBackup` is a one-line UPDATE).
## Summary - Fix: the WS \`job.finished\` handler had a switch on \`job.kind\` covering \`init\` (writes \`hosts.repo_status\`) but silently dropped \`backup\` terminations. The dashboard's "Last backup" column reads \`hosts.last_backup_at\` / \`last_backup_status\` and was therefore stale until the next snapshot-list push refreshed something else. Add a \`SetHostLastBackup\` store method and a \`case api.JobBackup:\` arm. - Doc: CLAUDE.md restage block referenced \`/tmp/rm-smoke\` (the original smoke env path); the dev box runs out of \`\$HOME/smoke\`. Updated to match. ## Test plan - [ ] Trigger a backup on any host. After completion, check that the dashboard "Last backup" column updates without waiting for a snapshot-list refresh. - [ ] \`go test ./internal/store/ ./internal/server/ws/\` green (covered by existing tests; the new \`SetHostLastBackup\` is a one-line UPDATE).
steve added 1 commit 2026-05-07 17:55:40 +01:00
fix: project finished backup jobs onto host row + smoke path tweaks
CI / Test (store) (pull_request) Successful in 50s
CI / Test (rest) (pull_request) Successful in 1m5s
CI / Lint (pull_request) Successful in 24s
CI / Build (linux/amd64) (pull_request) Successful in 22s
CI / Build (windows/amd64) (pull_request) Successful in 43s
CI / Test (server-http) (pull_request) Successful in 1m51s
CI / Build (linux/arm64) (pull_request) Successful in 21s
711d5e964c
The dashboard's 'Last backup' column reads hosts.last_backup_at /
last_backup_status, but the WS handler only updated hosts.repo_status
on job.finished — backup terminations were silently dropped. Add a
SetHostLastBackup store method and call it from the same job.finished
switch that already handles init jobs.

Also: CLAUDE.md restage block uses /tmp/rm-smoke (the original
default) but the actual dev env runs out of $HOME/smoke. Update the
paths in the doc to match.
steve merged commit 9c098e773b into main 2026-05-07 17:58:16 +01:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: steve/restic-manager#20