diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index b023fd2..76500ee 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -41,7 +41,7 @@ jobs: $assets = New-Item -ItemType Directory -Path 'release-assets' Copy-Item $dll.FullName $package.FullName Copy-Item 'LICENSE.txt', 'INSTALLATION.md' $package.FullName - "Original author: Doug Henderson`nMaintained by: Lucas Lepski and contributors`nLicense: MPL-2.0`nSource: https://github.com/$env:GITHUB_REPOSITORY/tree/$env:GITHUB_SHA`nBuild: https://github.com/$env:GITHUB_REPOSITORY/actions/runs/$env:GITHUB_RUN_ID`n" | Set-Content "$package/SOURCE.txt" -Encoding utf8 + "Original author: @dougforpres`nMaintained by: @shurkanTwo and contributors`nLicense: MPL-2.0`nSource: https://github.com/$env:GITHUB_REPOSITORY/tree/$env:GITHUB_SHA`nBuild: https://github.com/$env:GITHUB_REPOSITORY/actions/runs/$env:GITHUB_RUN_ID`n" | Set-Content "$package/SOURCE.txt" -Encoding utf8 Compress-Archive -Path "$package/*" -DestinationPath "$assets/SonyCameraPlugin-$version.zip" Copy-Item $dll.FullName $assets.FullName $hashes = Get-ChildItem $assets.FullName -File | Sort-Object Name | ForEach-Object { diff --git a/CHANGELOG.md b/CHANGELOG.md index 16fb43a..3a4ca56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,28 +1,37 @@ # Sony Camera Plugin -## 1.0.0.6 — corrective community preview +## 1.0.0.7 — exposure error classification and release maintenance -Follow-up to the 1.0.0.5 audit, retaining all previously integrated contributions and Doug Henderson's original authorship. Install manually using [INSTALLATION.md](INSTALLATION.md). +- Use GitHub handles in plugin descriptions, author/contributor display metadata and the packaged source notice. Preserve the original copyright notice and commit authorship. +- Correct README version, release status and installation links; retain the explicit limits of automated testing and manual distribution. +- Report a rejected busy capture-start through NINA's CameraExposureFailedException path, preserving the original message and cause. This avoids the duplicate generic-error notification path in NINA 3.2 while retaining capture rejection, prior cancellation and the existing soft-abort warning. Actual UI confirmation is still needed for the full popup report in this fork's issue #5. +- Publish a fresh versioned build; older release assets and checksums remain intact. + +See [the session review](docs/SESSION-REVIEW-1.0.0.7.md) and [manual installation/rollback](INSTALLATION.md). Physical camera/USB/MTP, LiveView, lens operation and complete Sky Flat behavior remain unverified. NINA's plugin manager still uses the upstream release source. + +## 1.0.0.6 — corrective community release + +Follow-up to the 1.0.0.5 audit, retaining all previously integrated contributions and @dougforpres's original authorship. Install manually using [INSTALLATION.md](INSTALLATION.md). - Preserve aborts received during capture-start preflight. An aborted pending start cannot launch an exposure after its status check returns; a rejected busy start preserves cancellation of the preceding capture. - Verify the specific nearest learnt shutter step using the native driver's float rounding and absolute-distance selection, replacing the broad ratio that accepted a stalled adjacent speed. - Retry a valid previous Bulb readback when switching to a short numeric exposure. Malformed readbacks still fail, and a persistent mismatch cannot start capture. -- Restore the repeated-failure camera-loss protection adapted from Robert Hasson's upstream #13: three consecutive qualifying native errors mark the camera disconnected and block all further native access until NINA restarts. Never-working properties, explicit unsupported results, lock contention and shutter-verification mismatches do not count. A successful camera operation resets the count. No native close, retry or automatic reconnection is attempted after the guard trips. +- Restore the repeated-failure camera-loss protection adapted from @totoantibes's upstream #13: three consecutive qualifying native errors mark the camera disconnected and block all further native access until NINA restarts. Never-working properties, explicit unsupported results, lock contention and shutter-verification mismatches do not count. A successful camera operation resets the count. No native close, retry or automatic reconnection is attempted after the guard trips. - Add regression coverage using the production capture controller and managed native wrappers, replacing only native delegates and NINA logging/notifications for portable tests. -See [the corrective review](docs/RELEASE-REVIEW-1.0.0.6.md). Physical camera/USB operation remains unverified; this is a prerelease for manual testing and is not distributed through NINA's plugin manager. +See [the corrective review](docs/RELEASE-REVIEW-1.0.0.6.md). Physical camera/USB operation remains unverified. This was published first as a preview and subsequently marked regular/Latest without changing the binaries; updates are installed manually. ## 1.0.0.5 — community preview -First maintained release from [Lucas Lepski’s fork](https://github.com/shurkanTwo/NINASonyCameraPlugin), preserving Doug Henderson’s original authorship and MPL-2.0. Install manually using [INSTALLATION.md](INSTALLATION.md). This preview is not distributed through NINA’s plugin manager. +First maintained release from [@shurkanTwo’s fork](https://github.com/shurkanTwo/NINASonyCameraPlugin), preserving @dougforpres’s original authorship and MPL-2.0. Install manually using [INSTALLATION.md](INSTALLATION.md). This preview is not distributed through NINA’s plugin manager. -- Integrate current capture start/abort coordination and an opt-in managed Sony camera simulator with full-plugin integration tests (Lucas Lepski, upstream #10/#15). -- Report the latest downloaded ARW’s Sony camera temperature in NINA and that image’s metadata; missing readings remain unavailable (Lucas Lepski, #18 / issue #1). -- Release native image and metadata allocations after copying, including error paths, avoiding a per-frame unmanaged memory leak (Robert Hasson, #14). -- Retry and verify shutter changes for back-to-back exposures. A readable shutter mismatch now fails before capture rather than silently using the previous exposure. Exclude AUTO/Multi Frame NR from gain choices and fix native driver version comparisons (adapted from Robert Hasson’s #13 / issue #5). +- Integrate current capture start/abort coordination and an opt-in managed Sony camera simulator with full-plugin integration tests (@shurkanTwo, upstream #10/#15). +- Report the latest downloaded ARW’s Sony camera temperature in NINA and that image’s metadata; missing readings remain unavailable (@shurkanTwo, #18 / issue #1). +- Release native image and metadata allocations after copying, including error paths, avoiding a per-frame unmanaged memory leak (@totoantibes, #14). +- Retry and verify shutter changes for back-to-back exposures. A readable shutter mismatch now fails before capture rather than silently using the previous exposure. Exclude AUTO/Multi Frame NR from gain choices and fix native driver version comparisons (adapted from @totoantibes’s #13 / issue #5). - Serialize native camera/lens calls with bounded waits. Execution timeout blocks further native access until NINA restarts. Keep native cancellation off by default and always soft-cancel during image readout/processing (adapted #13, preserving current #10 safeguards / issue #4). -- Return focuser capability information without throwing (Christian Palm, #11), improve focuser state cleanup and notifications (Robert Hasson, #13). -- Document lens-learning tools and camera SD-card saving (Lucas Lepski, #16/#17 / issues #9/#3). +- Return focuser capability information without throwing (@christian-photo, #11), improve focuser state cleanup and notifications (@totoantibes, #13). +- Document lens-learning tools and camera SD-card saving (@shurkanTwo, #16/#17 / issues #9/#3). - Add Windows-tested manual-install ZIP/DLL packaging, checksums, source/build provenance, and installation/rollback instructions. Reviewed but deferred: experimental USB auto-reconnection, retrying a still-running timed-out native call, forced cancellation after repeated busy starts, and closed WIP #12 video intervals. Existing NINA 3.2/empty-ISO fixes from 1.0.0.4 (including @naixx’s contribution) remain included. See the [full review and issue coverage](docs/UPSTREAM-REVIEW-1.0.0.5.md). diff --git a/Drivers/CameraDriver.cs b/Drivers/CameraDriver.cs index 4cbc9d2..fc0eac7 100644 --- a/Drivers/CameraDriver.cs +++ b/Drivers/CameraDriver.cs @@ -12,6 +12,7 @@ using NINA.Core.Utility; using NINA.Core.Utility.Notification; using NINA.Equipment.Interfaces; +using NINA.Equipment.Exceptions; using NINA.Equipment.Interfaces.Mediator; using NINA.Equipment.Model; using NINA.Equipment.SDK.CameraSDKs.ASTPANSDK; @@ -557,7 +558,7 @@ public void StartExposure(CaptureSequence sequence) { _capture.Start((float)sequence.ExposureTime); } catch (InvalidOperationException ex) { Logger.Warning(ex.Message); - throw new SonyException(ex.Message); + throw new CameraExposureFailedException(ex.Message, ex); } } } diff --git a/INSTALLATION.md b/INSTALLATION.md index 4d2a368..a5fa53c 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -2,12 +2,12 @@ These instructions install the community-maintained build from [shurkanTwo/NINASonyCameraPlugin](https://github.com/shurkanTwo/NINASonyCameraPlugin/releases). -The original plugin was developed by **Doug Henderson**. This fork is maintained -by **Lucas Lepski and contributors** while shared upstream maintenance is being discussed. +The original plugin was developed by **@dougforpres**. This fork is maintained +by **@shurkanTwo and contributors** while shared upstream maintenance is being discussed. -The current community release, **1.0.0.6**, is a preview for manual testing. Windows -builds and automated tests are checked; physical Sony camera/USB operation has -not been verified for this combined release. See the release notes for scope. +The current community release, **1.0.0.7**, is a regular GitHub release marked Latest. +Windows builds and automated tests are checked; physical Sony camera/USB operation +remains unverified for this combined release. See the release notes for scope. ## Requirements @@ -17,7 +17,7 @@ not been verified for this combined release. See the release notes for scope. ## Install or replace an existing version -1. Download **`SonyCameraPlugin-1.0.0.6.zip`** from the [1.0.0.6 release](https://github.com/shurkanTwo/NINASonyCameraPlugin/releases/tag/1.0.0.6). Choose the release asset, rather than GitHub's automatic “Source code” archives. Extract it to a temporary folder. The plugin is `NINA.RetroKiwi.Plugin.SonyCamera.dll`. +1. Download **`SonyCameraPlugin-1.0.0.7.zip`** from the [1.0.0.7 release](https://github.com/shurkanTwo/NINASonyCameraPlugin/releases/tag/1.0.0.7). Choose the release asset, rather than GitHub's automatic “Source code” archives. Extract it to a temporary folder. The plugin is `NINA.RetroKiwi.Plugin.SonyCamera.dll`. 2. Disconnect the camera and focuser in NINA, then **close every NINA window** before changing plugin files. 3. Press **Win+R**, enter `%LOCALAPPDATA%\NINA\Plugins`, and open the plugin-version folder used by your NINA installation. NINA 3.x installations commonly use **`3.0.0`**: this folder tracks plugin compatibility, so it need not match the NINA version in About. If several version folders exist, use the one in NINA's startup log (`%LOCALAPPDATA%\NINA\Logs`); look for the path from which the Sony plugin was loaded. 4. If Sony Camera Plugin is already installed, locate its existing `NINA.RetroKiwi.Plugin.SonyCamera.dll` and copy the entire containing plugin folder **outside `%LOCALAPPDATA%\NINA\Plugins`** as a backup. Replace the DLL **in that existing folder**, even if the folder name differs from the example. Do not create another plugin folder containing a second copy. Keep the rest of the existing folder's files. @@ -29,7 +29,7 @@ not been verified for this combined release. See the release notes for scope. 6. Copy the extracted DLL into the existing or newly created folder. The ZIP also contains the license, source reference, and these instructions; you can keep those files alongside it. It contains no replacement NINA runtime libraries or native Sony driver. 7. If Windows shows an **Unblock** checkbox in the downloaded ZIP or DLL's Properties, unblock the file. Alternatively run `Unblock-File` in PowerShell on that downloaded ZIP/DLL before copying/extracting it. -8. Restart NINA. In its plugin manager, confirm **Sony Camera Plugin 1.0.0.6** is loaded; the description identifies the community-maintained build. Select the Sony camera in Equipment and connect it. +8. Restart NINA. In its plugin manager, confirm **Sony Camera Plugin 1.0.0.7** is loaded; the description identifies the community-maintained build. Select the Sony camera in Equipment and connect it. 9. Leave **Enable native cancel** disabled initially. Try one short exposure and check the downloaded image, ISO and exposure before using the build for a sequence. Temperature appears only after downloading an ARW that contains a supported Sony temperature reading. This is a replacement for the upstream plugin, with the same identifier so existing @@ -45,7 +45,7 @@ The release includes **`SHA256SUMS.txt`** for its ZIP and standalone DLL. In PowerShell, calculate a downloaded file's hash and compare it to the matching entry: ```powershell -Get-FileHash "$env:USERPROFILE\Downloads\SonyCameraPlugin-1.0.0.6.zip" -Algorithm SHA256 +Get-FileHash "$env:USERPROFILE\Downloads\SonyCameraPlugin-1.0.0.7.zip" -Algorithm SHA256 ``` ## Roll back diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 8cde284..0bb28a2 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -8,18 +8,18 @@ // [MANDATORY] The assembly versioning //Should be incremented for each new release build of a plugin -[assembly: AssemblyVersion("1.0.0.6")] -[assembly: AssemblyFileVersion("1.0.0.6")] +[assembly: AssemblyVersion("1.0.0.7")] +[assembly: AssemblyFileVersion("1.0.0.7")] // [MANDATORY] The name of your plugin [assembly: AssemblyTitle("Sony Camera Plugin")] // [MANDATORY] A short description of your plugin -[assembly: AssemblyDescription("Community-maintained Sony camera and lens support; originally developed by Doug Henderson")] +[assembly: AssemblyDescription("Community-maintained Sony camera and lens support; originally developed by @dougforpres")] // The following attributes are not required for the plugin per se, but are required by the official manifest meta data // Your name -[assembly: AssemblyCompany("Doug Henderson")] +[assembly: AssemblyCompany("@dougforpres")] // The product name that this plugin is part of [assembly: AssemblyProduct("Sony Camera Plugin")] [assembly: AssemblyCopyright("Copyright © 2023-2024 Doug Henderson")] @@ -52,7 +52,7 @@ //[Optional] An additional url to an example example screenshot of your plugin in action [assembly: AssemblyMetadata("AltScreenshotURL", "")] //[Optional] An in-depth description of your plugin -[assembly: AssemblyMetadata("LongDescription", @"Community-maintained fork of [Doug Henderson’s original plugin](https://github.com/dougforpres/NINASonyCameraPlugin), maintained by Lucas Lepski and contributors. +[assembly: AssemblyMetadata("LongDescription", @"Community-maintained fork of [@dougforpres’s original plugin](https://github.com/dougforpres/NINASonyCameraPlugin), maintained by @shurkanTwo and contributors. [Manual installation](https://github.com/shurkanTwo/NINASonyCameraPlugin/blob/master/INSTALLATION.md). @@ -69,7 +69,7 @@ [Manual installation](https://github.com/shurkanTwo/NINASonyCameraPlugin/blob/ma *Note*: This addon uses the core (non-ASCOM) files present in the Sony ASCOM driver v1.0.1.17 and later, which must be installed for this addon to start up correctly. You can find the Sony ASCOM driver at [https://github.com/dougforpres/ASCOMSonyCameraDriver/releases](https://github.com/dougforpres/ASCOMSonyCameraDriver/releases). ## Support -Report problems with this fork in [its issue tracker](https://github.com/shurkanTwo/NINASonyCameraPlugin/issues). Doug Henderson remains the original author; his homepage is [retro.kiwi](https://retro.kiwi). +Report problems with this fork in [its issue tracker](https://github.com/shurkanTwo/NINASonyCameraPlugin/issues). @dougforpres remains the original author; his homepage is [retro.kiwi](https://retro.kiwi). For many bugs/problems I'm going to ask you for a driver log file, [here's a link to how you would do that](https://github.com/dougforpres/ASCOMSonyCameraDriver/wiki/Troubleshooting#the-driver-dll-log). @@ -78,9 +78,9 @@ [Manual installation](https://github.com/shurkanTwo/NINASonyCameraPlugin/blob/ma * [Other known issues](https://github.com/dougforpres/ASCOMSonyCameraDriver/wiki/Troubleshooting) ## Contributors -* Lucas Lepski [@ShurkanTwo](https://github.com/shurkanTwo) -* Robert Hasson [@totoantibes](https://github.com/totoantibes) -* Christian Palm [@christian-photo](https://github.com/christian-photo) +* [@shurkanTwo](https://github.com/shurkanTwo) +* [@totoantibes](https://github.com/totoantibes) +* [@christian-photo](https://github.com/christian-photo) * [@naixx](https://github.com/naixx) ")] diff --git a/README.md b/README.md index fab0f11..98db151 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Sony Camera Plugin -This is a **community-maintained fork** of [Doug Henderson’s Sony Camera Plugin](https://github.com/dougforpres/NINASonyCameraPlugin). Doug remains the original author. Lucas Lepski ([@shurkanTwo](https://github.com/shurkanTwo)) maintains these releases, incorporating contributions from the upstream community while we await a reply from Doug about shared maintenance. +This is a **community-maintained fork** of [@dougforpres’s Sony Camera Plugin](https://github.com/dougforpres/NINASonyCameraPlugin). @dougforpres remains the original author. [@shurkanTwo](https://github.com/shurkanTwo) maintains these releases, incorporating contributions from the upstream community while awaiting a reply from @dougforpres about shared maintenance. **[Download maintained releases](https://github.com/shurkanTwo/NINASonyCameraPlugin/releases)** · **[Manual installation and rollback](INSTALLATION.md)** · **[Report a problem with this fork](https://github.com/shurkanTwo/NINASonyCameraPlugin/issues)** @@ -25,7 +25,7 @@ Native NINA plugin for Sony mirrorless/DSLR bodies over the Sony MTP interface, ## Installation -Download a maintained build from [this fork’s releases](https://github.com/shurkanTwo/NINASonyCameraPlugin/releases) and follow the **[manual installation instructions](INSTALLATION.md)**. Community releases are previews for manual testing. It replaces the upstream plugin; install one copy only. +Download a maintained build from [this fork’s releases](https://github.com/shurkanTwo/NINASonyCameraPlugin/releases) and follow the **[manual installation instructions](INSTALLATION.md)**. The current release, **1.0.0.7**, is a regular GitHub release marked Latest; physical-camera validation remains outstanding. It replaces the upstream plugin; install one copy only. The N.I.N.A. plugin manager currently distributes the upstream release. This fork has not been submitted as its update source. @@ -114,7 +114,7 @@ Menu locations and labels vary by Sony model; consult your camera's manual if th ## Support - For this maintained fork, [open an issue here](https://github.com/shurkanTwo/NINASonyCameraPlugin/issues). Include the NINA version, plugin version, camera model, native Sony driver version, and relevant logs. Remove private paths and device identifiers before sharing logs. -- Doug’s [original project](https://github.com/dougforpres/NINASonyCameraPlugin) and [homepage](https://retro.kiwi) remain linked for attribution and upstream driver information. Support for changes in this fork is handled here. +- @dougforpres’s [original project](https://github.com/dougforpres/NINASonyCameraPlugin) and [homepage](https://retro.kiwi) remain linked for attribution and upstream driver information. Support for changes in this fork is handled here. - You may be asked for a driver log when reporting bugs: https://github.com/dougforpres/ASCOMSonyCameraDriver/wiki/Troubleshooting#the-driver-dll-log - Help links: - My camera is not supported (https://github.com/dougforpres/ASCOMSonyCameraDriver/wiki/Installation#if-you-dont-have-a-supported-camera-model); @@ -124,11 +124,11 @@ Menu locations and labels vary by Sony model; consult your camera's manual if th ## Metadata -- Version: 1.0.0.5 -- Author: Doug Henderson -- Maintainer of this fork: Lucas Lepski [@shurkanTwo](https://github.com/shurkanTwo) -- Contributors include Robert Hasson [@totoantibes](https://github.com/totoantibes), Christian Palm [@christian-photo](https://github.com/christian-photo), and [@naixx](https://github.com/naixx); original commit authorship is preserved. -- Review and release scope: [upstream work reviewed for 1.0.0.5](docs/UPSTREAM-REVIEW-1.0.0.5.md) +- Version: 1.0.0.7 +- Author: @dougforpres +- Maintainer of this fork: [@shurkanTwo](https://github.com/shurkanTwo) +- Contributors include [@totoantibes](https://github.com/totoantibes), [@christian-photo](https://github.com/christian-photo), and [@naixx](https://github.com/naixx); original commit authorship is preserved. +- Review and release scope: [session review and 1.0.0.7](docs/SESSION-REVIEW-1.0.0.7.md), [1.0.0.6 corrections](docs/RELEASE-REVIEW-1.0.0.6.md), and [upstream integration history](docs/UPSTREAM-REVIEW-1.0.0.5.md) - Minimum NINA version: 3.2.0.3001 - License: MPL-2.0 (https://www.mozilla.org/en-US/MPL/2.0/) - Original author’s homepage: https://retro.kiwi diff --git a/SonyCameraPluginNative/ExposureTimeController.cs b/SonyCameraPluginNative/ExposureTimeController.cs index 8c17b58..606ca01 100644 --- a/SonyCameraPluginNative/ExposureTimeController.cs +++ b/SonyCameraPluginNative/ExposureTimeController.cs @@ -5,7 +5,7 @@ using System.Threading; namespace Sony { - // Based on Robert Hasson's PR #13 readback/retry workaround. Keep the + // Based on @totoantibes's PR #13 readback/retry workaround. Keep the // decision independent of the DLL so stalled shutter changes are testable. internal static class ExposureTimeController { private const uint NotSupported = 50; diff --git a/SonyCameraPluginNative/Sony.cs b/SonyCameraPluginNative/Sony.cs index f1eb0f1..c095ca2 100644 --- a/SonyCameraPluginNative/Sony.cs +++ b/SonyCameraPluginNative/Sony.cs @@ -6,7 +6,7 @@ using NINA.Core.Utility.Notification; namespace Sony { - // Adapted from Robert Hasson's PR #13: camera and focuser share one native + // Adapted from @totoantibes's PR #13: camera and focuser share one native // entry point. A timeout permanently blocks further native calls, including // close/open/enumeration, because the old P/Invoke cannot be interrupted. public class SonyDriver { diff --git a/Tests/PluginIntegration/CameraDriverSimulatorTests.cs b/Tests/PluginIntegration/CameraDriverSimulatorTests.cs index cf72d91..82a0e08 100644 --- a/Tests/PluginIntegration/CameraDriverSimulatorTests.cs +++ b/Tests/PluginIntegration/CameraDriverSimulatorTests.cs @@ -5,6 +5,7 @@ using System.Threading.Tasks; using Moq; using NINA.Core.Enum; +using NINA.Equipment.Exceptions; using NINA.Equipment.Model; using NINA.Image.ImageData; using NINA.Image.Interfaces; @@ -118,9 +119,9 @@ public async Task SoftAbortWarnsOnceAndBusyRestartDoesNotLoseCancellation() { test.Start(120); test.Driver.AbortExposure(); test.Driver.StopExposure(); - var error = Assert.ThrowsAny(() => test.Start()); + var error = Assert.Throws(() => test.Start()); Assert.Contains("busy", error.Message); - Assert.False(error is OperationCanceledException); + Assert.IsType(error.InnerException); await Assert.ThrowsAsync(() => test.Driver.WaitUntilExposureIsReady(CancellationToken.None)); Assert.Equal(1, test.Warnings); Assert.Equal(0, test.Backend.NativeCancelCalls); diff --git a/docs/RELEASE-REVIEW-1.0.0.6.md b/docs/RELEASE-REVIEW-1.0.0.6.md index 4891d93..b7d7102 100644 --- a/docs/RELEASE-REVIEW-1.0.0.6.md +++ b/docs/RELEASE-REVIEW-1.0.0.6.md @@ -1,13 +1,13 @@ -# Corrective review: 1.0.0.6 community preview +# Corrective review: 1.0.0.6 community release -This release addresses all four findings from the follow-up audit of 1.0.0.5. It retains that release's original contributor history and adapted work. Doug Henderson remains the original author; Robert Hasson's PR #13 remains credited as the source of the native stability and shutter retry work. The original MPL-2.0 license is unchanged. +This release addresses all four findings from the follow-up audit of 1.0.0.5. It retains that release's original contributor history and adapted work. @dougforpres remains the original author; @totoantibes's PR #13 remains credited as the source of the native stability and shutter retry work. The original MPL-2.0 license is unchanged. ## Corrections 1. **Abort during preflight:** a pending capture request is registered before the potentially blocking native status read. Abort cancels that request and the preceding capture's wait. If preflight succeeds, the cancelled pending request cannot start an exposure; if it rejects a busy camera, cancellation of the preceding capture remains intact. A delayed abort for a previous capture still cannot native-cancel a newer capture. 2. **Expected shutter step:** verification selects from the learned numeric shutter list using the native driver's float arithmetic, five-decimal rounding of both requests and learned values, absolute distance and shorter-step tie behavior. It compares the actual readback against the selected step, accepting equivalent fractions. The old global ratio could accept the wrong adjacent speed. The audit's 0.011439-second and 0.88-second examples now retry until they reach 1/80 and 0.8 seconds respectively. 3. **Old Bulb mode:** zero is a valid Bulb readback, including a temporary previous mode while switching to a numeric shutter. Such a mismatch now retries within the existing 12-second budget. Invalid nonzero encodings still fail immediately. A persistent mismatch fails without starting capture. Explicit native unsupported-exposure control retains the documented manual-shutter fallback; a successful native adjustment without a usable learned list cannot be verified and fails. -4. **Camera-loss guard:** three consecutive qualifying returned native errors stop the shared native executor, hide the camera from camera/focuser connection state, and block subsequent native access, including cleanup, enumeration and reopen, until NINA restarts. Successful camera operations reset the count. Property errors count only after that property has worked; explicit unsupported results are excluded. Managed validation/verification failures and lock waits are excluded. This restores the previously omitted protection from Robert's PR #13 while retaining the stricter recovery policy: no automatic close/retry of a failed handle and no revival of a timed-out worker. +4. **Camera-loss guard:** three consecutive qualifying returned native errors stop the shared native executor, hide the camera from camera/focuser connection state, and block subsequent native access, including cleanup, enumeration and reopen, until NINA restarts. Successful camera operations reset the count. Property errors count only after that property has worked; explicit unsupported results are excluded. Managed validation/verification failures and lock waits are excluded. This restores the previously omitted protection from @totoantibes's PR #13 while retaining the stricter recovery policy: no automatic close/retry of a failed handle and no revival of a timed-out worker. ## Verification @@ -17,7 +17,7 @@ Regression cases cover blocked preflight with native cancel both enabled and dis The Windows workflow runs the portable capture/native-policy suite, ARW temperature suite, full-plugin simulator integration suite and release build before packaging the manual-install DLL/ZIP and SHA256 checksums. SOURCE.txt records the exact source commit and build run. -These checks do not establish physical Sony camera, USB/MTP, lens, LiveView or complete Sky Flat compatibility. This remains a preview for manual testing. Experimental USB reconnection, retries of still-running timed-out calls, forced cancellation of busy captures and closed WIP #12 video intervals remain deferred. +These checks do not establish physical Sony camera, USB/MTP, lens, LiveView or complete Sky Flat compatibility. The release was initially published as a preview and later marked regular/Latest with unchanged binaries. Version 1.0.0.7 subsequently corrects metadata and documentation; physical-camera validation is still required. Experimental USB reconnection, retries of still-running timed-out calls, forced cancellation of busy captures and closed WIP #12 video intervals remain deferred. ## Installation and history diff --git a/docs/SESSION-REVIEW-1.0.0.7.md b/docs/SESSION-REVIEW-1.0.0.7.md new file mode 100644 index 0000000..78d5c74 --- /dev/null +++ b/docs/SESSION-REVIEW-1.0.0.7.md @@ -0,0 +1,21 @@ +# Session review and maintenance release 1.0.0.7 + +The session review compared the maintained plugin against upstream 1.0.0.4 (`8bd9042bcd477fd028c2aa2adfe34260192de936`) and reviewed the 1.0.0.6 release (`0341e8f9cf6e5e1c5b13352d485285e00300df0e`), native-driver release/candidate and public announcements separately. The requested scope includes original commit attribution, manual installation, regular/Latest releases and GitHub-handle credits. + +## Standards + +The review found one remaining requirement violation: authored credit text still contained real names in plugin display metadata, the packaged SOURCE.txt, README, installation guide, changelog, source comments and review records. Version 1.0.0.7 uses @dougforpres, @shurkanTwo, @totoantibes and @christian-photo in those places. The original legal copyright notice, MPL-2.0 license and commit author metadata are preserved. No additional introduced runtime blocker or actionable baseline smell was found. + +## Spec + +The README still identified 1.0.0.5 and described all maintained releases as previews after 1.0.0.6 became a regular release. Current documentation now identifies 1.0.0.7, manual installation and the actual GitHub release classification. Automated test results remain separate from physical-camera acceptance. + +The audit also inspected [the duplicate-popup report](https://github.com/shurkanTwo/NINASonyCameraPlugin/issues/5). In NINA 3.2, a generic busy-start exception selects notification handlers in both [ImagingVM](https://github.com/isbeorn/nina/blob/2393eae581145ed5b8114bf07c48ca2580540fd5/NINA/ViewModel/ImagingVM.cs#L260) and [AnchorableSnapshotVM](https://github.com/isbeorn/nina/blob/2393eae581145ed5b8114bf07c48ca2580540fd5/NINA/ViewModel/Imaging/AnchorableSnapshotVM.cs#L411). The latter deliberately handles CameraExposureFailedException without a second notification. The plugin now uses that typed failure and preserves its message and inner cause. The existing integration test checks the failure classification, prior cancellation, one soft-abort warning and absence of native cancellation. This establishes a duplicate-notification mechanism, not the exact count of three in the screenshot; the complete UI report still needs confirmation. + +## Validation and publication + +The Windows release workflow runs the capture/native-policy, temperature and plugin-integration suites and builds/packages the plugin. Release notes identify the successful build and exact source commit for 1.0.0.7. Changes comprise the capture-start failure classification, version/display metadata, attribution comments, packaging credit text and documentation. Busy captures remain rejected and native cancellation is not forced. + +Published 1.0.0.5 and 1.0.0.6 binaries, tags and checksums remain historical artifacts. Their release notes point to the maintained release; they are not silently replaced. Existing public announcements and the central upstream issue link to the corrected release and retain issue-specific context. + +Physical Sony camera/USB/MTP, LiveView, lens operation and complete Sky Flat behavior remain unverified. NINA's plugin manager still uses the upstream release source. The native driver is a separate package, and its device-removal candidate remains experimental and outside the regular releases. See [installation and rollback](../INSTALLATION.md). diff --git a/docs/UPSTREAM-REVIEW-1.0.0.5.md b/docs/UPSTREAM-REVIEW-1.0.0.5.md index 3d2c9ac..d493242 100644 --- a/docs/UPSTREAM-REVIEW-1.0.0.5.md +++ b/docs/UPSTREAM-REVIEW-1.0.0.5.md @@ -4,25 +4,25 @@ Reviewed against upstream `master`, commit `8bd9042bcd477fd028c2aa2adfe34260192de936` (upstream release 1.0.0.4). -This fork preserves Doug Henderson's authorship, copyright notices, MPL-2.0, -and original commit history. Maintenance does not imply Doug has reviewed or +This fork preserves @dougforpres's authorship, copyright notices, MPL-2.0, +and original commit history. Maintenance does not imply @dougforpres has reviewed or endorsed this combined build. Upstream issues/PRs remain under upstream control. ## Included work -- [#10](https://github.com/dougforpres/NINASonyCameraPlugin/pull/10), Lucas Lepski: current capture coordination, idempotent cancellation, and per-profile native cancel opt-in. The prerequisite is included through #15, retaining its original commits. Additional regression checks now keep Reading/Processing soft-cancelled even when native cancel is enabled. -- [#11](https://github.com/dougforpres/NINASonyCameraPlugin/pull/11), Christian Palm: focuser capability checks and unsupported temperature compensation no longer throw. -- [#14](https://github.com/dougforpres/NINASonyCameraPlugin/pull/14), Robert Hasson: release native image/metadata buffers in `finally` after copying, including errors. Native `DLL.cpp` was checked: `exportBytes` allocates with `CoTaskMemAlloc`, transferring the exported buffer to the caller. Capture COMPLETE exports a frame and cleans up the native capture; copying inline on the first COMPLETE result is required. -- [#15](https://github.com/dougforpres/NINASonyCameraPlugin/pull/15), Lucas Lepski: opt-in managed camera simulator, portable capture tests, and actual-plugin Windows integration tests. -- [#16](https://github.com/dougforpres/NINASonyCameraPlugin/pull/16), Lucas Lepski: obtaining and launching a configured lens-learning tool. -- [#17](https://github.com/dougforpres/NINASonyCameraPlugin/pull/17), Lucas Lepski: keeping RAW copies on the camera memory card. -- [#18](https://github.com/dougforpres/NINASonyCameraPlugin/pull/18), Lucas Lepski: bounded ARW camera-temperature extraction with independent metadata fixtures; merged with the simulator's connection/download paths. Integration checks verify that NINA's camera property and image metadata receive the same value and clear unavailable readings. +- [#10](https://github.com/dougforpres/NINASonyCameraPlugin/pull/10), @shurkanTwo: current capture coordination, idempotent cancellation, and per-profile native cancel opt-in. The prerequisite is included through #15, retaining its original commits. Additional regression checks now keep Reading/Processing soft-cancelled even when native cancel is enabled. +- [#11](https://github.com/dougforpres/NINASonyCameraPlugin/pull/11), @christian-photo: focuser capability checks and unsupported temperature compensation no longer throw. +- [#14](https://github.com/dougforpres/NINASonyCameraPlugin/pull/14), @totoantibes: release native image/metadata buffers in `finally` after copying, including errors. Native `DLL.cpp` was checked: `exportBytes` allocates with `CoTaskMemAlloc`, transferring the exported buffer to the caller. Capture COMPLETE exports a frame and cleans up the native capture; copying inline on the first COMPLETE result is required. +- [#15](https://github.com/dougforpres/NINASonyCameraPlugin/pull/15), @shurkanTwo: opt-in managed camera simulator, portable capture tests, and actual-plugin Windows integration tests. +- [#16](https://github.com/dougforpres/NINASonyCameraPlugin/pull/16), @shurkanTwo: obtaining and launching a configured lens-learning tool. +- [#17](https://github.com/dougforpres/NINASonyCameraPlugin/pull/17), @shurkanTwo: keeping RAW copies on the camera memory card. +- [#18](https://github.com/dougforpres/NINASonyCameraPlugin/pull/18), @shurkanTwo: bounded ARW camera-temperature extraction with independent metadata fixtures; merged with the simulator's connection/download paths. Integration checks verify that NINA's camera property and image metadata receive the same value and clear unavailable readings. -## Adapted stability work from Robert Hasson's #13 +## Adapted stability work from @totoantibes's #13 [#13](https://github.com/dougforpres/NINASonyCameraPlugin/pull/13) includes older copies of #10/#11. It was reviewed in full and adapted rather than merged over -the newer capture controller. Robert retains credit for the exposure readback, +the newer capture controller. @totoantibes retains credit for the exposure readback, ISO cleanup, native serialization/timeout, and focuser hardening work. Included: @@ -48,7 +48,7 @@ Deferred after review: - [#3 SD card copies](https://github.com/dougforpres/NINASonyCameraPlugin/issues/3): documented camera-side setting. - [#4 cancel crashes](https://github.com/dougforpres/NINASonyCameraPlugin/issues/4): mitigations and regression checks included; native DLL/MTP access violations cannot be claimed fixed by managed tests. - [#5 flat exposure changes](https://github.com/dougforpres/NINASonyCameraPlugin/issues/5): shutter application is checked/retried, and AUTO ISO is excluded. NINA Sky Flat behavior remains unverified; this release does not claim a complete Sky Flat fix. -- [#6 NINA 3.2 interface](https://github.com/dougforpres/NINASonyCameraPlugin/issues/6): already resolved by merged #7/#8 in 1.0.0.4, retained here. Original contributors include @naixx and Lucas Lepski. +- [#6 NINA 3.2 interface](https://github.com/dougforpres/NINASonyCameraPlugin/issues/6): already resolved by merged #7/#8 in 1.0.0.4, retained here. Original contributors include @naixx and @shurkanTwo. - [#9 lens learning](https://github.com/dougforpres/NINASonyCameraPlugin/issues/9): tool location and launch requirements documented; the installer does not include a ready-to-use lens-learning executable. Closed WIP [#12 video intervals](https://github.com/dougforpres/NINASonyCameraPlugin/pull/12) @@ -79,5 +79,5 @@ commit. Existing NU1701 warnings from legacy dependencies remain. Automated native-call policy tests use controlled callbacks; simulator tests do not execute the Sony DLL, USB/MTP, LiveView, or physical lenses. The metadata fixture is not a complete decodable ARW. No physical-camera validation of this combined -release has been performed. Robert's reported ILCE-7S field results apply to his +release has been performed. @totoantibes's reported ILCE-7S field results apply to his build, not automatically to this adapted integration.