Skip to content

fix(core): propagate history count failures - #309

Merged
StudentWeis merged 1 commit into
mainfrom
fix/history-count-errors
Oct 24, 2026
Merged

StudentWeis merged 1 commit into
mainfrom
fix/history-count-errors

Conversation

@StudentWeis

Copy link
Copy Markdown
Owner

Summary

Propagate repository count failures instead of treating an unreadable count as empty history. Consolidate repetitive updater version-parser tests without changing updater behavior.

Linked Issue

Closes #308

Changes

  • Return Result from storage length/emptiness and repository count APIs, and migrate all workspace callers.
  • Stop all three retention/ordinary-clear paths before mutation when reading the count fails.
  • Add redb fault-injection regressions that verify error propagation, preservation of records and rich-text sidecars, and successful retry.
  • Parameterize valid and invalid version tags, retaining prefix, prerelease, and build metadata coverage.
  • Leave database permissions unchanged, as requested.

Testing

  • scripts/precheck.sh passes locally: completed the equivalent --check --light checks and --check --rust phase, including formatting, resource validation, 83 script tests, dependency checks, workspace Clippy/tests, isolated Linux tray regression, and documentation.
  • New / updated tests cover the change: all three injected count-failure cases failed before the fix and pass after it.
  • The local mise rtk shim has no configured version; the validation subprocess excluded that shim directory from PATH and used cargo directly. No environment configuration was modified.
  • Native macOS/Windows GUI acceptance was not run locally; this change does not alter GUI interactions.

Self-Check

  • PR title follows Conventional Commits
  • No hardcoded user-facing strings — no visible strings changed
  • Errors defined with thiserror — existing repository error type reused
  • No unrelated changes mixed in

@StudentWeis
StudentWeis merged commit d5eb0a3 into main Oct 24, 2026
12 checks passed
@StudentWeis
StudentWeis deleted the fix/history-count-errors branch October 24, 2026 10:07
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.

fix: propagate history count failures during cleanup

1 participant