Skip to content

Correct four safety explanations that overstated or contradicted the code - #129

Merged
amrali-eg merged 2 commits into
masterfrom
docs/safety-wording-fixes
Sep 19, 2026
Merged

amrali-eg merged 2 commits into
masterfrom
docs/safety-wording-fixes

Conversation

@amrali-eg

Copy link
Copy Markdown
Owner

Summary

Wording only; no behaviour changes.

  • docs/SAFETY.md, install sequence: "If a required step fails, EC does not install converted output" also appeared to cover step 9 (marking the recovery record complete). That step runs after installation: EncodingConverter.cs:601 returns RecoveryRecordError with ReplacementCommitted = true. The text now says a failure before step 8 leaves the source unchanged, and a step 9 failure leaves verified converted output installed with the Prepared record.
  • docs/SAFETY.md, UTF-16/UTF-32: the -From utf-16le/utf-16be advice sat in the BOM-less UTF-32 section. It moved to the UTF-16 section; the UTF-32 section now names utf-32le and utf-32be.
  • ConversionPolicy.cs: "An unchanged file is not read or rewritten" was stale. It is not rewritten, but it is read and validated in full afterwards.
  • ConversionMetadata.cs: a CLI -From run is not an example of detection not running. Detection still runs for explicit sources, so null means detection identified no codec.

Verification

  • The UTF-32 names were checked through EC: utf-32le and utf-32be resolve (to utf-32 and utf-32BE). Against a BOM-less UTF-32LE file with -WhatIf: no -From exits 5, -From utf-32le exits 0, -From utf-32be exits 3 (decode error).
  • Build 0 warnings, full suite 917/917 (unchanged; comments and docs only).

🤖 Generated with Claude Code

amrali-eg and others added 2 commits September 20, 2026 01:45
…code

SAFETY.md said that a failed required step never installs converted output, but
a failure to mark the recovery record complete happens after installation and is
reported with the replacement committed. It also advised -From utf-16le or
utf-16be in the BOM-less UTF-32 section; that advice belongs to UTF-16, and the
UTF-32 section now names utf-32le and utf-32be, which EC resolves.

Two comments were stale: an unchanged file is not rewritten but is still read
and validated in full, and detection runs even when the source is chosen
explicitly, so a null detected codec means detection identified none.

Wording only; no behaviour changes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@amrali-eg
amrali-eg merged commit c2d9559 into master Sep 19, 2026
3 checks passed
@amrali-eg
amrali-eg deleted the docs/safety-wording-fixes branch September 19, 2026 23:10
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