Skip to content

[429] Fix validation of subsequent event records - #431

Draft
ANAMASGARD wants to merge 1 commit into
PecanProject:masterfrom
ANAMASGARD:429-fix-event-record-validation
Draft

ANAMASGARD wants to merge 1 commit into
PecanProject:masterfrom
ANAMASGARD:429-fix-event-record-validation

Conversation

@ANAMASGARD

@ANAMASGARD ANAMASGARD commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • What: Validate every event record and reset daily planting/harvest flags before leaf-event early returns.
  • Motivation: Reject conflicting inputs while preserving valid day/year transitions.

Adds 51 reader regression cases covering phenology conflicts, event ordering, date transitions, malformed input, and validation state between files.

How was this change tested?

make cleanall
make -j4
make test
make testrun

  • Passed: 29 unit-test executables, 51 reader cases, and 36 CLI cases.
  • Four active smoke scenarios passed; one existing scenario remains disabled.
  • Clang 19 formatting, clang-tidy, and git diff --check passed.
  • Smoke reference outputs are unchanged.

Reproduction steps

Run the reproductions in #429. Incompatible leaf events now exit 3, same-day planting/harvest exits 5, and valid day-transition sequences succeed.

Related issues

Checklist

  • Related approved issue linked.
  • PR title includes the issue number.
  • Regression tests added and registered.
  • Documentation updated where applicable.
  • docs/CHANGELOG.md updated.
  • Code formatted with Clang 19.

Validate each newly created event instead of repeatedly checking the list
head. Reset daily planting and harvest flags before leaf-event handling
returns so that valid events on a new date are not rejected.

Add 51 reader regression cases covering calculated phenology, same-day
conflicts, date transitions, input errors, and validation state across files.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Event checks ignore every events.in record after the first

1 participant