diff --git a/AGENTS.md b/AGENTS.md index 14dbaf0..6c98d23 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -49,14 +49,29 @@ jb inspectcode CSharp_CHDSharp.sln --severity=WARNING # ReSharper inspections - Keep ReSharper inspections clean too: `jb inspectcode CSharp_CHDSharp.sln --severity=WARNING` must report zero findings. The four vendored codec projects - `VendoredFlac`, `VendoredLZMA`, `VendoredZLib` and `VendoredZSTD` - are excluded from InspectCode entirely - (`--exclude="Vendored*/**"`, projects and sources). They must stay verbatim for byte-for-byte - `chdman` parity: never edit them to satisfy an inspection, and never remove the exclusion. The - same rule lives in the root `.editorconfig` so IDE inspections stay quiet inside those folders. + (`--exclude="Vendored*/**"`, projects and sources); never remove the exclusion. The same rule + lives in the root `.editorconfig` so IDE inspections stay quiet inside those folders. See + [Vendored codecs (frozen)](#vendored-codecs-frozen) before touching anything in those folders. InspectCode 2026.2 also logs a few internal `AssertionException`s while analyzing `VendoredZSTD` (an analyzer bug, not a finding); the report is still empty. - Always run `dotnet test` before committing. Run the battle harness for changes touching encoding, decoding, CLI argument parsing, or anything chdman-visible. +## Vendored codecs (frozen) + +`VendoredFlac`, `VendoredLZMA`, `VendoredZLib` and `VendoredZSTD` are kept byte-for-byte verbatim +from their upstream sources. They are **frozen by default**: editing them can break byte-for-byte +`chdman` parity, which is the project's most important invariant. + +- Do not edit a vendored codec unless a change is **strictly necessary** (for example a correctness + or security fix with no viable alternative), and never merely to satisfy an analyzer, formatter + or InspectCode finding. +- Keep the existing exclusions in the InspectCode command and the root `.editorconfig`; do not + remove them to make an inspection "see" the vendored sources. +- If a vendored edit is truly required, explain why in the commit message and run the full battle + harness plus the relevant codec tests before committing. +- Preserve all upstream license headers and notices. + ## Logging & bug reports (behavior to preserve) - The CLI and Tester configure Serilog at startup (`MinimumLevel.Debug`) and bridge the library @@ -68,7 +83,9 @@ jb inspectcode CSharp_CHDSharp.sln --severity=WARNING # ReSharper inspections format overrides, ...) are diagnostics about the user's input, not defects. Log them with `logger.UserError(...)` (`CHDSharpCli/UserErrorLogging.cs`), which keeps them at warning level in the console/file logs but tags them so `BugReportSink` never reports them. Real runtime failures - (`Open failed`, `* failed: {Message}`, verify failures, ...) stay on `logger.Warning(...)`. + (`Open failed`, I/O failures in a `* failed: {Message}` event, verify failures, ...) stay on + `logger.Warning(...)`; malformed input images (`InvalidDataException`, missing referenced files) + are user errors instead. - Every report must embed: `=== Environment Details ===` (Date, Application Name, Application Version, OS Version, Architecture, Bitness, Windows, Linux or MacOsX Version, Processor Count, Base Directory, Temp Path), `=== Error Details ===` (message), and `=== Exception Details ===` diff --git a/CHDSharpCli/Program.cs b/CHDSharpCli/Program.cs index c21504f..0cdc7ca 100644 --- a/CHDSharpCli/Program.cs +++ b/CHDSharpCli/Program.cs @@ -2275,14 +2275,17 @@ ref inputLengthFrames log.Information(" Created ({File:N0} bytes)", new FileInfo(outputPath).Length); VerifyResultChd(outputPath, parentPath); } + // Malformed descriptors and unreadable source images (unrecognized ISO sector size, + // malformed CUE/GDI/TOC, truncated BIN/WAV, missing referenced file) are user-input + // errors: the same input fails the same way in chdman, so they must not be reported + // as application defects. + catch (Exception ex) when (ex is InvalidDataException or FileNotFoundException) + { + log.UserError("--createcd failed: {Message}", ex.Message); + return false; + } catch (Exception ex) - when (ex - is ArgumentException - or InvalidDataException - or IOException - or UnauthorizedAccessException - or FileNotFoundException - ) + when (ex is ArgumentException or IOException or UnauthorizedAccessException) { log.Warning("--createcd failed: {Message}", ex.Message); return false; diff --git a/CHDSharpCli/README.md b/CHDSharpCli/README.md index 5953957..6ac70de 100644 --- a/CHDSharpCli/README.md +++ b/CHDSharpCli/README.md @@ -17,7 +17,7 @@ The binary is named `CHDSharp` (e.g. `CHDSharp.exe` on Windows). It accepts the same subcommands and options as MAME's `chdman`, plus additional convenience commands. -> **v1.6.2** - extraction failures keep their real cause: the underlying exception is logged, data/codec errors map to `Chderrdecompressionerror` and output I/O to `Chderrwriteerror`. Read-ahead teardown can no longer race a disposed semaphore, and damaged GD-ROM metadata returns `Chderrinvaliddata`. Six platform bundles are attached to every release (`CHDSharp_-_v.zip`). Release bundles are framework-dependent single-file binaries and require the .NET 10 runtime; the library targets `net8.0` / `net9.0` / `net10.0`. +> **v1.6.3** - expected `createcd` input failures no longer create bug reports: malformed ISO/CUE/GDI/TOC images, truncated BIN/WAV sources and missing referenced files keep their unchanged console text and exit code but are tagged as user errors. Other I/O and runtime failures are still reported. Six platform bundles are attached to every release (`CHDSharp_-_v.zip`). Release bundles are framework-dependent single-file binaries and require the .NET 10 runtime; the library targets `net8.0` / `net9.0` / `net10.0`. --- diff --git a/CHDSharpLib/CHDSharpLib.csproj b/CHDSharpLib/CHDSharpLib.csproj index 7a6f436..f9e727b 100644 --- a/CHDSharpLib/CHDSharpLib.csproj +++ b/CHDSharpLib/CHDSharpLib.csproj @@ -18,7 +18,7 @@ git LICENSE.txt - v1.6.2: extraction diagnostics release. File-writing failures during extraction now log the real exception and return Chderrdecompressionerror for data/codec failures or Chderrwriteerror for output I/O instead of flattening every failure to Chderrwriteerror. Read-ahead teardown no longer races a disposed semaphore, and damaged GD-ROM metadata returns Chderrinvaliddata instead of throwing. No encoder output changes: the quick battle harness stays 3,174/3,174 checks byte-identical to chdman 0.289, and CD/GD-ROM extraction is verified byte-identical to chdman extractcd. No public API changes. Pure C# - zero native dependencies. Targets net8.0/net9.0/net10.0. + v1.6.3: diagnostics and documentation release. The CLI's createcd command now tags malformed images (InvalidDataException) and missing referenced files (FileNotFoundException) as expected user errors, so they stay in the console/file logs but are no longer posted to the Bug Report API; console text and exit codes are unchanged and other runtime failures are still reported. AGENTS.md now documents the vendored codec projects as frozen for chdman byte parity. No public API or encoder output changes: 4,220 library tests + 455 encoder tests, jb inspectcode 0 findings, quick battle harness 905/905 checks. Pure C# - zero native dependencies. Targets net8.0/net9.0/net10.0. true $(WarningsAsErrors);CS1591 diff --git a/CHDSharpLib/README.md b/CHDSharpLib/README.md index ff1aac7..9644172 100644 --- a/CHDSharpLib/README.md +++ b/CHDSharpLib/README.md @@ -20,12 +20,19 @@ --- +## What's New in v1.6.3 + +- **CLI-side input errors no longer become bug reports** - `--createcd` now tags malformed images (`InvalidDataException`) and missing referenced files (`FileNotFoundException`) as expected user errors. Console output and exit codes are unchanged; other runtime failures are still reported. No library API or encoder behavior changed. +- **Vendored codecs are frozen** - `AGENTS.md` documents that `VendoredFlac`, `VendoredLZMA`, `VendoredZLib` and `VendoredZSTD` stay verbatim for byte-for-byte `chdman` parity and are only to be edited when strictly necessary. +- **No public API changes** - 4,220 library tests + 455 encoder tests on each of `net8.0`/`net9.0`/`net10.0`, `jb inspectcode` 0 findings, quick battle harness 905/905 checks. + ## What's New in v1.6.2 - **Extraction failures keep their real cause** - a failed extracted-file write now logs the underlying exception and returns `Chderrdecompressionerror` for data/codec failures or `Chderrwriteerror` for output I/O instead of reporting every exception as a write error. - **Read-ahead teardown race fixed** - `ReadAheadManager.TryGet`/`Clear` ignore a semaphore released after disposal, so teardown cannot surface an unobserved `ObjectDisposedException`. - **Damaged GD-ROM metadata is reported** - `ExtractToDirectoryWithReporting` returns `Chderrinvaliddata` when a GD-ROM CHD has no readable tracks instead of dereferencing a null track list. - **No public API changes** - 4,219 library tests + 455 encoder tests, `jb inspectcode` 0 findings, quick battle harness 3,174/3,174 checks with byte-identical `chdman` output. + ## What's New in v1.6.1 - **Automatic bug reports now only cover real bugs** - CLI diagnostics for expected user input (bad flags, invalid numbers, missing paths, sector-misaligned sources, an existing output without `--force`, overridden format options) are logged at warning level but tagged so the Bug Report API never receives them; runtime failures are still reported. No library code changed. diff --git a/CHDSharpTest/CliIntegrationTests.cs b/CHDSharpTest/CliIntegrationTests.cs index 32026c8..7f7ebf1 100644 --- a/CHDSharpTest/CliIntegrationTests.cs +++ b/CHDSharpTest/CliIntegrationTests.cs @@ -196,4 +196,29 @@ public void Createdvd_reports_usage_error_when_arguments_are_missing() StringComparison.Ordinal ); } -} \ No newline at end of file + + [Fact] + public void Createcd_rejects_iso_size_that_is_not_sector_aligned() + { + // cdrom.cpp:2078 - parse_iso only accepts sizes that are a multiple of 2048, + // 2336 or 2352. This is an expected input error, not a defect. + var dir = Path.Combine(Path.GetTempPath(), "chdsharp-createcd-" + Guid.NewGuid().ToString("N")); + Directory.CreateDirectory(dir); + try + { + var input = Path.Combine(dir, "odd.iso"); + File.WriteAllBytes(input, new byte[1000]); + var output = Path.Combine(dir, "out.chd"); + + var (exitCode, log) = RunCli("createcd", "--input", input, "--output", output); + + Assert.Equal(1, exitCode); + Assert.Contains("Unrecognized ISO sector size", log, StringComparison.Ordinal); + Assert.False(File.Exists(output)); + } + finally + { + Directory.Delete(dir, recursive: true); + } + } +} diff --git a/CHDSharpTest/README.md b/CHDSharpTest/README.md index 34ae1e9..65c5d38 100644 --- a/CHDSharpTest/README.md +++ b/CHDSharpTest/README.md @@ -14,7 +14,7 @@ **xUnit unit and corpus test suite for CHDSharp — tests header parsing, CRC checksums, and full decompression against a deterministic 30-file CHD corpus (V1–V5, all codecs).** -> **v1.6.2** - targets `net8.0` / `net9.0` / `net10.0`. 4,219 tests per target framework; encoder suite 455 tests; full battle harness 3,174/3,174 checks vs `chdman` 0.289; solution clean under `jb inspectcode`. v1.6.2 adds extraction-failure logging and read-ahead teardown-race regression tests. +> **v1.6.3** - targets `net8.0` / `net9.0` / `net10.0`. 4,220 tests per target framework; encoder suite 455 tests; quick battle harness 905/905 checks vs `chdman` 0.289; solution clean under `jb inspectcode`. v1.6.3 adds the `createcd` non-sector-aligned ISO regression test and classifies malformed input images as user errors. --- diff --git a/CHDSharpTestDataGeneration/README.md b/CHDSharpTestDataGeneration/README.md index b2ae906..5e2a033 100644 --- a/CHDSharpTestDataGeneration/README.md +++ b/CHDSharpTestDataGeneration/README.md @@ -14,7 +14,7 @@ **Deterministic CHD test corpus generator for the CHDSharp xUnit test suite.** -> **v1.6.2** - targets `net8.0` / `net9.0` / `net10.0`. Generates the 30-file corpus for V1-V5 via MAME 0.289 `chdman`; version-aligned with the v1.6.2 release. +> **v1.6.3** - targets `net8.0` / `net9.0` / `net10.0`. Generates the 30-file corpus for V1-V5 via MAME 0.289 `chdman`; version-aligned with the v1.6.3 release. Generates the 30-file CHD corpus in `CHDSharpTest/TestData/`, covering every format version (V1–V5), all compression codecs (zlib, lzma, huffman, flac, zstd, avhu + CD variants), every map type, and parent/child chains. All source images are built deterministically (seeded PRNG) so regenerating the corpus produces byte-identical output. diff --git a/Directory.Build.props b/Directory.Build.props index 6cbf6c2..e3868ea 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,8 +1,8 @@ - 1.6.2 - 1.6.2 - 1.6.2 + 1.6.3 + 1.6.3 + 1.6.3 enable enable embedded diff --git a/README.md b/README.md index 85cf236..bfb74bf 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,12 @@ Supports every CHD format version (V1–V5), all 10 compression codecs, parent/c --- +## What's New in v1.6.3 + +- **Expected `createcd` input errors stay out of the Bug Report API** - malformed ISO/CUE/GDI/TOC files, truncated BIN/WAV sources and missing referenced files are now logged through `logger.UserError(...)`. The console text and exit code are unchanged (the same input is rejected by `chdman` too), but these diagnostics are no longer POSTed as application defects. Other I/O and runtime failures are still reported. +- **Vendored codecs are explicitly frozen** - `AGENTS.md` now states that `VendoredFlac`, `VendoredLZMA`, `VendoredZLib` and `VendoredZSTD` stay byte-for-byte verbatim for `chdman` parity and may only be edited when strictly necessary, never to satisfy an analyzer or InspectCode finding. +- **Verification** - 4,220 library tests + 455 encoder tests on each of `net8.0`/`net9.0`/`net10.0`, `jb inspectcode` 0 findings, quick battle harness 905/905 checks. No public API or encoder-output changes. + ## What's New in v1.6.2 - **Extraction failures keep their real cause** - the extraction writers no longer flatten every exception to `Chderrwriteerror`. The underlying exception is logged at warning level, data/codec failures return `Chderrdecompressionerror`, and genuine output I/O failures return `Chderrwriteerror`. This is the fix behind the opaque `track N: Chderrwriteerror` reports. @@ -33,6 +39,7 @@ Supports every CHD format version (V1–V5), all 10 compression codecs, parent/c - **Damaged GD-ROM metadata returns an error instead of crashing** - `ExtractToDirectoryWithReporting` returns `Chderrinvaliddata` when a GD-ROM CHD yields no tracks. - **No encoder output changes** - quick battle harness 3,174/3,174 checks, byte-identical to `chdman` 0.289; CD (V3/V4/V5, cdfl/cdlz/cdzl/cdzs/default) and synthetic GD-ROM GDI extraction verified byte-identical to `chdman extractcd`. - **Verification** - 4,219 library tests + 455 encoder tests, `jb inspectcode` 0 findings. + ## What's New in v1.6.1 - **The bug-report API only receives real bugs** - expected user/usage errors are tagged via `logger.UserError(...)` and stay in the console and file logs without being posted as defects. That covers bad flags, invalid numbers, missing paths, sector-misaligned input, an existing output without `--force`, overridden format options and unsupported combinations (216 call sites). Genuine failures (`Open failed`, `* failed: {Message}`, verification and extraction failures) are still reported. diff --git a/WhatsNew.md b/WhatsNew.md index b6ce6ba..da0375c 100644 --- a/WhatsNew.md +++ b/WhatsNew.md @@ -1,11 +1,11 @@ -# CHDSharp v1.6.2 - What's New +# CHDSharp v1.6.3 - What's New -**Released:** 2026-11-02 - [Full changelog](docs/ReleaseNotes.md) - [NuGet](https://www.nuget.org/packages/CHDSharp/1.6.2) +**Released:** 2026-11-03 - [Full changelog](docs/ReleaseNotes.md) - [NuGet](https://www.nuget.org/packages/CHDSharp/1.6.3) -CHDSharp v1.6.2 is a diagnostics and extraction-robustness release. Extracted-file failures keep -their real cause instead of being flattened to `Chderrwriteerror`, read-ahead teardown cannot race -a disposed semaphore, and damaged GD-ROM metadata returns an error instead of crashing. Encoder -output is unchanged and remains byte-identical to MAME `chdman` 0.289. +CHDSharp v1.6.3 is a small diagnostics release. `createcd` now keeps expected malformed-input +failures out of the Bug Report API while preserving the exact `chdman`-compatible console text and +exit codes. The vendored codec libraries are explicitly documented as frozen, and no encoder output +changed. --- @@ -13,12 +13,12 @@ output is unchanged and remains byte-identical to MAME `chdman` 0.289. | Platform | Bundle | |----------|--------| -| Windows x64 | [`CHDSharp_win-x64_v1.6.2.zip`](https://github.com/purelogiccode/CHDSharp/releases/download/v1.6.2/CHDSharp_win-x64_v1.6.2.zip) | -| Windows ARM64 | [`CHDSharp_win-arm64_v1.6.2.zip`](https://github.com/purelogiccode/CHDSharp/releases/download/v1.6.2/CHDSharp_win-arm64_v1.6.2.zip) | -| Linux x64 | [`CHDSharp_linux-x64_v1.6.2.zip`](https://github.com/purelogiccode/CHDSharp/releases/download/v1.6.2/CHDSharp_linux-x64_v1.6.2.zip) | -| Linux ARM64 | [`CHDSharp_linux-arm64_v1.6.2.zip`](https://github.com/purelogiccode/CHDSharp/releases/download/v1.6.2/CHDSharp_linux-arm64_v1.6.2.zip) | -| macOS Intel | [`CHDSharp_osx-x64_v1.6.2.zip`](https://github.com/purelogiccode/CHDSharp/releases/download/v1.6.2/CHDSharp_osx-x64_v1.6.2.zip) | -| macOS Apple Silicon | [`CHDSharp_osx-arm64_v1.6.2.zip`](https://github.com/purelogiccode/CHDSharp/releases/download/v1.6.2/CHDSharp_osx-arm64_v1.6.2.zip) | +| Windows x64 | [`CHDSharp_win-x64_v1.6.3.zip`](https://github.com/purelogiccode/CHDSharp/releases/download/v1.6.3/CHDSharp_win-x64_v1.6.3.zip) | +| Windows ARM64 | [`CHDSharp_win-arm64_v1.6.3.zip`](https://github.com/purelogiccode/CHDSharp/releases/download/v1.6.3/CHDSharp_win-arm64_v1.6.3.zip) | +| Linux x64 | [`CHDSharp_linux-x64_v1.6.3.zip`](https://github.com/purelogiccode/CHDSharp/releases/download/v1.6.3/CHDSharp_linux-x64_v1.6.3.zip) | +| Linux ARM64 | [`CHDSharp_linux-arm64_v1.6.3.zip`](https://github.com/purelogiccode/CHDSharp/releases/download/v1.6.3/CHDSharp_linux-arm64_v1.6.3.zip) | +| macOS Intel | [`CHDSharp_osx-x64_v1.6.3.zip`](https://github.com/purelogiccode/CHDSharp/releases/download/v1.6.3/CHDSharp_osx-x64_v1.6.3.zip) | +| macOS Apple Silicon | [`CHDSharp_osx-arm64_v1.6.3.zip`](https://github.com/purelogiccode/CHDSharp/releases/download/v1.6.3/CHDSharp_osx-arm64_v1.6.3.zip) | Every bundle contains a **framework-dependent single-file** `CHDSharp` / `CHDSharp.exe` build (the .NET runtime is **not** embedded) plus `LICENSE.txt`, `README.md`, `README.txt` @@ -27,34 +27,35 @@ is required. --- -## Fixed: extraction failures keep their real cause +## Fixed: expected `createcd` input errors no longer become bug reports -Every exception raised while writing extracted data was folded into -`ChdError.Chderrwriteerror`, so a codec, path, permission or disk failure all looked the same and -callers could not tell a damaged CHD from an unwritable output volume. This is what produced the -opaque `track 3: Chderrwriteerror` reports in consuming applications. +A report showed `--createcd failed: "Unrecognized ISO sector size (...)"` being filed as an +application defect. That input is rejected by `chdman` too (`cdrom.cpp:2078`, `parse_iso`): a +raw ISO must be a multiple of 2048, 2336 or 2352 bytes. -- The extraction writers now log the underlying exception at warning level. -- `InvalidDataException` (data/codec failure) maps to `Chderrdecompressionerror`; output I/O maps to - `Chderrwriteerror`. -- A regression test forces an unwritable target and asserts the warning and the returned code. +- `createcd` now logs `InvalidDataException` (malformed ISO/CUE/GDI/TOC, truncated BIN/WAV, + invalid source layout) and `FileNotFoundException` (missing referenced file) through + `logger.UserError(...)`. The event stays at warning level in the console and rolling file logs, + and the console text and exit code are unchanged, but it is no longer POSTed to the Bug Report + API. +- Other `ArgumentException` / `IOException` / `UnauthorizedAccessException` failures still use + `logger.Warning(...)` and are still reported. +- Regression test `Createcd_rejects_iso_size_that_is_not_sector_aligned` covers the reported + non-sector-aligned ISO path. -## Fixed: read-ahead teardown race +## Documentation: vendored codecs are frozen -`ReadAheadManager.TryGet` and `Clear` can run while `Dispose` releases the semaphore. A permit -release after disposal is now ignored, so teardown cannot surface an unobserved -`ObjectDisposedException`. - -## Fixed: damaged GD-ROM metadata - -`ExtractToDirectoryWithReporting` returns `Chderrinvaliddata` when a GD-ROM CHD has no readable -tracks instead of dereferencing a null track list. +`AGENTS.md` now has a **Vendored codecs (frozen)** section: `VendoredFlac`, `VendoredLZMA`, +`VendoredZLib` and `VendoredZSTD` are kept byte-for-byte verbatim for `chdman` parity and may only +be edited when strictly necessary - never to satisfy an analyzer, formatter or InspectCode finding. +The existing InspectCode and `.editorconfig` exclusions remain in place. ## Verification -- `dotnet build -c Release`: 0 warnings, 0 errors; `jb inspectcode --severity=WARNING`: 0 findings. -- Library tests: **4,219 passed**. Encoder tests: **455 passed**. -- Quick `chdman` parity battle: **3,174/3,174 checks passed**, byte-identical output. -- CD (V3/V4/V5, all CD codecs) and synthetic GD-ROM GDI extraction compared byte-for-byte with - `chdman extractcd`. -- No public API changes - behavior and diagnostics only. \ No newline at end of file +- `dotnet build -c Release`: 0 warnings, 0 errors. +- `jb inspectcode --severity=WARNING --exclude="Vendored*/**"`: **0 findings**; no vendored sources + were modified. +- Library tests: **4,220 passed** and encoder tests: **455 passed** on each of `net8.0`, `net9.0` + and `net10.0`. +- Quick `chdman` parity battle: **905/905 checks passed**, byte-identical output. +- No public API changes and no encoder output changes. diff --git a/docs/ReleaseNotes.md b/docs/ReleaseNotes.md index 37d1dbf..6e78913 100644 --- a/docs/ReleaseNotes.md +++ b/docs/ReleaseNotes.md @@ -1,5 +1,42 @@ # CHDSharp Release Notes +## CHDSharp v1.6.3 + +Diagnostics and documentation release on top of v1.6.2. No public API or encoder-output changes. + +**Released:** 2026-11-03 - [NuGet](https://www.nuget.org/packages/CHDSharp/1.6.3) - +[CLI bundles](https://github.com/purelogiccode/CHDSharp/releases/tag/v1.6.3) + +### Expected `createcd` input failures stay out of the Bug Report API + +A report showed `--createcd failed: "Unrecognized ISO sector size (1866629376 bytes is not a +multiple of 2048, 2336 or 2352)"` being filed as an application defect. The input is correctly +rejected by `chdman` too (`cdrom.cpp:2078`, `parse_iso`): the file is not a valid raw ISO. + +- `createcd` now logs `InvalidDataException` (malformed ISO/CUE/GDI/TOC, truncated BIN/WAV, + invalid source layout) and `FileNotFoundException` (missing referenced file) through + `logger.UserError(...)`. The event stays at warning level in the console/file logs and the + console text and exit code are unchanged, but it is no longer POSTed to the Bug Report API. +- `ArgumentException`, `IOException` and `UnauthorizedAccessException` failures still go through + `logger.Warning(...)` and are still reported. +- Regression test `Createcd_rejects_iso_size_that_is_not_sector_aligned` covers the reported path. + +### Vendored codecs are documented as frozen + +`AGENTS.md` now has a dedicated **Vendored codecs (frozen)** section: `VendoredFlac`, +`VendoredLZMA`, `VendoredZLib` and `VendoredZSTD` stay byte-for-byte verbatim for `chdman` parity +and may only be edited when strictly necessary, never to satisfy an analyzer, formatter or +InspectCode finding. The existing InspectCode and `.editorconfig` exclusions remain in place. + +### Verification + +- `dotnet build -c Release`: 0 warnings, 0 errors. +- `jb inspectcode --severity=WARNING --exclude="Vendored*/**"`: 0 findings; vendored sources were + not modified. +- Library tests: 4,220 passed and encoder tests: 455 passed on each of `net8.0`, `net9.0` and + `net10.0`. +- Quick battle harness: 905/905 checks, byte-identical `chdman` output. + ## CHDSharp v1.6.2 Diagnostics and extraction-robustness release on top of v1.6.1. No public API changes. diff --git a/docs/building.md b/docs/building.md index a33c859..6b05e6f 100644 --- a/docs/building.md +++ b/docs/building.md @@ -32,7 +32,7 @@ CSharp_CHDSharp.sln ├── VendoredLZMA/ LZMA SDK C# port ├── VendoredFlac/ Pure C# FLAC encoder/decoder ├── VendoredZSTD/ Pure C# zstd 1.5.5 encoder/decoder (MAME parity) -└── Directory.Build.props Centralized versioning (1.6.2) and analyzer setup +└── Directory.Build.props Centralized versioning (1.6.3) and analyzer setup ``` --- @@ -52,7 +52,7 @@ dotnet build CHDSharpLib/CHDSharpLib.csproj -c Release ### Centralized versioning -`Directory.Build.props` defines a single `` (currently `1.6.2`) that all projects inherit, so `AssemblyVersion`, `FileVersion`, and the NuGet package version stay in sync automatically. +`Directory.Build.props` defines a single `` (currently `1.6.3`) that all projects inherit, so `AssemblyVersion`, `FileVersion`, and the NuGet package version stay in sync automatically. ### Code style & analyzers @@ -185,7 +185,7 @@ For every runtime identifier the script publishes the CLI as a **framework-depen single-file** binary (`--self-contained false -p:PublishSingleFile=true` — the .NET runtime is *not* embedded), appends `LICENSE.txt`, `README.md`, `README.txt` and `WhatsNew.md`, and writes `CHDSharp__v.zip` (the exact asset name the CLI's -built-in update check looks up on GitHub releases, e.g. `CHDSharp_win-x64_v1.6.2.zip`). +built-in update check looks up on GitHub releases, e.g. `CHDSharp_win-x64_v1.6.3.zip`). Existing files in the output path are never deleted. The binary is named `CHDSharp` (`CHDSharp.exe` on Windows); bundles require the .NET 10 runtime.