fix(scan): a failed run says why in plain words, never with a raw error #414

Merged
sharang merged 1 commits from fix/run-error-message into main 2026-09-26 11:01:05 +00:00
Owner

Follow-up to #409/#413: the run-level error.

A failed scan run stored the error it stopped on, verbatim, as error_message: git2, I/O or database errors that can carry server paths and internal details, in English, on the German UI.

Change

  • Core: ScanRun gains error_code: Option<RunErrorCode>: repository_unreachable, archive_password_required, archive_password_wrong, interrupted, internal. It's serde(default), so older runs still load.
  • Agent:
    • AgentError::run_failure() maps each error to a code and a plain English sentence.
    • The orchestrator stores those; the raw error stays in the log, which it already went to.
    • The startup recovery also stamps interrupted.
  • Dashboard: scans::run_error words the code in German or English with what to do next, for example "Das Repository ließ sich nicht klonen. Bitte Adresse und Zugangstoken beim Prüfobjekt unter „Bearbeiten“ prüfen."
    • An interrupted run shows only its existing hint, not a second line.
    • Runs recorded before codes existed keep their stored message.

Checks

  • fmt, and clippy with the CI flags on core, agent, MCP and both dashboard feature sets.
  • Tests: core 74, agent lib 455, dashboard 42 + 58, and the Mongo integration test lifecycle.
  • New tests:
    • an I/O error with a server path yields a message without it;
    • German wording, plus the fallback for old runs.

Merge after #413. Both append to i18n/texts.rs; I'll rebase this once #413 is in.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p

Follow-up to #409/#413: the run-level error. A failed scan run stored the error it stopped on, verbatim, as `error_message`: git2, I/O or database errors that can carry server paths and internal details, in English, on the German UI. ## Change - **Core:** `ScanRun` gains `error_code: Option<RunErrorCode>`: repository_unreachable, archive_password_required, archive_password_wrong, interrupted, internal. It's `serde(default)`, so older runs still load. - **Agent:** - `AgentError::run_failure()` maps each error to a code and a plain English sentence. - The orchestrator stores those; the raw error stays in the log, which it already went to. - The startup recovery also stamps `interrupted`. - **Dashboard:** `scans::run_error` words the code in German or English with what to do next, for example *"Das Repository ließ sich nicht klonen. Bitte Adresse und Zugangstoken beim Prüfobjekt unter „Bearbeiten“ prüfen."* - An interrupted run shows only its existing hint, not a second line. - Runs recorded before codes existed keep their stored message. ## Checks - fmt, and clippy with the CI flags on core, agent, MCP and both dashboard feature sets. - Tests: core 74, agent lib 455, dashboard 42 + 58, and the Mongo integration test `lifecycle`. - New tests: - an I/O error with a server path yields a message without it; - German wording, plus the fallback for old runs. **Merge after #413.** Both append to `i18n/texts.rs`; I'll rebase this once #413 is in. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang added 1 commit 2026-09-26 10:48:38 +00:00
fix(scan): a failed run says why in plain words, never with a raw error
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 7m53s
83bfa3edd3
A failed scan run stored the error it stopped on, verbatim: git2, I/O or
database errors that can carry server paths and internal details, in
English, on the German UI.

A failed run now records a stable error_code (repository unreachable,
archive password required or wrong, interrupted, internal) and a plain
English error_message; the raw error stays in the log, where it already
was. The dashboard words the code in German or English with what to do
next. A run interrupted by a restart shows only its existing hint. Runs
recorded before codes existed keep their stored message.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang force-pushed fix/run-error-message from 91167f3da0 to 83bfa3edd3 2026-09-26 10:48:38 +00:00 Compare
sharang merged commit a35b57ee50 into main 2026-09-26 11:01:05 +00:00
Sign in to join this conversation.