Skip to content

Hotfix 4.3.1 - #116

Merged
LeChatP merged 2 commits into
mainfrom
hotfix-4.3.1
Nov 8, 2026
Merged

LeChatP merged 2 commits into
mainfrom
hotfix-4.3.1

Conversation

@LeChatP

@LeChatP LeChatP commented Nov 8, 2026

Copy link
Copy Markdown
Owner

No description provided.

…es the version of the format

* fix: chsr upgrade rewrote every file whose version was not the version of the package, even when no migration changed it: at each release, 4.3.1 included, the postinst of the package ran chsr upgrade, which failed through dosr (t_root, without CAP_LINUX_IMMUTABLE) and printed "run dosr chsr upgrade" for nothing; decided by the maintainer: the version of a file does not change when nothing else does
* fix: a file that this version reads as it is (from UNCHANGED_SINCE, 4.1.0) is up to date: chsr upgrade and --check leave it with its version; an older one is migrated as before
* feat: FORMAT_VERSION (4.3.0), the last version whose migration changes the documents, up or down: chsr writes it in a file that it saves and in the data that it creates, where it wrote its own version; the dosr of 4.3.0, which refuses a newer version, then reads a file saved by 4.3.1, a downgrade between them included
* fix: chsr upgrade --check only reads the policy, and chsr upgrade reads it first and opens it for writing only when a file is to upgrade: both work on an up to date immutable policy without CAP_LINUX_IMMUTABLE, where chsr always opened it for writing and failed with "Operation not permitted"
* fix: chsr upgrade --to the version that a file already has reports it, where it gave "its version is not known, or is already" as an error
* chore: the report says "<file>: <its version>, up to date" and "upgraded from <version> to 4.3.0", the editor "migrated to 4.3.0"
* tests: test_format_version: the migrations after FORMAT_VERSION change nothing both ways, a document of FORMAT_VERSION or of the current version is not migrated, new data is written for FORMAT_VERSION; 4.1.0 and 4.2.0 documents are read as they are; test_upgrade_access; test_upgrade_reads_an_up_to_date_policy_only: a 4.1.0 file that cannot be written is checked and upgraded through read-only settings and stays as it was, a 4.0.3 one is to upgrade, which fails on the former code; test_upgrade_to_an_older_version: once written for 4.1.0, the file is up to date and keeps 4.1.0; the tests that read PACKAGE_VERSION in a saved file read FORMAT_VERSION
* tests: e2e.sh upgrade_without_cap_linux_immutable: under capsh --drop=cap_linux_immutable, chsr upgrade and --check succeed on the immutable policy, and fail with a 4.0.3 file planted

Co-Authored-By: Claude
@codecov

codecov Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.07143% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.47%. Comparing base (cd24d03) to head (cd76aeb).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
core/src/file.rs 66.66% 3 Missing ⚠️
core/src/database/versionning.rs 66.66% 1 Missing ⚠️
src/chsr/cli/process/upgrade.rs 85.71% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #116   +/-   ##
=======================================
  Coverage   80.47%   80.47%           
=======================================
  Files          65       65           
  Lines        8547     8586   +39     
=======================================
+ Hits         6878     6910   +32     
- Misses       1669     1676    +7     
Flag Coverage Δ
admin-unittests 80.47% <91.07%> (+0.03%) ⬆️
unittests 79.74% <91.07%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@LeChatP
LeChatP merged commit 1f50aec into main Nov 8, 2026
9 checks passed
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.

1 participant