fix(managed-cli): map undecodable staged files to unverified#369

merged1
main
fix/staged-decode-unverified
opened29d agobyLlux
View on GitHubGitHub import enabledPR last imported 3d ago

Summary

  • A staged checksum or VERSION file that is not valid UTF-8 raised UnicodeDecodeError, which failure_status() degraded to the generic error instead of the unverified tampering signal used for other refused content.
  • Decode failures in install() now fold into the existing checksum_file and version_file codes, so binary staged files report unverified like mismatched ones.
  • Observable result: same install refusal, but the widget renders the tampering signal instead of a generic error.

Related issue

None

Documentation impact

  • docs/development.md already documents that refused downloads report unverified; this change aligns the behavior with the doc, so no guide update is needed.
  • TODO.md is unaffected: no parity entry covers helper failure mapping.
  • Changelog: updated Unreleased.

Verification

  • New test test_binary_staged_files_report_unverified in tests/test_managed_cli.py (binary .sha256 and binary VERSION fixtures): observed red before the fix (UnicodeDecodeError message mismatch), green after.
  • make check: full suite green locally on the stacked tip 0e63e84. Skipped locally (tools absent, CI covers them): actionlint, pyflakes. QML hardening noted partial import/type checks locally ("CI requires full checks").
  • CI: green on 0e63e84 — check, smoke, smoke-runtime, pr-title all pass (run).

Visual changes

None

Review notes

  • Stacked on #368 (base fix/todo-gate-harden); retarget to main once #368 merges. This PR's own diff is only the managed_cli commit.
  • Only UnicodeDecodeError is folded in; a missing staged file still reports error, which fits a local staging problem rather than refused content.

Checks

All checks passed
CCopilotBotreviewed29d ago
Synced from GitHub

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Synced from GitHub

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 04a26c91-bfe0-4a55-80ea-f03fccf225d1


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Added 1 commit

  • fix(managed-cli): map undecodable staged files to unverifieda5f0987