Skip to content

[Sad Catapella B8][Notebook reliability] Failed folder preflight escapes the widget handler without clearing the prior checked state #101

Open

Description

@guijacquemet

Basis

Batch 8 at d7a538e56d41ac1093ba79adcad397c21b3dfd32. Confirmed missing exception/state cleanup branch, but actual user-visible triggering conditions depend on the exception source. No test or injected failure executed in this audit.

Evidence

  • check_folder() lines 653–680 wraps preflight(...) in try/finally to restore button state but has no except path to show a readable failure, clear/revoke an earlier preflight, mapping, confirmations and run state, or display technical details.
  • _folder_edited() lines 1056–1076 clears state only if the folder path changes, not if its contents changed but a same-path recheck fails.
  • Run failure UI already catches unexpected exceptions and shows a readable technical report, demonstrating the established UI error-handling pattern. Existing notebook tests cover normal button restoration but not preflight raising.

Scenario / impact

After a successful check and confirmations, the same experiment's files or metadata become unavailable (e.g. transient storage error). The user clicks Check folder again; if preflight() raises an unanticipated OSError/RuntimeError, the exception escapes with a traceback, while the old checked result and UI confirmations remain displayed. run_experiment still rechecks inputs and may refuse to run, but the notebook shows stale readiness. This is UI integrity/recovery, not proven incorrect pixels or output.

Fix / acceptance

Add a fail-closed exception path: invalidate stale checked state and confirmations, restore the button and show type(exc).__name__ and actionable guidance in the folder card; append traceback to Technical details, avoiding silent fallback to old results. Preserve explicit nonexception validation issues from preflight. Regression: inject a failure on a same-folder recheck after successful confirmation, verify exception handling, cleared readiness, no write/run, and successful recovery after next valid recheck. No Numba value.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions