WIP: 🦺 fix(config): validate explicit grid overrides #3

Draft
mat wants to merge 6 commits from feat/s2-grid-validation into main
Owner

Context

Explicit grid overrides previously accepted NaN, infinities, zero, and negative values, with some invalid values silently falling back to a preset.

Impact

Rejects non-finite and non-positive --grid/CCO2_GRID overrides with a typed configuration error and exit code 2. Positive overrides and regional presets are unchanged.

Verification

  • go test ./... (91 tests)
  • go vet ./...
  • git diff --check

This PR is intentionally draft.

## Context Explicit grid overrides previously accepted NaN, infinities, zero, and negative values, with some invalid values silently falling back to a preset. ## Impact Rejects non-finite and non-positive `--grid`/`CCO2_GRID` overrides with a typed configuration error and exit code 2. Positive overrides and regional presets are unchanged. ## Verification - `go test ./...` (91 tests) - `go vet ./...` - `git diff --check` This PR is intentionally draft.
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/s2-grid-validation:feat/s2-grid-validation
git switch feat/s2-grid-validation

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff feat/s2-grid-validation
git switch feat/s2-grid-validation
git rebase main
git switch main
git merge --ff-only feat/s2-grid-validation
git switch feat/s2-grid-validation
git rebase main
git switch main
git merge --no-ff feat/s2-grid-validation
git switch main
git merge --squash feat/s2-grid-validation
git switch main
git merge --ff-only feat/s2-grid-validation
git switch main
git merge feat/s2-grid-validation
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mat/cco2usage!3
No description provided.