fabro/lib/crates/fabro-cli/src
Bryan Helmkamp b87265867a
fix(archive): close mutation gaps and correct error mapping
Four fixes from post-merge review:

- Freeze archived runs on the remaining write surfaces the Unit 4 audit
  missed: `put_stage_artifact`, `put_sandbox_file`, and `write_run_blob`
  now all call `reject_if_archived` so a client cannot mutate artifacts,
  sandbox files, or blobs on an archived run.

- Widen the `append_run_event` lifecycle denylist to cover every event
  with a dedicated operation endpoint: archive, unarchive, and the three
  control-request events (cancel/pause/unpause). Worker-emitted lifecycle
  transitions and rewind's `RunRewound` / `RunSubmitted` replay still flow
  through the endpoint as before.

- Map `fabro_store::Error::RunNotFound` to a distinct `Error::RunNotFound`
  at the operations layer so the archive and unarchive HTTP handlers return
  a 404 on unknown run ids instead of collapsing into a generic 500.

- Centralize the archived-run guard in `operations::rewind` by threading
  `current_status` through `RewindInput` and calling the new
  `ensure_not_archived` helper alongside a shared canonical error message.
  The CLI caller drops its ad-hoc string comparison in favor of the typed
  status it already loads from the server.
2026-04-19 17:22:56 -04:00
..
commands fix(archive): close mutation gaps and correct error mapping 2026-04-19 17:22:56 -04:00
shared fix(cli): improve device code login readability with blank line spacing 2026-04-16 07:20:57 -04:00
sleep_inhibitor refactor(async): lint std::process::Command across all targets 2026-04-12 13:35:57 -04:00
args.rs feat(cli): add fabro archive and fabro unarchive commands 2026-04-19 16:56:53 -04:00
command_context.rs refactor(cli): route global args through settings layer 2026-04-14 12:27:59 -04:00
gh.rs feat(install): let user choose GitHub App owner (personal or org) 2026-04-10 09:32:05 -04:00
landing.rs feat(cli): add fabro docs to landing Set up section 2026-04-17 09:03:40 -04:00
logging.rs fmt 2026-04-11 11:27:46 -04:00
main.rs feat(cli): show curated landing output for bare fabro 2026-04-17 08:59:03 -04:00
manifest_builder.rs refactor(config): move project state under .fabro 2026-04-11 12:55:46 -04:00
server_client.rs feat(cli+web): wire archived into listing visibility 2026-04-19 16:58:55 -04:00
server_runs.rs refactor(runs): blocked status canonicalization cleanup (#165) 2026-04-19 14:53:46 -04:00
sse.rs refactor(cli): stream run attach over SSE 2026-04-07 12:58:37 -04:00
user_config.rs fix: wrap propagated io errors with anyhow context across prod code 2026-04-17 11:44:38 -04:00