Skip to content

feat: admin purge --boards wipes the board inventory behind a [y/N] gate - #7

Merged
felipebalbi merged 6 commits into
mainfrom
feat/admin-purge-boards
Jun 17, 2026
Merged

felipebalbi merged 6 commits into
mainfrom
feat/admin-purge-boards

Conversation

@felipebalbi

Copy link
Copy Markdown
Owner

Summary

Adds an opt-in --boards flag to paavo-cli admin purge that, in addition to the existing jobs/logs/build-cache/artifacts reset, wipes the entire board inventory — behind a [y/N] confirmation that defaults to No and is bypassable with --yes/-y.

  • Daemon: POST /admin/purge?boards=true runs DELETE FROM board inside the same DB-lock scope as the existing job truncation (FK-safe: job.board_id is the only referrer and jobs are deleted first; schedule doesn't reference boards), then refreshes the in-memory inventory cache after the lock is dropped. The pre-existing 409 in-flight gate still runs first.
  • Default unchanged: no flag / boards=false preserves boards exactly as before (backward-compatible wire — no-query callers unaffected).
  • CLI: AdminOp::Purge gains --boards and --yes; a declined/empty/EOF answer prints purge aborted and exits 0 without any HTTP call.

Spec: docs/superpowers/specs/2026-06-17-purge-all-boards-design.md
Plan: docs/superpowers/plans/2026-06-17-purge-all-boards.md

Test Plan

  • cargo fmt --all -- --check clean
  • cargo clippy --workspace --all-targets -- -D warnings clean
  • cargo test --workspace green (1 hardware test #[ignore])
  • Daemon: ?boards=true deletes boards + clears inventory cache; ?boards=false preserves; ?boards=true still 409s when a job is running (crates/paavod/tests/api_admin.rs)
  • CLI: declined/empty answer aborts without a network call; --yes bypasses the prompt; --help lists --boards/--yes (crates/paavo-cli/tests/cli_admin_purge.rs, cli_help.rs)

@felipebalbi
felipebalbi merged commit eb300f0 into main Jun 17, 2026
3 checks passed
@felipebalbi
felipebalbi deleted the feat/admin-purge-boards branch June 17, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant