diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..395b835 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,114 @@ +# AstroFrame agent instructions + +Always ask clarifying questions before proceeding when you need more information. + +## Scope and installed-app protection + +- Work on the source code and workspace artifacts. The user explicitly requires that development and release verification leave their locally installed AstroFrame untouched. +- Do not run installers or uninstallers, launch the installed application, apply an update to it, or change its installed files, preferences, registry entries, Start Menu shortcuts, or taskbar pins. Earlier installer testing removed the user's installation and shortcuts. +- Do not run packaged `--verify-update ... --apply` probes against the user's installation. Use fake update locators and workspace fixtures for update tests. Any installed-app interaction needs explicit new user authorization. +- Keep test output and disposable tools under `artifacts/` and `.tools/`. For preview QA, copy saved-project caches into a workspace test folder before rendering; read source exposures without modifying them. +- Publish only when a release is requested or included in the authorized task. Documentation-only changes do not need a version bump or release tag. + +## Repository and version source + +- Public Forgejo repository: . +- Main development branch: `main`. Use the configured `origin`; inspect it rather than replacing its URL. +- `Directory.Build.props` contains the application version. `packaging/Set-Version.ps1` updates that value; it does not commit, tag, or push. +- At the time these instructions were added, `1.0.2` was published successfully. Read the current props, tags, and published releases before choosing the next version; do not assume this baseline stays current. +- Use a new stable `major.minor.patch` version without leading zeros and an exactly matching `v` tag. Never overwrite a published version, its assets, or its tag. The initial `v1.0.0` tag is unpublished from a failed run; `1.0.1` was the first published release. +- Put release notes in `docs/release-notes/.md`. The publisher uses this file as the release description, with a generic fallback if absent. + +### Version numbering + +- Use `major.minor.patch` according to the scope of the release, rather than counting commits. +- Increment the patch component (`1.1.x`) for singular or minor changes, fixes, and focused improvements. +- Increment the minor component (`1.x.1`) for major fixes, major features, or extensive changes within a bounded part of the program. +- Increment the major component (`x.1.1`) for entire-program overhauls, extensive changes impacting much of the program, or codebase rewrites. +- The examples identify the component to increment. Normally reset lower components to zero when incrementing a higher component; an explicitly requested version takes precedence. This focused algorithm correction is requested as `1.1.1`. + +## Build and validation + +AstroFrame is an Avalonia/.NET 8 application, published self-contained for `win-x64` and `linux-x64`. Windows uses a per-user Velopack installer; Linux uses an AppImage and optional per-user menu installer, targeting Debian and Arch. ARM is not currently required. Packages are currently unsigned. + +Use PowerShell 7 for packaging and publication. Velopack CLI and application integration are pinned to `1.2.161`; its CLI requires a .NET 10 SDK/runtime. Tests require the .NET 8 runtime. Keep those versions compatible when changing dependencies. + +From the repository root, keep temporary files, NuGet HTTP cache, and telemetry handling within the development scope: + +```powershell +New-Item -ItemType Directory -Force artifacts/test-temp, .tools/http-cache | Out-Null +$env:TEMP = Join-Path $PWD 'artifacts/test-temp' +$env:TMP = $env:TEMP +$env:NUGET_HTTP_CACHE_PATH = Join-Path $PWD '.tools/http-cache' +$env:AVALONIA_TELEMETRY_OPTOUT = '1' +./Build.ps1 -Test +./tools/Verify-ReleaseAutomation.ps1 +``` + +Set the temporary environment before starting test processes. `Build.ps1` also sets workspace .NET home and NuGet package directories. It prefers `.tools/dotnet/dotnet.exe` on Windows when available, otherwise `dotnet` on PATH. + +- `Build.ps1 -Test` builds and runs engine and updater validation. `Verify-ReleaseAutomation.ps1` tests the publisher with a mocked API and does not publish a release. +- Render affected controls for visual changes and inspect the result; build/test success alone does not validate an overlay or layout. Use isolated source rendering that does not initialize the installed app's settings or updater. +- `Build.ps1 -Publish` means local `dotnet publish` into `artifacts/AstroFrame`; it does **not** publish a Forgejo release. `Build.ps1 -Package` invokes package creation. +- For optional local packages, use `./packaging/Release.ps1 -Platform Both`. Outputs default to `artifacts/releases/win-x64` and `artifacts/releases/linux-x64`. Existing versioned publish folders are rejected to prevent stale files. Use fresh `-PublishRoot` and `-Output` workspace paths for a rebuild. +- Linux packaging needs `mksquashfs` from `squashfs-tools`. `packaging/release.sh ` is the Linux-only alternative. Normal release packaging happens on the server, so a local installer build is not necessary. + +## Preferred release workflow: server build and publish + +Finish the change, verify it, and prepare release notes before pushing a release tag. Include all intended changes in the release commit, preserving unrelated user work. The publisher requires a clean checkout whose HEAD exists on the remote. + +Example for the next release after the recorded baseline; substitute the actual new version: + +```powershell +./packaging/Set-Version.ps1 -Version 1.0.3 +# Create docs/release-notes/1.0.3.md and stage all intended source/test changes too. +git add Directory.Build.props docs/release-notes/1.0.3.md +git commit -m "Release 1.0.3" +git push origin main +git tag v1.0.3 +git push origin v1.0.3 +``` + +Run validation on the final versioned source before committing/tagging. Stage intended source/test files explicitly in addition to the two example files. Push the source commit before its tag. The tag must point at the committed source whose version matches it. + +`.forgejo/workflows/release.yml` handles the rest: + +1. A push to `main` builds and tests both platforms without publishing. +2. A push of `v` builds, tests, and publishes that version. A manual workflow run on `main` is build-only; a manual run on a version tag publishes. +3. `packaging/Build-ServerRelease.ps1` checks the ref/version match, runs engine/updater/publisher validation, and cross-packages both platforms into `artifacts/server-release/packages`. +4. The job renders the packaged Linux settings page under Xvfb, using AppImage extraction mode. +5. `packaging/Publish.ps1 -Directory artifacts/server-release/packages -Publish -RequireTag` validates both channels, creates a draft, uploads all assets, and makes the release public only after every upload succeeds. + +Known runner requirements that previously caused failures: + +- Runner name: `unraid-runner`; advertised label: `ubuntu-latest`. `runs-on` selects the **label**, not the runner name. The `docker` label did not match this runner. +- Job container: `node:22-bookworm`. This Linux runner can create both the Windows Setup executable and Linux AppImage using Velopack cross-packaging. +- Checkout is pinned to `https://data.forgejo.org/actions/checkout@v4.4.0`. Runner v6.4.0 supports Node 20 actions; checkout v6 requires Node 24 and failed. Check runner compatibility before upgrading actions. +- The workflow installs the .NET 10 SDK, .NET 8 runtime, PowerShell 7.4.20, `squashfs-tools`, and Linux desktop/Xvfb dependencies. Preserve these prerequisites. +- The publisher uses Forgejo's repository-scoped `${{ github.token }}` as `ASTROFRAME_RELEASE_TOKEN`; no personal token is needed for the server workflow. +- Server Linux smoke tests do not establish Windows UI acceptance or separate Arch/Debian desktop acceptance. Report validation accurately and respect the installed-app protection rule. + +## Assets required for automatic updates + +Installed applications use Velopack's public Gitea release source, with separate `win-x64` and `linux-x64` channels. They check published stable releases, not Git commits, and never pull source code or need a Git client. No repository write token belongs in the application. + +Each public release must include **both** platforms. Uploading only an installer breaks the automatic-update workflow. Normal builds produce 13 assets: + +- For each channel: `releases..json`, `RELEASES-`, `assets..json`, and `AstroFrame---full.nupkg`. +- Windows: `AstroFrame-win-x64-Setup.exe`. +- Linux: `AstroFrame-linux-x64.AppImage`, `install-linux.sh`, `astroframe.png`, and `AstroFrame--linux-x64.zip`. +- Include any generated delta packages referenced by the feed. Full packages support updates from older versions without deltas. Keep older published releases available. + +After pushing the tag, check the **tagged** Actions run through successful publication, then verify the public release is stable, not a draft, contains both channels and expected assets, and both feeds reference the new full package with matching size/checksum. A green `main` build is not proof of publication. Inspect the public API/assets or use an isolated fake locator; do not update the user's installed copy as a test. + +The agreed user experience is: check on launch and every six hours, notify when a newer stable release exists, then download/install/restart only when the user clicks **Install update and restart**. Settings shows version/status, automatic-check preference, and manual check. Installation is blocked during processing or saving and saves the project before restart. Source-tree builds are not self-updating. Preserve this behavior when modifying updates. + +## Publisher recovery and local fallback + +- `packaging/Publish.ps1` verifies version, clean source, remote commit, matching tag when required, package sizes, and SHA256 before publication. The correct commit API route is `/api/v1/repos/Elijah/AstroFrame/git/commits/`; `/commits/` returned 404. +- A failed upload leaves a draft, invisible to installed apps. Resuming is safe only with identical package bytes; existing uploads are downloaded and compared by SHA256. A fresh rebuild may differ and cause a conflict. +- Do not delete published releases or force-move tags to fix publication. Ask before deleting conflicting draft assets/releases or moving an unpublished tag; prefer a new version when requested by the user. +- Local fallback: supply a repository-write token through the process environment as `ASTROFRAME_RELEASE_TOKEN`, then run `./packaging/Publish.ps1 -Directory -RequireTag` to create/resume a draft. Add `-Publish` only when immediate publication is authorized. Use the matching tagged checkout and both channel folders. +- Never commit, print, embed, or persist a release token in scripts or application files. + +See [docs/releases.md](docs/releases.md) and the scripts/workflow above for implementation details. Treat those files as the current authority if these instructions become stale, and update this runbook when changing the workflow. diff --git a/Directory.Build.props b/Directory.Build.props index 7fa2fea..76657f4 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@ - 1.0.1 + 1.1.7 Elijah Kuntz AstroFrame diff --git a/README.md b/README.md index d3766fc..2bf5f5c 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,13 @@ An independent Windows/Linux desktop application for selecting astrophotography For packaged installations, run `AstroFrame-win-x64-Setup.exe`. Linux users can use `AstroFrame-linux-x64.AppImage` and the accompanying `install-linux.sh` for an application-menu entry. Both target x64 PCs. See [installation and releases](docs/releases.md) for Debian/Arch prerequisites and package-building instructions. -**Settings → Updates** shows the installed version and update status, with automatic and manual checks. Installed packages check the [public repository releases](https://git.elijahkuntz.com/Elijah/AstroFrame/releases) on startup and every six hours. A newer stable release adds an update indicator to Settings. **Install update and restart** downloads the release package and restarts after saving; active analysis/export must finish first. Preferences and projects survive updates. Git pushes become app updates only after a versioned release and its packages are published. +**Settings → Updates** shows the installed version and update status, with automatic and manual checks. Installed packages check the [public repository releases](https://git.elijahkuntz.com/Elijah/AstroFrame/releases) on startup and every six hours. A newer stable release turns Settings cerulean blue and adds an update indicator. **Install update and restart** downloads the release package and restarts after saving; active analysis/export must finish first. Preferences and projects survive updates. Git pushes become app updates only after a versioned release and its packages are published. Open `artifacts/AstroFrame/AstroFrame.Desktop.exe`. This self-contained build does not require Python, a GPU, or a separate .NET installation. Keep the entire application folder together. -Windows enforces a **6 GiB process allocation limit** and a **3 GiB managed-heap limit**. Only one desktop instance can run at a time. Analysis uses up to four workers, leaving at least two logical processors unused where available. It rejects images exceeding a 256 MiB per-frame budget and pauses when it cannot leave roughly 25% of physical RAM free (up to 8 GiB). If pressure persists for 20 seconds, completed measurements are saved for resuming. The page file is not counted as available physical RAM. Windows software rendering is used during this release. The larger limit provides headroom; it does not allocate 6 GiB in advance. +Analysis scales its memory budget with physical RAM and samples available headroom before admitting each frame. It reserves one quarter of RAM (up to 8 GiB) for the OS and other applications, counts concurrent frame reservations atomically, and stops safely after 20 seconds of sustained pressure once active frames finish. Windows enforces a process ceiling of physical RAM minus that reserve; the old fixed process, heap and per-frame caps have been removed. Per-frame estimates include working buffers and are bounded by half the machine budget, with the existing 100 MP FITS limit retained. Up to 16 workers are selected from CPU capacity, leaving two logical processors unused where possible. Only one ordinary desktop instance runs at a time. The page file is not treated as available physical RAM. Windows uses software rendering. -`Open Sample Survey.cmd` opens all supplied datasets, including NGC 7000. `Open NGC 7000.cmd` opens its separate project. Normal launches reopen the last project automatically. Reopening a completed project uses saved measurements. New display caches are generated on demand for older projects without recomputing classifications; subsequent previews use cached linear thumbnails. An explicit project can also be opened with `AstroFrame.Desktop.exe --project "project folder"`. +`Open Sample Survey.cmd` opens all supplied datasets, including NGC 7000. `Open NGC 7000.cmd` opens its separate project. Normal launches start with an empty session. Saved projects and decisions remain available when explicitly reopened or when their source folder is selected again. Reopening a completed project uses saved measurements. New display caches are generated on demand for older projects without recomputing classifications; subsequent previews use cached linear thumbnails. An explicit project can also be opened with `AstroFrame.Desktop.exe --project "project folder"`. To analyze another dataset, choose **Analyze lights**, select the folder containing original `.fit`, `.fits`, or `.fts` files, and wait for analysis. Subfolders are included. New projects are saved separately under `%LOCALAPPDATA%/AstroFrame/Projects/` on Windows (the equivalent local application-data location on Linux). The input folder is not used for project storage. @@ -22,11 +22,12 @@ To analyze another dataset, choose **Analyze lights**, select the folder contain - Select a quality measurement and click the graph to inspect an exposure. One graph shows the selected metric, including stellar flux when selected. Capture order uses UTC timestamps; gaps between sessions are marked rather than drawn to elapsed-time scale. - Filter **REVIEW** or **REJECT**, and sort by concern, star count, stellar flux, or FWHM. - Toggle **Compare nearby** and **Spatial overlay**. Red fill shows transient sky structure in the aligned reference grid. Region outlines show forced stellar flux loss. Previews have independent display stretches; use measured flux to compare transparency. -- Use **Frame view** for an area-averaged exposure preview, or **Nebula view** for additional averaging of faint diffuse structure. Adjust **Stretch** to brighten the display. These controls never affect measurements, classifications or original files. +- Use **Frame view** for the default area-averaged grayscale preview, or **Denoised** for an alternative that reduces noise using similar nearby image patches. Denoised keeps its stretch parameters from the original thumbnail and is slightly brighter by default. Adjust **Preview stretch** in either view. Both comparison panes use the same viewing mode. These controls never affect measurements, classifications or original files. +- Scroll the mouse wheel over either preview to zoom around the cursor, and hold the left mouse button to drag. Zoom and image position persist across frames and are shared with the nearby comparison. **Reset view** restores the fitted, centered image. These display controls do not alter source pixels or analysis. - Press **1**, **2**, **3** for KEEP, REVIEW, REJECT. Decisions save and advance. **J/K** navigates. **Reset** restores the automatic decision. **Ctrl+Z** undoes a manual decision. - Decision evidence and measurements remain visible below the quality graph. Hover over an evidence line to read its full technical detail, and scroll the panel for additional measurements. Preview stretch and manual decisions sit below the image. Existing notes remain in saved projects and exports; the note editor has been removed. Automatic decisions and human overrides remain separate. -KEEP means consistent measurements; it does not certify a perfect frame. REVIEW means a substantial deviation or measurement uncertainty. REJECT requires strong, coherent transient sky structure, agreement between cloud/flux/star-loss measurements, severe combined morphology degradation, or catastrophic star disappearance. Small ellipticity variations alone do not trigger review. +KEEP means consistent measurements; it does not certify a perfect frame. REVIEW means a substantial deviation or measurement uncertainty. REJECT requires strong, coherent transient sky structure, agreement between cloud/flux/star-loss measurements, thin cloud texture on an already-flagged frame that dims the stars beneath it relative to the rest of the exposure, severe combined morphology degradation, stellar elongation confirmed on the same matched reference stars (the roundness outliers stacking filters discard), or catastrophic star disappearance. Small ellipticity variations alone do not trigger review. The earlier engine missed obvious clouds and falsely reviewed a clear frame. Its rolling background baselines and detection-only flux measurements have been replaced. Analysis-version changes request reanalysis while preserving manual decisions. Display changes have their own cache version, so preview upgrades do not invalidate quality measurements. @@ -42,7 +43,7 @@ Exports include `accepted.txt` with accepted output paths and `decisions.csv` wi ## Build and validate -The [server release workflow](.forgejo/workflows/release.yml) builds and publishes both platforms when a stable version tag such as `v1.0.1` is pushed. Set the matching version with `./packaging/Set-Version.ps1 -Version 1.0.1`, commit/push the source, then push the tag. It uses the existing Docker runner and automatically supplied Forgejo token. Pushes and manual Actions runs on `main` check the build without publishing. See [automatic releases](docs/releases.md#automatic-server-releases). +The [server release workflow](.forgejo/workflows/release.yml) builds and publishes both platforms when a stable version tag such as `v1.0.3` is pushed. Set the matching version with `./packaging/Set-Version.ps1 -Version 1.0.3`, commit/push the source, then push the tag. It uses the existing Docker runner and automatically supplied Forgejo token. Pushes and manual Actions runs on `main` check the build without publishing. Version 1.0.2 fixes the spatial preview overlay; see [release notes](docs/release-notes/1.0.2.md) and [automatic releases](docs/releases.md#automatic-server-releases). Requires a .NET 8 SDK. `Build.ps1` uses the workspace-local SDK if present, otherwise `dotnet` from PATH: @@ -62,7 +63,7 @@ dotnet publish src/AstroFrame.Desktop -c Release -r linux-x64 --self-contained t The Windows build and rendered layout were tested here. Linux uses Avalonia's X11 backend and bundled Skia/Harfbuzz binaries; packaged Linux startup, settings rendering, installation and self-updates were also exercised under Ubuntu WSL. Debian/Arch desktop acceptance remains to be checked directly. A Linux desktop with the usual X11/font/ICU libraries is required; see [installation and releases](docs/releases.md). -Prebuilt Linux files are in `artifacts/AstroFrame-linux`. On Linux, run `chmod +x AstroFrame.Desktop` before launching if executable permissions were lost during transfer. The managed-heap limit and RAM-pressure monitoring also apply on Linux; the Windows kernel job limit does not. +Prebuilt Linux files are in `artifacts/AstroFrame-linux`. On Linux, run `chmod +x AstroFrame.Desktop` before launching if executable permissions were lost during transfer. RAM admission and physical headroom monitoring also apply on Linux; the Windows kernel job ceiling does not. Batch analysis and review-label summaries: diff --git a/docs/algorithm-1.1.1-validation.md b/docs/algorithm-1.1.1-validation.md new file mode 100644 index 0000000..48c5102 --- /dev/null +++ b/docs/algorithm-1.1.1-validation.md @@ -0,0 +1,65 @@ +# Algorithm comparison for 1.1.1 + +Validation performed October 4, 2026. The baseline is the unchanged source at `a8e7a87` (1.1.0), with its validation executable preserved before changing the engine. Both algorithms processed original Sample Data FITS files into separate workspace artifact directories. Source files and the installed application were untouched. + +## Results + +| Session | Frames | 1.1.0 Keep / Review / Reject | 1.1.1 Keep / Review / Reject | +|---|---:|---|---| +| NGC 1432, September 20 | 490 | 358 / 55 / 77 | **358 / 32 / 100** | +| NGC 1432, October 2 | 563 | 547 / 16 / 0 | **547 / 16 / 0** | +| NGC 7000, August 17 | 147 | 141 / 6 / 0 | **141 / 6 / 0** | +| IC 1805, August 26 | 309 | 301 / 3 / 5 | **301 / 2 / 6** | +| Total | 1,509 | 1,347 / 80 / 82 | **1,347 / 56 / 106** | + +All 24 differences are Review → Reject: 23 in the requested NGC 1432 session and one in IC 1805. No Keep or existing Reject changed verdict; no new Keep was introduced. The requested session's review workload falls by 23 frames (41.8%). All four supplied cloud examples now Reject. The two supplied clear-looking morphology examples remain Review because original-source stellar crops show shape differences and the matched-star evidence remains near the practical tolerance. + +## What changed + +- Missing reference stars are distinguished from failed geometry. Tight-match count, residuals and spatial distribution can validate the surviving star field. The nearly opaque example has 164 tight correspondences and a median residual of 0.423 original pixels, despite a detected-star match fraction of only 0.297. +- Broad coherent sky anomalies can be corroborated by attenuation measured specifically at reference apertures under positive excess-sky cells. Nearby comparisons use the same apertures, with reference scatter and local sky/background photometry uncertainty. This avoids dilution by unaffected stars or coarse whole-image regions. +- Matched bright stars cross-check elongation, with enough nearby reference frames and a conservative effect/uncertainty margin. An initial candidate Keep was not retained after original-source crops showed measurable elongation. The final comparison preserves every prior Keep/Reject membership. +- The analysis-version identifier changed, invalidating old automatic measurements while retaining human decisions. Display and binary-cache formats are unchanged; reanalysis generates the new diagnostics. + +## Inspection of the differences + +Every final changed exposure was inspected in source-derived previews and against its measured local attenuation. Each NGC 1432 difference shows a cloud band or patch, including the four supplied examples. A positive cloud structure and a consistent loss in the affected stellar apertures support these rejections. The changed IC 1805 frame (`20260826-012414`) shows cloud entering the lower part of the field; subsequent frames show that cloud moving across the right side. Its affected-aperture flux is approximately 73% of nearby reference flux. Adjacent preceding clear frames preserve the persistent nebula and remain Keep. This is transient cloud evidence rather than the nebula itself being rejected. + +Additional visual controls include nine fixed-time samples in each nebula session, the nine weakest pre-existing NGC 1432 rejects, and the strongest remaining cloud Review frames. NGC 7000 has **zero decision changes across all 147 exposures**. All 301 IC 1805 Keeps and five existing Rejects are unchanged. The second NGC 1432 night also has zero changes across 563 exposures. + +These inspections are an assistant assessment supported by measurements, not independent owner labels for the entire dataset. They support this focused improvement and found no incorrect new rejection in the audited differences. They do not establish a zero-error guarantee on future targets or substitute for controlled stacks. We retain Review where geometry, attenuation, or morphology is uncertain. + +## Regression and release checks + +- The focused regression loop initially failed three checks on the old policy and passes on the new policy: accurate geometry despite star disappearance; broad sky structure with local attenuation; and detection-cohort morphology corroboration. +- The full engine suite passes **77 checks**, including persistent nebulosity and gradients, prolonged moving cloud, no stable clear reference, low geometry confidence, insufficient/noisy apertures, measurable elongation, source-safe export, preview independence, and upgrade preservation of human decisions. +- A checked-in 46-frame measured fixture preserves four owner cloud examples and two owner-confirmed clear controls, without requiring the original FITS files in CI. +- All **9/9 owner-labeled real examples** pass. The **40/40 previously screened cloud-only samples available in these tested sessions** also pass. Those samples were previously used in tuning, so they are not an independent accuracy estimate. +- The updater and mocked publisher suites run on the final versioned source before publication. The publisher tests do not publish or interact with the installed app. + +## Additional spatial and trail experiments + +The three suggested topics were evaluated before publication. They are promising directions, but the tested prototypes did not establish a further safe verdict improvement, so they are not additional production rejection rules in 1.1.1. + +**Cloud-scale smoothing and multiple scales.** All 1,509 cached aligned sky maps were evaluated at the existing cell scale and with 3×3 and 7×7 box filters. Each scale used scatter measured from equally filtered clear-reference residuals, retaining the original noise floor and overlap mask; uncertainty was not reduced by assuming neighboring cells were independent. These are bounded box-filter experiments, not an exhaustive evaluation of Gaussian, wavelet, or adaptive filters. The existing significance, coverage and connected-area gates were applied for comparison. + +- No previously nonsuspicious Keep acquired a cloud candidate at either added scale. +- A 3×3 filter reduced suspicious sky Review candidates from 15 to 14 in NGC 1432, without introducing a new candidate; the removed candidate is from the otherwise unchanged October night. +- A 7×7 filter reduced NGC 1432 candidates from 15 to 11, and IC 1805 Review candidates from two to one. It also removed the sky-candidate gate from two existing IC 1805 Rejects (`20260826-012650` and `20260826-012721`), whose source-derived previews show cloud entering at the edge. Their affected-aperture flux ratios are approximately 60% and 59%. +- Requiring agreement at all scales could suppress real partial clouds. Taking their union retained the original candidate membership, giving no additional verified accuracy gain. Connected regions and affected-star corroboration were therefore retained without replacing the fine-scale evidence or promoting smoothed-away warnings to Keep. + +Filtering a background mesh is an established measurement technique, but does not itself establish a safe frame rejection policy; [Photutils Background2D](https://photutils.readthedocs.io/en/latest/api/photutils.background.Background2D.html) documents mesh filtering independently of this classifier. + +**Directional trails.** Original FITS stellar cores were measured for 104 selected exposures: morphology Review frames, nearby representative Keeps, and nine fixed-time Keep controls in each target. The exploratory measurement reused positive core moments, excluded detected close neighbors within ten superpixels, and computed the ellipticity-weighted double-angle resultant for isolated stars with ellipticity at least 0.15. This measures directional consistency from zero to one; it is not a calibrated PSF fit or an independent tracking-error label. + +The median resultant was 0.987 for 33 NGC 1432 Reviews versus 0.874 for 41 Keeps, and 0.963 for six NGC 7000 Reviews versus 0.653 for 15 Keeps. However, nine IC 1805 Keep controls already had a median resultant of 0.930 and median isolated-star ellipticity of 0.280. Thus a high directional consistency alone does not distinguish tracking failure from the session's normal optics/sampling. The Reviews are already captured by elongation; there are no independently labeled trail acceptance boundaries in these samples to justify automatically discarding them. A future rule should compare matched-star shape tensors after accounting for frame rotation, spatial optical patterns, sampling and fit uncertainty, then validate against explicit acceptable/unacceptable tracking labels. This release retains conservative matched-star elongation corroboration and Review for unresolved shape changes. + +[Siril's Dynamic PSF documentation](https://siril.readthedocs.io/en/latest/Dynamic-PSF.html) describes rotation-angle fitting and notes that elliptical stars can arise from optical aberrations, tracking, or blended stars. Its fitted Gaussian/Moffat profiles are more sophisticated than AstroFrame's core moments; we do not claim identical measurement accuracy or that the suggested cloud classifier is documented as a Siril feature. + +Workspace experiment sources/results are `SpatialTopics.cs`, `spatial-topics.json`, `DirectionTopics.cs`, and `direction-topics.json` under `artifacts/algorithm-1.1.1/`; `smoothed-loss-1.png` contains the seven sky-candidate losses at the largest scale. These research experiments do not modify production measurements, the source FITS files, or the comparison verdicts above. + +## Reproduction and artifacts + +Baseline/new analysis uses the validation executable's `analyze --fresh` mode, with temporary/cache environment variables confined to the workspace as prescribed in AGENTS.md. The baseline executable is preserved at `artifacts/algorithm-1.1.1/baseline-cli/`; baseline and final projects, catalog caches, previews, manifests and reports are under `baseline-*` and `new-*` sibling folders. Final policy refinements reused identical stellar/sky/aperture measurements and rebuilt their reference diagnostics. All 1,509 source size/modification-time fingerprints remain unchanged. + +`artifacts/algorithm-1.1.1/comparison.json` records the full per-exposure differences. `changes-1.png` through `changes-3.png` show every final changed frame; `nebula-controls-*.png` and `nebula-cloud-transition-1.png` show the nebula controls and the IC 1805 transition. `keep-stars.png` documents why the exploratory new Keep was retained as Review in the final policy. Compact session counts and per-change measurements are checked in as [quality-1.1.1-validation.json](diagnostics/quality-1.1.1-validation.json). diff --git a/docs/analysis-design.md b/docs/analysis-design.md index 544ffe7..8d076df 100644 --- a/docs/analysis-design.md +++ b/docs/analysis-design.md @@ -6,6 +6,8 @@ The supplied 1,920 originals cover four targets and five sessions, with 2160×38 The first algorithm failed real owner-reviewed examples: cloud structure inflated detected-star counts; flux only sampled surviving detections; rolling baselines absorbed prolonged cloud; a small ellipticity deviation reviewed a clear image. The v2 design replaces the cloud measurements, reference construction and classification policy. Rejection counts are not a target or a validation criterion. +Version 1.1.1 refines this policy with geometric fit diagnostics, local cloud-aperture corroboration, and matched-star morphology checks. Version 1.1.6 adds thin-cloud texture with same-exposure differential photometry; 1.1.7 adds moderate-cloud corroboration and confirmed-elongation rejection. The original v2 results remain a baseline; see [the 1.1.1 comparison](algorithm-1.1.1-validation.md) for the measurements and limits of the new validation. + ## Components - **Engine:** FITS reader, independent `IFrameDetector` measurements, background reference construction, aperture photometry, named decision rules, persistence and export. No GUI, Python runtime, AI or GPU dependency. @@ -22,6 +24,7 @@ Additional detectors can add measurements independently. A future AI reviewer ca 4. Robustly remove each map's additive offset and planar gradient. Form an aligned median background map, measure transient residuals, and rebuild three times from the least transient 40% of exposures. This fraction constructs a reference; it is **not** a rejection quota. Persistent target nebulosity belongs to the reference. Smooth sky gradients and offsets are removed rather than interpreted as cloud. 5. Read each exposure once more, sequentially, for signed aperture photometry at up to 600 reference coordinates. A local annulus subtracts sky. Reference brightness establishes aperture eligibility; a star need not be detected in the tested exposure. Median fluxes from reference exposures normalize global and 3×4 regional transparency. This addresses survivor bias. Saturated apertures and positions outside the field are excluded explicitly. 6. Compare 960 aligned sky cells with the reference. Cell scatter comes from reference-frame residual MAD with a floor relative to measured image noise. Store a mask above five times that scatter, affected overlap fraction, largest connected component, 95th-percentile significance, residual ADU, aperture counts and reference overlap. These are named evidence, not an opaque combined score. +7. Measure thin-cloud texture separately. Remove a robust quadratic surface, not only a plane, from each aligned residual, then average each cell with its 3×3 neighbors. Divide by the per-cell scatter that reference exposures show for the same smoothed statistic; the floor is half the median of those scatters. Cells above four times scatter form a texture mask. Store the 98th-percentile texture significance, affected and largest connected fraction. Compare the median forced flux of reference apertures inside the mask with apertures in clear cells (below twice scatter) of the same exposure. Normalize that inside/outside ratio by the same apertures in the nearest 40 reference exposures and divide its loss by their MAD, with a 1% floor. Global transparency, seeing and airmass changes cancel in this differential ratio; a sky-only gradient leaves it near one. Grid background estimation and local aperture subtraction are standard image-analysis techniques; see [Photutils background documentation](https://photutils.readthedocs.io/en/stable/api/photutils.background.Background2D.html). This implementation is independent C#, using the supplied data to establish its comparison distributions. @@ -33,26 +36,36 @@ REJECT evidence routes are explicit: - Strong spatial structure: at least 25× reference scatter at the 95th percentile, at least 8% affected overlap and a connected area of at least 3.5%. A lone sky signal must be overwhelming before discarding integration; weaker coherent structure needs stellar corroboration or routes to REVIEW. - Moderate coherent spatial structure plus substantial global flux loss, regional forced-flux loss or detected-star loss. +- Coherent structure at least 8× reference scatter, at least 8% affected overlap, and a connected anomalous area of at least 3.5%, corroborated by positive excess-sky coverage of at least 8% and a positive connected area of at least 3.5%. At least 20 reference apertures in two regions inside that excess sky must show below 90% of nearby same-aperture flux, with at least three times the larger of reference scatter, a 3% floor, and propagated local photometry uncertainty. Affected-aperture comparisons use the nearest 40 reference members, excluding the tested exposure, and require at least 12 valid comparison frames. +- Thin cloud on an exposure already routed to REVIEW by another measurement: texture significance at least 10, a connected textured area of at least 5%, at least 20 apertures both inside and outside the texture, and stars inside at most 98% of their clear-cell flux with a loss of at least 2.5 times nearby reference scatter. Applying real cloud masks to clear exposures put 0.4–0.6% of differential deviations at or above 2.5, and clear exposures do not reach the texture prerequisite. This route never rejects an otherwise clean KEEP. +- Moderate thin cloud on an exposure the planar structure detector already flags (at least 5× scatter over 2% of the overlap): texture significance at least 20 with the same connectivity and aperture requirements, inside/outside dimming of at least 1.5% and 1.5 times scatter, and independently at least 20 excess-sky apertures in two regions at or below 93% of nearby same-aperture flux with at least 2.5 times scatter. - Severe global flux loss (below 60% of clear-frame baseline) with substantial detected-star loss. - Severe combined stellar width and ellipticity degradation, or almost complete star disappearance relative to a rich reference field. +- Confirmed elongation: an existing elongation flag (at least four scatters and 0.15 above the nearby ellipticity baseline) that the same matched reference stars confirm. This requires at least 50 matched stars and 12 nearby reference frames, uncertainty at most 0.025, and a median change whose lower three-standard-error bound is at least 0.10, the same limit below which a flag is dismissed. Changes between the two limits stay REVIEW. Stacking workflows discard such roundness outliers; for example, Siril's Seestar script applies `-filter-round=2.5k`. On both supplied NGC 1432 nights, 22 of 38 confirmed frames fall below Siril's own roundness cutoff and the rest lie near it. Every confirmed frame exceeds an eccentricity-equivalent of 0.6. Unconfirmed or imprecise flags remain REVIEW. -Automatic rejection requires enough comparable frames, valid time and adequate aligned overlap. Ordinary rejection also requires reliable matching/aperture measurements. Ambiguous structure, moderate flux loss, substantial single-metric morphology changes and uncertain measurements route to REVIEW. Minor ellipticity fluctuations and a high global background alone do not trigger review. +Automatic rejection requires enough comparable frames, valid time and adequate aligned overlap. Ordinary spatial rejection also requires verified geometry: at least 20 tight correspondences, at least 80% of correspondences within the width-scaled tight tolerance, three regions with at least three tight matches each, and a spread of at least 15% of the image width and height. The median residual must be at most the larger of 0.5 original pixels and 0.2× reference width; the 95th percentile must be at most the larger of one original pixel and 0.5× reference width. Transform scale must remain between 0.975 and 1.025. Missing stars alone no longer veto a cloud rejection when geometry and aperture coverage are verified; low star survival still cannot certify KEEP. Catalog-only classification retains its previous match-fraction safeguard. + +An existing elongation flag can be dismissed only when at least 50 matched bright reference stars and 12 nearby reference frames provide a precise, small shape change. Its median change plus three estimated standard errors must be below 0.10, and the uncertainty must not exceed 0.025. Missing pairs cannot dismiss a warning. Matched stars use the same reference identities rather than independently selected detection populations. This remains moment-based photometry, not a new PSF-fitting implementation. Ambiguous structure, moderate flux loss, substantial single-metric morphology changes and uncertain measurements route to REVIEW. Minor ellipticity fluctuations and a high global background alone do not trigger review. These significance and effect-size limits are **engineering policy, not calibrated probabilities or guarantees**. Reference scatter, noise, star population, flux, seeing and background are measured separately per session. No fixed acceptable star count or absolute sky brightness is used. The score exists only for sorting. ## Limits that need validation -A wholly uniform, cloudy session may lack any internally observable clear reference. Clouds that resemble a smooth gradient and have little detectable attenuation are difficult. Dense nebulosity, alignment failures, crowded fields, large drift/rotation and changing PSFs can bias maps or fixed-aperture flux. The current model removes only a planar sky trend; a legitimate time-varying nonlinear sky pattern can require review. The red overlay identifies anomalous sky structure, not a pixel-accurate physical cloud segmentation. +A wholly uniform, cloudy session may lack any internally observable clear reference. Clouds that resemble a smooth gradient and have little detectable attenuation are difficult. Dense nebulosity, alignment failures, crowded fields, large drift/rotation and changing PSFs can bias maps or fixed-aperture flux. The main structure model removes only a planar sky trend; a legitimate time-varying nonlinear sky pattern can require review. The thin-cloud texture also removes quadratic curvature, but requires stellar dimming beneath it before rejecting. Faint cirrus on an otherwise clean exposure remains KEEP: its effect on a stack has not been validated. The red overlay identifies anomalous sky structure, not a pixel-accurate physical cloud segmentation. Small sessions and unreliable references cannot automatically reject. Reference stability also checks reference-map residuals against measured pixel noise; a wholly unstable comparison population routes to REVIEW. This does not detect a perfectly uniform, consistently attenuated session. Human overrides remain separate from automatic results. Do not claim the method matches manual Siril selection until independently processed stacks support that claim. ## Memory, caching and safety -Up to four workers are now selected automatically, leaving two logical processors unused where possible. A 48-frame NGC 7000 measurement benchmark took 9.04/4.99/2.94 seconds with one/two/four workers, with identical star counts and four-worker peak RAM of 250 MiB. This measures the stellar/background stage, not whole-project speedup. No full-resolution image collection or stack is held in RAM. Reference maps are only 960 values per frame. Windows enforces a verified 6 GiB process allocation cap; both executables use a 3 GiB managed-heap cap. A 256 MiB estimated per-frame budget rejects oversized allocations. Analysis checks physical memory before both image passes, reserving up to 8 GiB or one quarter of physical RAM. The page file does not satisfy this reserve. Sustained pressure stops safely and saves measurements. +Version 1.1.0 selects up to 16 workers from CPU capacity, leaving two logical processors unused where possible. A 48-frame measurement run on a 16-logical-processor machine took 2.93 seconds with four workers and 1.32 seconds with fourteen, with identical star counts (peak working sets 251 and 762 MiB). This measures stellar/background processing, not whole-project speedup. No full-resolution image collection or stack is held in RAM. Windows uses a verified process ceiling based on physical RAM minus its reserve, rounded to an allocation boundary. Fixed 6 GiB process, 3 GiB heap and 256 MiB frame caps have been removed. Per-frame estimates include a 64 MiB working margin and are limited to half the machine budget. Both image passes, previews and star detail acquire atomic memory reservations, sampling physical headroom for every frame. The OS/desktop reserve remains one quarter of RAM up to 8 GiB; page-file capacity does not satisfy it. Sustained external pressure stops safely after active frames finish and saves completed measurements. Small JSON metadata stores decisions, notes, evidence and compact masks. Binary versioned caches hold stars, sky maps and forced photometry, validated against source size and modification time and reference identity. A new engine version invalidates analysis without losing human labels. Repeated analysis uses cached measurements and forced apertures when valid. Project writes replace a temporary file atomically. Cancellation leaves analysis incomplete and export disabled. -Display caches have a separate version. They contain compressed, linear, area-averaged thumbnails rather than a permanently stretched byte image. The screen transfer uses a noise-aware black point and adjustable median brightness; **Nebula view** averages neighboring display samples further. This avoids nearest-pixel aliasing and the original excessively bright, noisy stretch. Prepared display statistics are cached in the viewer so slider changes remain responsive. Disk loading and first-time thumbnail creation run off the UI thread, with cancellation and a single preview-loading gate preventing queued FITS reads during rapid navigation. Old projects regenerate only requested displays on demand. +Display caches have a separate version. They contain compressed, linear, area-averaged thumbnails rather than a permanently stretched byte image. **Frame view** retains its noise-aware black point and adjustable median brightness. **Denoised** is the only alternative. It performs non-local means on the linear thumbnail using 5×5 patches, a 13×13 search window, reflected borders, noise-bias subtraction and a filter strength of 0.8 times the estimated noise sigma. Its black point, white point and normalized median come from the original thumbnail; they are never recomputed from the denoised result. This prevents the stretch from amplifying residual noise after denoising. It adds 0.07 to the requested display median, matching the approved samples' default brightness of 0.25 at slider value 0.18. + +The previous Nebula, Asinh and Color nebula modes are removed. The denoised result stays in the selected viewer's memory and is computed only when requested. It needs no new disk cache or FITS reader and works on monochrome and Bayer-derived grayscale thumbnails alike. Existing linear caches remain compatible, and existing color caches are simply unused. The analysis path, classifications and original FITS files are unaffected. + +Prepared display statistics and the denoised plane are retained in the viewer so slider changes remain responsive. Loading and denoising run off the UI thread, with cancellation, atomic memory reservations and a single preview-loading gate preventing queued work during rapid navigation. The original Frame preview remains available while denoising runs. Both comparison panes use the selected mode and shared zoom/pan. Old projects regenerate only requested displays on demand. Denoising is a viewing aid and may soften weak detail; Frame view and source-star inspection remain available for judging unfiltered morphology. The preview is not an input to classification. Source-star inspection reads two originals, maps identical stars through their stored alignment, and displays enlarged source superpixels without interpolation. Crops are independently normalized to judge morphology. See [Siril's screen-transfer discussion](https://siril.readthedocs.io/en/latest/processing/stretching.html) for the distinction between display stretching and linear image data. diff --git a/docs/desktop-design.md b/docs/desktop-design.md index 97c5eeb..a9064ca 100644 --- a/docs/desktop-design.md +++ b/docs/desktop-design.md @@ -2,7 +2,7 @@ The owner selected the Graphite Studio palette and Plum Atlas layout from the standalone concepts. The application combines their charcoal backgrounds, silver accents, restrained decision colors, compact summaries and three-column workspace. The exposure queue is on the left, the largest column holds the preview, and the right column contains one selectable quality graph above permanently accessible evidence and measurements. A compact selector above the workspace switches sessions, including All sessions. Filtering, sorting, graph selection, keyboard review, saved overrides, undo and accepted-frame export remain available. -Frame/Nebula view, cloud overlay and nearby comparison sit above the preview. Preview stretch has a dedicated 48-pixel row below it and a visible silver thumb. The single verdict/time caption, filename and decision buttons follow the stretch. Long evidence lines present a concise first clause, with their complete engine-generated message available on hover. The evidence panel scrolls when needed; no measurements or saved explanations are discarded. +The Frame view / Denoised dropdown, cloud overlay and nearby comparison sit above the preview. Denoised uses the approved patch-based noise reduction with the original thumbnail's stretch parameters. Nebula, Asinh and Color nebula options are removed. Preview stretch has a dedicated 48-pixel row below it and a visible silver thumb. The single verdict/time caption, filename and decision buttons follow the stretch. Long evidence lines present a concise first clause, with their complete engine-generated message available on hover. The evidence panel scrolls when needed; no measurements or saved explanations are discarded. The header now has a plain graphite background. Its height is reduced from 100 to 74 logical pixels: a 36-pixel native caption row and a 38-pixel project/action row. The project name and light/session counts sit on one line. Removing the photographic background also removes its display-bitmap allocation; the original asset remains preserved with the standalone design concepts. diff --git a/docs/diagnostics/quality-1.1.1-validation.json b/docs/diagnostics/quality-1.1.1-validation.json new file mode 100644 index 0000000..e4f41c1 --- /dev/null +++ b/docs/diagnostics/quality-1.1.1-validation.json @@ -0,0 +1,360 @@ +{ + "date": "2026-10-04", + "baselineCommit": "a8e7a87b94d0f8046209e9c937bd83bf4b811f10", + "baselineEngine": "0.2.0-spatial-reference-1", + "newEngine": "0.2.1-spatial-reference-2", + "sessions": [ + { + "session": "NGC 1432 \u00b7 2026-09-20 06:50 \u00b7 1 \u00b7 IRCUT", + "frames": 490, + "old": { + "Keep": 358, + "Review": 55, + "Reject": 77 + }, + "new": { + "Keep": 358, + "Review": 32, + "Reject": 100 + } + }, + { + "session": "NGC 1432 \u00b7 2026-10-02 06:00 \u00b7 2 \u00b7 IRCUT", + "frames": 563, + "old": { + "Keep": 547, + "Review": 16, + "Reject": 0 + }, + "new": { + "Keep": 547, + "Review": 16, + "Reject": 0 + } + }, + { + "session": "NGC 7000 \u00b7 2026-08-17 04:33 \u00b7 1 \u00b7 LP", + "frames": 147, + "old": { + "Keep": 141, + "Review": 6, + "Reject": 0 + }, + "new": { + "Keep": 141, + "Review": 6, + "Reject": 0 + } + }, + { + "session": "IC 1805 \u00b7 2026-08-26 08:00 \u00b7 1 \u00b7 LP", + "frames": 309, + "old": { + "Keep": 301, + "Review": 3, + "Reject": 5 + }, + "new": { + "Keep": 301, + "Review": 2, + "Reject": 6 + } + } + ], + "changes": [ + { + "file": "Light_NGC 1432_30.0s_IRCUT_20260919-235506.fit", + "before": "Review", + "after": "Reject", + "skySignificance": 21.93785621095097, + "affectedFluxRatio": 0.8636848120909967, + "affectedFluxDeviation": 4.543839596966776, + "alignmentMedianPixels": 0.2631228145939164, + "visualAssessment": "Transient cloud structure corroborated by affected-aperture attenuation" + }, + { + "file": "Light_NGC 1432_30.0s_IRCUT_20260919-235537.fit", + "before": "Review", + "after": "Reject", + "skySignificance": 14.205363402591354, + "affectedFluxRatio": 0.8845403044429598, + "affectedFluxDeviation": 3.848656518568007, + "alignmentMedianPixels": 0.25334731221934753, + "visualAssessment": "Transient cloud structure corroborated by affected-aperture attenuation" + }, + { + "file": "Light_NGC 1432_30.0s_IRCUT_20260919-235608.fit", + "before": "Review", + "after": "Reject", + "skySignificance": 19.304613846485182, + "affectedFluxRatio": 0.8423382721761337, + "affectedFluxDeviation": 5.255390927462213, + "alignmentMedianPixels": 0.25116491416396974, + "visualAssessment": "Transient cloud structure corroborated by affected-aperture attenuation" + }, + { + "file": "Light_NGC 1432_30.0s_IRCUT_20260920-000300.fit", + "before": "Review", + "after": "Reject", + "skySignificance": 21.99244300903803, + "affectedFluxRatio": 0.83036711072136, + "affectedFluxDeviation": 5.6544296426213325, + "alignmentMedianPixels": 0.23723050615616165, + "visualAssessment": "Transient cloud structure corroborated by affected-aperture attenuation" + }, + { + "file": "Light_NGC 1432_30.0s_IRCUT_20260920-000331.fit", + "before": "Review", + "after": "Reject", + "skySignificance": 18.008937347417586, + "affectedFluxRatio": 0.8425858408547843, + "affectedFluxDeviation": 5.247138638173857, + "alignmentMedianPixels": 0.23176112388221165, + "visualAssessment": "Transient cloud structure corroborated by affected-aperture attenuation" + }, + { + "file": "Light_NGC 1432_30.0s_IRCUT_20260920-001125.fit", + "before": "Review", + "after": "Reject", + "skySignificance": 8.238866042072468, + "affectedFluxRatio": 0.8453711916213303, + "affectedFluxDeviation": 5.154293612622321, + "alignmentMedianPixels": 0.2004272687660229, + "visualAssessment": "Transient cloud structure corroborated by affected-aperture attenuation" + }, + { + "file": "Light_NGC 1432_30.0s_IRCUT_20260920-001156.fit", + "before": "Review", + "after": "Reject", + "skySignificance": 14.060493454157665, + "affectedFluxRatio": 0.873622460980021, + "affectedFluxDeviation": 4.2125846339993, + "alignmentMedianPixels": 0.21057367839555907, + "visualAssessment": "Transient cloud structure corroborated by affected-aperture attenuation" + }, + { + "file": "Light_NGC 1432_30.0s_IRCUT_20260920-002817.fit", + "before": "Review", + "after": "Reject", + "skySignificance": 19.741168661451677, + "affectedFluxRatio": 0.8912902562183401, + "affectedFluxDeviation": 3.6236581260553278, + "alignmentMedianPixels": 0.18335484479463354, + "visualAssessment": "Transient cloud structure corroborated by affected-aperture attenuation" + }, + { + "file": "Light_NGC 1432_30.0s_IRCUT_20260920-003713.fit", + "before": "Review", + "after": "Reject", + "skySignificance": 231.33479320777224, + "affectedFluxRatio": 0.039192529060025114, + "affectedFluxDeviation": 32.026915697999165, + "alignmentMedianPixels": 0.4229262918099691, + "visualAssessment": "Transient cloud structure corroborated by affected-aperture attenuation" + }, + { + "file": "Light_NGC 1432_30.0s_IRCUT_20260920-004304.fit", + "before": "Review", + "after": "Reject", + "skySignificance": 15.49719600393806, + "affectedFluxRatio": 0.8461550650098837, + "affectedFluxDeviation": 5.128164499670544, + "alignmentMedianPixels": 0.16358180745346368, + "visualAssessment": "Transient cloud structure corroborated by affected-aperture attenuation" + }, + { + "file": "Light_NGC 1432_30.0s_IRCUT_20260920-004624.fit", + "before": "Review", + "after": "Reject", + "skySignificance": 15.391777248244273, + "affectedFluxRatio": 0.8897937985360267, + "affectedFluxDeviation": 3.6735400487991123, + "alignmentMedianPixels": 0.17600984075984275, + "visualAssessment": "Transient cloud structure corroborated by affected-aperture attenuation" + }, + { + "file": "Light_NGC 1432_30.0s_IRCUT_20260920-004726.fit", + "before": "Review", + "after": "Reject", + "skySignificance": 18.57963411527099, + "affectedFluxRatio": 0.8705488825072726, + "affectedFluxDeviation": 4.315037249757581, + "alignmentMedianPixels": 0.17524893834549105, + "visualAssessment": "Transient cloud structure corroborated by affected-aperture attenuation" + }, + { + "file": "Light_NGC 1432_30.0s_IRCUT_20260920-005235.fit", + "before": "Review", + "after": "Reject", + "skySignificance": 24.15637588387764, + "affectedFluxRatio": 0.8709361884911153, + "affectedFluxDeviation": 4.302127050296157, + "alignmentMedianPixels": 0.14926813111727083, + "visualAssessment": "Transient cloud structure corroborated by affected-aperture attenuation" + }, + { + "file": "Light_NGC 1432_30.0s_IRCUT_20260920-005421.fit", + "before": "Review", + "after": "Reject", + "skySignificance": 8.17568631153736, + "affectedFluxRatio": 0.8956752750757109, + "affectedFluxDeviation": 3.477490830809639, + "alignmentMedianPixels": 0.14261613075981966, + "visualAssessment": "Transient cloud structure corroborated by affected-aperture attenuation" + }, + { + "file": "Light_NGC 1432_30.0s_IRCUT_20260920-010318.fit", + "before": "Review", + "after": "Reject", + "skySignificance": 13.187685772318256, + "affectedFluxRatio": 0.8887345385372606, + "affectedFluxDeviation": 3.708848715424648, + "alignmentMedianPixels": 0.16306293375502223, + "visualAssessment": "Transient cloud structure corroborated by affected-aperture attenuation" + }, + { + "file": "Light_NGC 1432_30.0s_IRCUT_20260920-011113.fit", + "before": "Review", + "after": "Reject", + "skySignificance": 18.169921576052825, + "affectedFluxRatio": 0.8396524330778192, + "affectedFluxDeviation": 5.344918897406026, + "alignmentMedianPixels": 0.16379873442258716, + "visualAssessment": "Transient cloud structure corroborated by affected-aperture attenuation" + }, + { + "file": "Light_NGC 1432_30.0s_IRCUT_20260920-012632.fit", + "before": "Review", + "after": "Reject", + "skySignificance": 19.52391631691044, + "affectedFluxRatio": 0.8490009027116143, + "affectedFluxDeviation": 5.033303242946189, + "alignmentMedianPixels": 0.12881799374449404, + "visualAssessment": "Transient cloud structure corroborated by affected-aperture attenuation" + }, + { + "file": "Light_NGC 1432_30.0s_IRCUT_20260920-012818.fit", + "before": "Review", + "after": "Reject", + "skySignificance": 17.723635511036186, + "affectedFluxRatio": 0.8455906425280958, + "affectedFluxDeviation": 5.146978582396807, + "alignmentMedianPixels": 0.15677678144061136, + "visualAssessment": "Transient cloud structure corroborated by affected-aperture attenuation" + }, + { + "file": "Light_NGC 1432_30.0s_IRCUT_20260920-013137.fit", + "before": "Review", + "after": "Reject", + "skySignificance": 10.824700198303587, + "affectedFluxRatio": 0.8297659241686153, + "affectedFluxDeviation": 5.674469194379491, + "alignmentMedianPixels": 0.13213426121083371, + "visualAssessment": "Transient cloud structure corroborated by affected-aperture attenuation" + }, + { + "file": "Light_NGC 1432_30.0s_IRCUT_20260920-013310.fit", + "before": "Review", + "after": "Reject", + "skySignificance": 9.551977498073267, + "affectedFluxRatio": 0.8809177425716295, + "affectedFluxDeviation": 3.969408580945685, + "alignmentMedianPixels": 0.137763541386481, + "visualAssessment": "Transient cloud structure corroborated by affected-aperture attenuation" + }, + { + "file": "Light_NGC 1432_30.0s_IRCUT_20260920-013746.fit", + "before": "Review", + "after": "Reject", + "skySignificance": 19.91122796256937, + "affectedFluxRatio": 0.7445523676711074, + "affectedFluxDeviation": 8.51492107762975, + "alignmentMedianPixels": 0.13331108959050958, + "visualAssessment": "Transient cloud structure corroborated by affected-aperture attenuation" + }, + { + "file": "Light_NGC 1432_30.0s_IRCUT_20260920-013817.fit", + "before": "Review", + "after": "Reject", + "skySignificance": 21.69705495844935, + "affectedFluxRatio": 0.8457382705969594, + "affectedFluxDeviation": 5.14205764676802, + "alignmentMedianPixels": 0.16633085057987979, + "visualAssessment": "Transient cloud structure corroborated by affected-aperture attenuation" + }, + { + "file": "Light_NGC 1432_30.0s_IRCUT_20260920-023920.fit", + "before": "Review", + "after": "Reject", + "skySignificance": 13.414930894720293, + "affectedFluxRatio": 0.867893857149813, + "affectedFluxDeviation": 4.403538095006232, + "alignmentMedianPixels": 0.1296821468757567, + "visualAssessment": "Transient cloud structure corroborated by affected-aperture attenuation" + }, + { + "file": "Light_IC 1805_30.0s_LP_20260826-012414.fit", + "before": "Review", + "after": "Reject", + "skySignificance": 9.482428788618922, + "affectedFluxRatio": 0.7321572057985136, + "affectedFluxDeviation": 7.7859449008662605, + "alignmentMedianPixels": 0.34200350430379745, + "visualAssessment": "Transient cloud structure corroborated by affected-aperture attenuation" + } + ], + "ownerExamples": { + "passes": 9, + "total": 9 + }, + "previouslyScreenedExamples": { + "passes": 40, + "total": 40, + "independent": false + }, + "newKeeps": 0, + "keepToReject": 0, + "rejectToKeep": 0, + "sourceFingerprints": 1509, + "limitation": "Assistant inspection of all differences; no independently owner-labeled full session or controlled stack comparison.", + "checks": { + "engine": 77, + "updater": 23, + "mockedPublisher": 10 + }, + "additionalExperiments": { + "productionRulesAdded": false, + "spatial": { + "frames": 1509, + "cellScales": [ + 1, + 3, + 7 + ], + "newKeepCloudCandidates": 0, + "ngc1432SkyReviewCandidates": [ + 15, + 14, + 11 + ], + "ic1805SkyReviewCandidates": [ + 2, + 2, + 1 + ], + "ic1805ExistingRejectSkyCandidatesLostAtLargestScale": 2, + "decision": "Retain existing connected-cell evidence; smoothing did not establish additional safe verdict improvements." + }, + "directional": { + "frames": 104, + "coherenceMedian": { + "ngc1432Review": 0.987, + "ngc1432Keep": 0.874, + "ngc7000Review": 0.963, + "ngc7000Keep": 0.653, + "ic1805Keep": 0.93 + }, + "decision": "Retain morphology review and matched-star corroboration; high coherence also exists in normal controls and trail acceptance labels are unavailable." + } + } +} diff --git a/docs/release-notes/1.0.2.md b/docs/release-notes/1.0.2.md new file mode 100644 index 0000000..d0b59ed --- /dev/null +++ b/docs/release-notes/1.0.2.md @@ -0,0 +1,9 @@ +AstroFrame 1.0.2 fixes the spatial preview overlay. + +- Pink now highlights positive sky structure relative to the clean session reference, rather than both brighter and darker differences. +- A cloud-resistant background fit removes offset and gradient without creating false highlights in clear corners. +- Strong and moderately bright cloud patches remain visible; weak background residuals are excluded. +- A legend explains the pink fill and the regional stellar-flux grid. +- Existing projects reconstruct the corrected display from cached measurements without requiring a full reanalysis. Classification metrics, decisions, notes and source images are preserved. + +Verified on the reported NGC 1432 exposures ending in 235115, 235146 and 235248, with regressions for visible cloud cores, dark comparison regions and read-only project reconstruction. diff --git a/docs/release-notes/1.1.0.md b/docs/release-notes/1.1.0.md new file mode 100644 index 0000000..f83412d --- /dev/null +++ b/docs/release-notes/1.1.0.md @@ -0,0 +1,9 @@ +# AstroFrame 1.1.0 + +- Processing uses more available RAM and CPU capacity. Fixed memory caps have been replaced with a physical-RAM budget and atomic reservations for concurrent frames, retaining headroom for the operating system and other applications. Processing pauses under RAM pressure and preserves completed work if pressure persists. +- Scroll over a preview to zoom around the cursor and drag with the left mouse button to pan. Zoom and position carry across frames and the nearby comparison. **Reset view** fits and centers both previews. Overlays follow the transformed image. +- Ordinary launches begin with a fresh, empty session. Saved projects and decisions remain on disk; explicit project opening and update restarts still restore the requested project. +- **Settings · Update available** turns cerulean blue when an update is available. +- The native startup background matches the application's charcoal grey. + +Validation covers engine/resource policy, updater safety, mocked publication, routed mouse events, preview resets and frame switching, rendered layouts at normal and minimum size including 144 DPI, and Windows native window behavior. A 48-frame measurement benchmark on a 16-thread machine improved from 2.93 seconds with four workers to 1.32 seconds with fourteen workers, with identical star counts; this is not a whole-project speed guarantee. Development verification uses workspace fixtures and a fake updater, leaving installed copies untouched. diff --git a/docs/release-notes/1.1.1.md b/docs/release-notes/1.1.1.md new file mode 100644 index 0000000..ce3a93c --- /dev/null +++ b/docs/release-notes/1.1.1.md @@ -0,0 +1,12 @@ +# AstroFrame 1.1.1 + +Improves conservative cloud rejection without promoting uncertain exposures to Keep. + +- Verifies stellar alignment using positional residuals and distributed tight matches, so severe cloud cover does not automatically defeat rejection by hiding reference stars. +- Corroborates broad cloud structure with brightness loss measured at the same stars in the affected area, using nearby references and photometry uncertainty. +- Cross-checks elongation against matched reference stars; measurable or uncertain shape changes continue to require Review. +- Preserves human decisions when reanalysis refreshes the new measurements. + +In the supplied 490-frame NGC 1432 session, Review decreases from 55 to 32 and 23 visibly clouded exposures become Reject. All previous Keeps and Rejects remain unchanged. NGC 7000's 147-frame nebula session is unchanged; IC 1805 changes one cloud-contaminated Review to Reject while preserving every Keep. A second 563-frame NGC 1432 night is unchanged. Every changed decision was inspected; these results support the tested improvement rather than a guarantee for every future dataset. + +Engine, updater and release automation checks pass on the versioned source. Old automatic measurements require reanalysis; manual labels are retained. Windows and Linux update channels are included. diff --git a/docs/release-notes/1.1.2.md b/docs/release-notes/1.1.2.md new file mode 100644 index 0000000..6b1fb31 --- /dev/null +++ b/docs/release-notes/1.1.2.md @@ -0,0 +1,9 @@ +# AstroFrame 1.1.2 + +- Show live process memory usage in the bottom status bar during analysis and export, and hide it when processing ends. +- Give the processing progress bar a contrasting blue fill and a slightly thicker track. +- Use muted green, gold and rose colors in the quality graph to match the rest of the interface. +- Apply the spatial overlay to both selected and nearby frames when comparing, including after switching frames or reopening comparison. +- Add **Inspect elongation** beside **Reset view**. Enlarge strong source stars without smoothing, highlight their fitted ellipse and major/minor axes, and show crop ellipticity alongside the frame measurements. Shape guides can be hidden. A suitable aligned KEEP exposure supplies matching comparison stars; selected stars remain available when no comparison exists. + +Validation: 87 engine checks, 23 updater checks, 10 mocked publisher checks, and isolated Windows desktop interaction/rendering checks at 96 and 144 DPI. Source reads, star matching, rotated elongation, missing comparisons, cancellation and changed-source refusal are covered. Development verification uses copied workspace caches and leaves the installed application untouched. The server release workflow builds Windows and Linux packages and checks the packaged Linux settings page. diff --git a/docs/release-notes/1.1.3.md b/docs/release-notes/1.1.3.md new file mode 100644 index 0000000..c6706bb --- /dev/null +++ b/docs/release-notes/1.1.3.md @@ -0,0 +1,10 @@ +# AstroFrame 1.1.3 + +- Rework **Nebula view** to reveal faint diffuse structure and thin filaments. Suppress small stars and noise at the existing preview resolution, then apply a background-aware stretch. NGC 6960's Veil filaments are now visible in the tested single exposures. +- Add **Asinh view**, an alternative adjustable stretch with softer highlights. +- Add **Color nebula** from recognized FITS Bayer channels. Neutralize the sky, smooth uncertain color and preserve neutral bright highlights. Monochrome and unknown Bayer layouts display the grayscale nebula preview instead of fabricated color. +- Apply every viewing mode to both comparison panes while preserving shared zoom and pan. Linear color previews are cached on demand without invalidating quality measurements. + +These are display-only changes. Original FITS files, analysis, classifications and manual decisions are unaffected. Single exposures can remain noisy; color is a viewing aid rather than calibrated astrophotography. + +Validation: 135 engine, 23 updater, 10 mocked publisher and 63 isolated Windows interaction checks, with rendering at 96 and 144 DPI. Covers faint-filament visibility, stretch brightness, Bayer patterns and offsets, color/cache integrity, monochrome fallback, rapid navigation, cancellation and source-file preservation. Visually inspected 18 real exposures across NGC 6960, NGC 7000, IC 1805, NGC 281, M33 and NGC 1432. Verification uses copied workspace caches and leaves the installed application untouched. The server workflow builds Windows and Linux packages and checks the packaged Linux settings page. diff --git a/docs/release-notes/1.1.4.md b/docs/release-notes/1.1.4.md new file mode 100644 index 0000000..deac44b --- /dev/null +++ b/docs/release-notes/1.1.4.md @@ -0,0 +1,9 @@ +# AstroFrame 1.1.4 + +- Keep the preview dropdown with just **Frame view** and **Denoised**. Remove Nebula view, Asinh view and Color nebula. +- Add the approved patch-based denoising alternative. Keep the stretch parameters derived from the original thumbnail so residual noise is not amplified into blotches. The denoised preview is slightly brighter by default and still supports the Preview stretch slider. +- Apply the selected mode to both comparison panes, preserving zoom, pan and overlays. Compute denoising in the background only when requested, reuse it for brightness changes, and cancel obsolete work when switching exposures. + +Frame view's rendering and existing linear caches are unchanged. Display processing never changes original FITS files, quality measurements, classifications or manual decisions. + +Validation: 95 engine, 23 updater, 10 mocked publisher and 65 isolated Windows interaction checks, with rendering at 96 and 144 DPI. Covers noise reduction, retained stretch parameters, stars and diffuse signal, constant fields, reflected borders, input preservation and cancellation. Across 11 exposures from all seven sample targets, the production renderer matches the approved samples within one gray level out of 255; Frame outputs match their previous pixels exactly. Verification uses workspace fixtures and leaves the installed app untouched. The server workflow builds Windows and Linux packages and checks the packaged Linux settings page. diff --git a/docs/release-notes/1.1.5.md b/docs/release-notes/1.1.5.md new file mode 100644 index 0000000..4b20039 --- /dev/null +++ b/docs/release-notes/1.1.5.md @@ -0,0 +1,9 @@ +# AstroFrame 1.1.5 + +- Choose what **Compare** shows: **Nearby frame**, the exposure closest in capture time, or **Best frame**, the strongest kept exposure in the selected exposure's session. The dropdown appears next to Compare while comparison is on. +- Best frame picks the highest quality score among kept, measured exposures, then the sharpest stars (lowest FWHM), then the strongest stellar flux. If the selected exposure is itself the best, the next best is shown. The pane caption reads **Best**, and its tooltip lists the score and FWHM. +- Nearby frame is the default, and each launch starts on Nearby. Overlay, Denoised, stretch, zoom and pan apply to both choices. + +Comparison choice is display-only: it never changes measurements, classifications or manual decisions. + +Validation: 95 engine, 23 updater, 10 mocked publisher and 77 isolated Windows interaction checks (including 11 new comparison checks), with rendering at 96 and 144 DPI on a copied workspace fixture. Verification leaves the installed app untouched. The server workflow builds Windows and Linux packages and checks the packaged Linux settings page. diff --git a/docs/release-notes/1.1.6.md b/docs/release-notes/1.1.6.md new file mode 100644 index 0000000..9b0c8cc --- /dev/null +++ b/docs/release-notes/1.1.6.md @@ -0,0 +1,11 @@ +# AstroFrame 1.1.6 + +Resolves more thin-cloud exposures automatically instead of leaving them for manual review. + +- Adds a thin-cloud texture measurement. Each aligned sky map has smooth curvature removed, neighboring cells averaged, and the result compared with the scatter of clear reference exposures. Faint cloud bands that previously fell below the sky-structure threshold now stand out clearly. +- Corroborates that texture with the stars beneath it. Forced photometry inside the texture is compared with clear parts of the same exposure and then with the same apertures in nearby clear frames. Global transparency, seeing and airmass changes cancel out; a sky gradient alone does not dim stars and cannot trigger rejection. +- An exposure already flagged for Review becomes Reject only when both measurements agree. The new route never rejects an exposure that would otherwise be Keep, and it adds no new Review triggers. Decision evidence explains the texture coverage and the measured dimming. + +In the supplied 1,053-frame NGC 1432 project, Review decreases from 48 to 36 and Reject increases from 100 to 112. All 12 changed exposures show visible cloud bands. Every Keep is unchanged. Replays of eleven other saved projects (about 5,000 exposures, including the M31 sessions with manual decisions) changed 15 more Review exposures to Reject. All were inspected: cloud passages, plus one dawn-twilight exposure next to frames the existing rules already reject. No Keep and no manually labeled exposure changed. The remaining NGC 1432 Reviews are mostly stellar-elongation flags, which this release does not change. + +Analysis time and memory use are essentially unchanged. Old automatic measurements require reanalysis; manual decisions are retained. Engine (100) and updater (23) checks pass on the versioned source. Windows and Linux update channels are included. diff --git a/docs/release-notes/1.1.7.md b/docs/release-notes/1.1.7.md new file mode 100644 index 0000000..2f04ae2 --- /dev/null +++ b/docs/release-notes/1.1.7.md @@ -0,0 +1,10 @@ +# AstroFrame 1.1.7 + +Resolves the remaining moderately clouded exposures and trailed-star exposures automatically, so very few frames are left for manual review. + +- **Moderate thin cloud.** An exposure the sky-structure detector already flags becomes Reject when strong cloud texture is backed by two independent, moderate signs of dimming: stars inside the texture are fainter than stars in clear parts of the same exposure, and the excess-sky apertures are fainter than in nearby frames. A light flash or other sky-only artifact that dims no stars still stays Review. +- **Confirmed star elongation.** Elongation is now rejected when the same matched reference stars confirm it well beyond measurement uncertainty. This follows common stacking practice: Siril's Seestar preprocessing script discards roundness outliers (`-filter-round=2.5k`), and PixInsight users commonly treat eccentricity above 0.6 as unusable. On both supplied NGC 1432 nights, 22 of 38 confirmed frames fall below Siril's own roundness cutoff and the rest sit near it; all exceed an eccentricity-equivalent of 0.6. Elongation that is imprecise or only marginally confirmed still stays Review. + +In the supplied 1,053-frame NGC 1432 project, Review decreases from 36 (1.1.6) to 1, an exposure with a full-width light flash, and from 48 in 1.1.5. Reject increases to 147. Every Keep is unchanged. Across eleven other saved projects (about 5,000 exposures), Review decreases from 337 to 153; every change is Review to Reject, and no Keep changed. Changed frames were checked against previews and matched star crops. Most of the remaining Reviews in one M33 session are high-background (twilight or moonlit) exposures, which this release does not change. + +Analysis time and memory use are unchanged. Old automatic measurements require reanalysis; manual decisions are retained. Engine (102) and updater (23) checks pass on the versioned source. Windows and Linux update channels are included. diff --git a/docs/releases.md b/docs/releases.md index 276966f..5fe30f7 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -2,7 +2,7 @@ ## First release -Version **1.0.0** targets x64 Windows and Linux desktops. Windows uses a per-user Velopack installer. Linux uses one self-contained AppImage plus an optional per-user application-menu installer; the same binary targets both Debian and Arch. No Git client, Python, .NET runtime installation or administrator access is required to install AstroFrame itself. +The first published version, **1.0.1**, targets x64 Windows and Linux desktops. Download it from [the release page](https://git.elijahkuntz.com/Elijah/AstroFrame/releases/tag/v1.0.1). Windows uses a per-user Velopack installer. Linux uses one self-contained AppImage plus an optional per-user application-menu installer; the same binary targets both Debian and Arch. No Git client, Python, .NET runtime installation or administrator access is required to install AstroFrame itself. ### Windows @@ -40,6 +40,8 @@ To uninstall a script-installed Linux copy, close AstroFrame and remove only `~/ ## Settings and updates +Version **1.0.2** corrects the spatial preview overlay. Pink shows the strongest positive sky structure against the clean session reference; the display fit resists bright cloud contamination, and weak background residuals are suppressed. Both bright and moderately bright cloud patches remain visible. The grid shows regional stellar flux. This is supporting evidence rather than an exact cloud boundary. Existing saved projects reconstruct the display from cached catalogs without changing classification metrics or human decisions. See [1.0.2 release notes](release-notes/1.0.2.md). + Open **Settings → Updates** for the installed version, update status, last successful check, automatic-check preference, and **Check for updates**. The sidebar and independent settings store leave room for future categories. Installed packages check on launch and every six hours while running. A persistent **Settings · Update available** indicator appears when a newer stable version is found. **Install update and restart** downloads the update, validates its package checksum, saves the project and restarts. Analysis, export and saving block installation; if work starts during download, the package remains ready for a later restart. Projects and settings survive updates. Failed checks display an error rather than claiming the app is up to date. Source-tree builds explain that installing a package enables updates. @@ -59,15 +61,15 @@ Once this workflow is committed and pushed, enable Actions for the AstroFrame re To release a new version: ```powershell -./packaging/Set-Version.ps1 -Version 1.0.1 +./packaging/Set-Version.ps1 -Version 1.0.3 git add Directory.Build.props -git commit -m "Release 1.0.1" +git commit -m "Release 1.0.3" git push origin main -git tag v1.0.1 -git push origin v1.0.1 +git tag v1.0.3 +git push origin v1.0.3 ``` -Include all intended source changes in the release commit before tagging. The pushed tag is the publication trigger; ordinary commits to `main` run the build and checks without publishing. The version in `Directory.Build.props` must exactly match the tag. For the first release, use `v1.0.0` after pushing this workflow and the finalized source. +Include all intended source changes in the release commit before tagging. The pushed tag is the publication trigger; ordinary commits to `main` run the build and checks without publishing. The version in `Directory.Build.props` must exactly match the tag. Version `v1.0.1` is published; `v1.0.0` remains an unpublished tag from the first failed publishing attempt. Choose a new version for each later release. The job runs the engine, updater and release-publisher validation suites, builds both packages, renders the Linux settings page under Xvfb, then uploads everything into one draft release. Only after all uploads succeed does it make the release public, so users cannot discover an incomplete update. No local installer build or manual asset attachment is needed. @@ -89,14 +91,14 @@ The Windows script cross-packages both platforms. Results appear in `artifacts/r On Linux with a .NET 10 SDK: ```sh -bash packaging/release.sh 1.0.0 +bash packaging/release.sh 1.0.2 ``` That script builds the Linux channel. The tool manifest pins Velopack CLI 1.2.161, matching the application's SDK dependency. Building on Windows is enough to create both packages, but compatibility should still be checked on target Linux desktops. ## Publish to the repository -Commit and push the versioned source first. The initial release has **not** been uploaded by this implementation. To make update discovery live, create a public stable release tagged `v1.0.0` and attach the files described below. +Commit and push the versioned source first. Version `v1.0.1` was built and published automatically by the server. The following local publisher is an alternative to the tag workflow for future versions. The helper script reads a repository-write token from `ASTROFRAME_RELEASE_TOKEN` in the process environment. On the server this is supplied automatically by the workflow. For local publication, set your own Gitea/Forgejo repository-write token. The script uploads both platforms into one draft, including the Linux installation helpers. It does not store the token or embed it in the application: @@ -119,6 +121,14 @@ For later releases, use the automatic tag workflow above, or validate/build/publ ## Verification +For preview and processing-status changes, build the source and run the isolated Windows diagnostic against a saved project analyzed by the current engine. The FITS sources must still be available. The helper copies its metadata and caches into a fresh workspace folder before exercising controls or saving test decisions: + +```powershell +./tools/Verify-Preview.ps1 -FixtureProject 'path/to/saved-project' -Output artifacts/preview-verification +``` + +This checks comparison overlays, zoom/pan, Frame and Denoised in both panes, on-demand denoising, rapid frame/mode changes, monochrome sources, processing-memory visibility, elongation crops and guide toggling, absent comparisons, loading cancellation, and native window controls. It renders normal and minimum-size controls at 96 and 144 DPI. Inspect the PNG files in the output's `qa` directory. It launches only the source build in diagnostic mode, which bypasses installed settings and updates. Source `--capture` diagnostics accept `--preview=0` (Frame) or `--preview=1` (Denoised) for real-exposure visual checks against copied workspace projects. + `./tools/Verify-ReleaseAutomation.ps1` exercises version/tag mismatch, upload failure, draft resumption, conflicting assets, immutable published releases and package integrity with a mocked release API. It never publishes a real release. `tests/AstroFrame.Updates.Validation` covers settings recovery, network failures, concurrent checks, restart safety, save failure, real package checksums, corruption rejection and downgrade prevention. An optional release-feed argument adds real-package checks: @@ -129,6 +139,6 @@ dotnet run --project tests/AstroFrame.Updates.Validation -c Release -- artifacts That test feed must contain a **1.0.1** package for the requested channel; it is not a production release. An explicit packaged-app `--verify-update --apply` probe verifies actual replacement and restart. A `--capture-settings [width] [dpi]` diagnostic captures the real settings page. -Both Windows and Linux local 1.0.0 → 1.0.1 replacement/restart were exercised during implementation. Linux rendering and per-user installation were checked under Ubuntu WSL with the missing ICU/X11 libraries extracted into a workspace test directory. Debian and Arch desktop execution have not yet been tested directly; those compatibility targets are based on the cross-platform runtime and documented system dependencies, not separate distro acceptance runs. The public repository API was verified anonymously; it currently contains no published releases. +Both Windows and Linux local 1.0.0 → 1.0.1 replacement/restart were exercised during implementation. Linux rendering and per-user installation were checked under Ubuntu WSL with the missing ICU/X11 libraries extracted into a workspace test directory. Debian and Arch desktop execution have not yet been tested directly; those compatibility targets are based on the cross-platform runtime and documented system dependencies, not separate distro acceptance runs. Server run #8 built and published version 1.0.1 with all 13 assets, passed 39 engine, 18 updater and 10 publisher checks, and rendered the packaged Linux settings page under Debian Bookworm. A packaged Linux 1.0.0 app also discovered and downloaded the public 1.0.1 update through the real Gitea source with checksum validation. References: [Velopack C# integration](https://docs.velopack.io/getting-started/csharp), [cross-packaging](https://docs.velopack.io/packaging/cross-compiling), [Linux update behavior](https://docs.velopack.io/packaging/operating-systems/linux), [Gitea distribution](https://docs.velopack.io/distributing/self-hosting), [Avalonia Linux dependencies](https://v11.docs.avaloniaui.net/docs/overview/supported-platforms/). diff --git a/packaging/Publish.ps1 b/packaging/Publish.ps1 index 6c83398..6d41223 100644 --- a/packaging/Publish.ps1 +++ b/packaging/Publish.ps1 @@ -55,7 +55,9 @@ try { $release = Invoke-RestMethod "$api/releases/tags/$tag" -Headers $headers } catch { if ([int]$_.Exception.Response.StatusCode -ne 404) { throw } } if ($release -and !$release.draft) { throw "$tag is already published. Release assets are immutable; build a new version." } if (!$release) { - $body = @{ tag_name=$tag; target_commitish=$commit; name="AstroFrame $Version"; body="AstroFrame $Version for Windows and Linux. See the repository README for installation and update instructions."; draft=$true; prerelease=$false } | ConvertTo-Json + $notesPath = Join-Path 'docs/release-notes' "$Version.md" + $notes = if (Test-Path -LiteralPath $notesPath) { Get-Content -LiteralPath $notesPath -Raw } else { "AstroFrame $Version for Windows and Linux. See the repository README for installation and update instructions." } + $body = @{ tag_name=$tag; target_commitish=$commit; name="AstroFrame $Version"; body=$notes; draft=$true; prerelease=$false } | ConvertTo-Json $release = Invoke-RestMethod "$api/releases" -Method Post -Headers $headers -ContentType 'application/json' -Body $body } $attached = @(Invoke-RestMethod "$api/releases/$($release.id)/assets" -Headers $headers) diff --git a/src/AstroFrame.Desktop/AstroFrame.Desktop.csproj b/src/AstroFrame.Desktop/AstroFrame.Desktop.csproj index c54e997..f549a63 100644 --- a/src/AstroFrame.Desktop/AstroFrame.Desktop.csproj +++ b/src/AstroFrame.Desktop/AstroFrame.Desktop.csproj @@ -1,4 +1,4 @@ - + WinExe @@ -10,7 +10,6 @@ - diff --git a/src/AstroFrame.Desktop/DesktopState.cs b/src/AstroFrame.Desktop/DesktopState.cs deleted file mode 100644 index e5bca1c..0000000 --- a/src/AstroFrame.Desktop/DesktopState.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Text.Json; - -namespace AstroFrame.Desktop; - -internal static class DesktopState -{ - static string PathName=>System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),"AstroFrame","desktop.json"); - public static void Remember(string projectDirectory) - { - if(Program.Arguments.Any(a=>a.StartsWith("--capture",StringComparison.Ordinal)||a=="--smoke"))return; - try - { - Directory.CreateDirectory(System.IO.Path.GetDirectoryName(PathName)!); - File.WriteAllText(PathName+".tmp",JsonSerializer.Serialize(new Dictionary{{"LastProject",projectDirectory}}));File.Move(PathName+".tmp",PathName,true); - } - catch(IOException){}catch(UnauthorizedAccessException){} - } - public static string? LastProject() - { - try - { - if(!File.Exists(PathName)||new FileInfo(PathName).Length>4096)return null; - var state=JsonSerializer.Deserialize>(File.ReadAllText(PathName)); - string? directory=state?.GetValueOrDefault("LastProject");return directory!=null&&File.Exists(System.IO.Path.Combine(directory,"project.json"))?directory:null; - } - catch(IOException){return null;}catch(JsonException){return null;}catch(UnauthorizedAccessException){return null;} - } -} diff --git a/src/AstroFrame.Desktop/DiagnosticUpdateBackend.cs b/src/AstroFrame.Desktop/DiagnosticUpdateBackend.cs new file mode 100644 index 0000000..095b3d1 --- /dev/null +++ b/src/AstroFrame.Desktop/DiagnosticUpdateBackend.cs @@ -0,0 +1,11 @@ +namespace AstroFrame.Desktop; + +// Diagnostic rendering never initializes the installed update locator or reads preferences. +internal sealed class DiagnosticUpdateBackend : IUpdateBackend +{ + public bool IsInstalled=>true; + public string InstalledVersion=>typeof(MainWindow).Assembly.GetName().Version?.ToString(3)??"1.1.0"; + public Task Check()=>Task.FromResult("9.0.0"); + public Task Download(Action progress,CancellationToken cancellation)=>throw new InvalidOperationException("Rendering diagnostics cannot download updates."); + public void ApplyAndRestart(string[] arguments)=>throw new InvalidOperationException("Rendering diagnostics cannot install updates."); +} diff --git a/src/AstroFrame.Desktop/MainWindow.Updates.cs b/src/AstroFrame.Desktop/MainWindow.Updates.cs index e04dfa9..5aab934 100644 --- a/src/AstroFrame.Desktop/MainWindow.Updates.cs +++ b/src/AstroFrame.Desktop/MainWindow.Updates.cs @@ -1,25 +1,30 @@ using Avalonia.Controls; using Avalonia.Threading; using Avalonia.Controls.ApplicationLifetimes; +using Avalonia; +using Avalonia.Styling; +using Avalonia.Controls.Presenters; namespace AstroFrame.Desktop; public sealed partial class MainWindow { - readonly AppUpdates updates = new(); + readonly AppUpdates updates = Program.Diagnostic ? new(new DiagnosticUpdateBackend(),new AppSettings(),_=>{}) : new(); readonly Button settingsButton = Button("Settings"); readonly DispatcherTimer updateTimer = new() { Interval = TimeSpan.FromHours(6) }; SettingsWindow? settingsWindow; void InitializeUpdates() { + Styles.Add(new Style(x=>x.OfType