# Validation records

## 0.5.0-dev — GitHub API update checker

All ten CTest groups passed locally in Debug and Release. The new offline group
checks semantic version precedence, stable-release decisions, draft/prerelease
rejection, missing releases, rate limits, malformed/oversized JSON, safe note
output and a single injected fetch. CLI checks reject extra arguments before any
network call. Existing climate-analysis and Ontario export checks still pass.

Live Windows HTTPS checks reached the public GitHub Releases API without a token:
HTTP 404 was handled before publication, then the published v0.4.0 response was
parsed successfully. The installed 0.5.0-dev correctly reported being newer than
v0.4.0 and displayed its release notes and project download-page link. No asset
files were downloaded or installed. Other network failures are covered through
injected responses/exceptions rather than by disrupting the local connection.

## 0.4.0 release preparation

Both Debug and Release builds passed all nine CTest groups. The Ontario helper
was exercised against synthetic fixtures. The committed Ontario example passed
`python tools/verify_ontario_example.py`: 398 centres, 30 annual means per centre,
independent OLS slopes, map markers, boundary checksum and report links.

The example preserves its original 0.4.0-dev generation metadata. The original
NetCDF downloads are no longer available in the current local folders, so the
release preparation validates the saved exports rather than claiming a new
end-to-end NASA extraction. Historical validation below records the original run.

## 0.4.0-dev — Regional reader through Ontario selection

On 2026-11-21, all nine CTest groups passed in Debug and Release on Windows/MSVC.
The seven previous groups remain enabled. Added groups:

- `regional_reader_boundary_and_trends`: six-cell packed NetCDF fixture, fill and
  missing markers, raw valid range, timestamps, exact bounds, empty and invalid
  bounds, descending latitude, normalized and noncontiguous longitude selections,
  duplicate coordinates/months, changing grids, date windows, known per-cell slopes,
  incomplete years, insufficient cells, GeoJSON/CSV output, polygon holes/edges/
  islands, invalid polygons, named features, and actual Ontario location checks.
- `regional_cli`: bounding-box and Ontario runs, equality with point analysis,
  coverage gaps, null insufficient trends, boundary provenance copying, malformed
  files, invalid/repeated options, date windows, and output preservation.

A local real-data run used the user's existing 360 MERRA-2 monthly files for
1995-01 through 2024-12 and the bundled pinned Ontario boundary. It selected 398
grid-cell centres. All 398 had 360 valid monthly records and 30 complete years.
Python's independent `statistics.linear_regression` reproduced each cell's slope
from the exported annual means within 1e-10 C/decade. Three sampled cells also
matched the single-location CLI's slope, approximate interval and p-value. The
last comparison checks consistency; it is not independent validation of HAC inference.

The earlier Toronto example centre (43.5, -79.375) is outside the supplied boundary
geometry and is therefore excluded. The nearest selected centre to the requested
Toronto coordinates is (44, -79.375). This illustrates why boundary-selected cells
and nearest-point extraction are different spatial queries.

Static SVG and offline HTML exports are tested for one marker per selected cell,
warming/cooling/zero colours, interval and insufficient-data markers, singleton
bounds, polygon hole paths, escaped attribution and export links. The real 398-cell
Ontario map was rendered to PNG and visually inspected for layout and legibility.
This visual QA is not independent verification of the projection.

No province-wide average, causal attribution or multiple-testing correction was
validated or implemented in this milestone. See [regional methods](REGIONAL.md).

## 0.3.0 development milestone

Verified locally on Windows x64 with MSVC 19.44.35230, CMake 4.4.4, NetCDF 4.9.3,
and Boost Math 1.92.0. Both Debug and Release builds completed successfully.

## Automated verification

All seven CTest groups passed in both configurations:

1. `cli_errors`: expected errors and exit codes for invalid input.
2. `create_netcdf_fixture`: a real NetCDF-4 fixture generated by the library.
3. `read_netcdf_fixture`: successful location/temperature/time extraction.
4. `timestamp_conversion`: boundaries, leap years, invalid formats, and overflow.
5. `annual_and_trend_calculations`: coverage, weights, duplicates, fixed-grid
   checks, known slopes, constant data, output escaping, and reference statistics.
6. `create_series_fixture`: synthetic multi-file and malformed-data fixtures.
7. `series_csv_and_trend`: full CLI pipeline, missing months/values, valid-range
   rejection, packed temperatures, date windows, wrong shapes/units, duplicates,
   changing grids, and preservation of existing outputs.

For the independent 12-year noisy reference, the implementation matched:

| Quantity | Reference |
|---|---:|
| Slope (C/year) | 0.8426573426573427 |
| HAC slope SE (C/year) | 0.05174655941608503 |
| 95% lower (C/year) | 0.7273588231657477 |
| 95% upper (C/year) | 0.9579558621489377 |
| Approximate p-value | 1.583822667537093e-8 |
| R squared | 0.9045898422290405 |

A second exact-rational reference checks that HAC lagging respects calendar-year
gaps. These comparisons validate calculations, not the assumptions of any real
climate case study. See `tools/reference_stats.py` and `docs/METHODS.md`.

## Real sample

The user's existing `MERRA2_200.tavgM_2d_slv_Nx.199501.nc4` was read successfully:

- Requested coordinate: 43.65, -79.38.
- Selected grid coordinate: 43.5, -79.375.
- Printed temperature: 271.409 K / -1.7414 C.
- Decoded record timestamp: 1995-01-01T00:30:00.
- Analysis report: 1 observed month, 0 complete years, `insufficient_data`.

No observed long-term trend is claimed from this single sample.

## Demonstration and delivery

The demo generated 180 synthetic monthly records over 2000–2014. The analysis
recovered the deliberately constructed 1 C/decade slope and exported CSV, JSON,
HTML, and SVG outputs. The example HTML was rendered in headless Chrome and
visually inspected. Synthetic example source paths were made relative for sharing.

The GitHub workflow was updated to run these tests in Debug and Release. It has
not been pushed or run on GitHub as part of this local update. Local changes are
on `feature/trend-analysis`; the original pre-update source was backed up separately.


## Interactive explorer (0.5.0 development)

The explorer packages the existing Ontario exports without recomputing climate
statistics. Python tests compare all embedded annual means, slopes, intervals,
metadata, boundary and checksums with a freshly packaged copy of the committed
source exports. Additional tests reject duplicate annual rows, mismatched
coordinates, nonfinite values and invalid completeness; missing years remain null.
Node tests cover fixed colour domains, null/zero handling, all 11,940 annual
values, the 336 intervals containing zero and nearest selected-centre search.
Vendored map assets are checked against their committed SHA-256 manifest.

The original source run remains labelled 0.4.0-dev. No raw-data extraction or new
HAC validation is claimed by the browser layer.

Browser QA exercised temperature playback and pause, year scrubbing, trend and
coverage layers, place search and invalid coordinates, point selection/tooltips,
opacity/boundary/label controls, fullscreen with timeline access, responsive
phone/desktop layouts and a downloaded 30-row annual CSV. The local HTTP preview
reported no browser errors. Direct file-URL automation was unavailable in the
preview browser; the packaged application uses classic local scripts with no
fetch calls or remote runtime dependencies so it can be opened locally.


## Publication security review (2026-11-29)

See `docs/SECURITY_REVIEW.md` for the mapped screenshot risks, research sources,
review boundaries and residual host checks. Local tests cover publication scope,
hashes/integrity, CSP, unsafe markup/URLs, prototype keys, HTTP methods and selected
sensitive paths. Browser checks exercised inert search/query payloads, permitted
same-origin scripts, blocked inline scripts, and independently blocked framing.
The map, playback and case-study charts worked with enforced publication policies.
No production deployment or exhaustive vulnerability certification is claimed.
