Skip to content

FIX: Handle a single target with descending input - #1078

Closed
dajiaohuang wants to merge 1 commit into
ARM-DOE:mainfrom
dajiaohuang:fix-interpolate-descending-single-target
Closed

dajiaohuang wants to merge 1 commit into
ARM-DOE:mainfrom
dajiaohuang:fix-interpolate-descending-single-target

Conversation

@dajiaohuang

Copy link
Copy Markdown

What changed

  • Set interpolation direction from the input coordinate when there is exactly one target point.
  • Added a regression test for interpolation onto one target with descending input coordinates.

Why

A single target has no ordering direction of its own. Previously the kernel defaulted to ascending order and incorrectly marked valid targets against descending input coordinates as outside range.

Issues closed

None; this was identified by source-path review and is not linked to an existing issue.

Validation

  • I ran pre-commit or ruff — not run; tool/dependency setup is unavailable and installs are outside this task's constraints.
  • I ran tests and/or added tests — regression test added, but not run. The available Python environment lacks xarray; the installed global pytest plugin also fails to import fcntl on this Windows host. No dependencies were installed.
  • Python AST syntax parsing passed for the changed implementation and test files; git diff --check passed.

AI usage & manual verification

  • AI used: yes
  • Model/tooling: Pi coding agent; exact model identifier was not available in the task runtime facts.
  • Tasks delegated to AI: source review, diagnosis, patch and regression-test authoring.
  • Manual verification performed: traced the descending-coordinate range/sign calculation and the expected interpolation bracket/value; reviewed the changed files. The project test was not executed.

@zssherman

Copy link
Copy Markdown
Collaborator

Thanks for the contribution and for disclosing the use of AI!

Could you clarify whether this PR was identified and submitted through an autonomous agent workflow or initiated and reviewed directly by you?

Also, before we consider merging, please run the relevant ACT regression tests and provide the results.

@dajiaohuang

Copy link
Copy Markdown
Author

Thanks for asking. This PR was identified, implemented, and submitted through an autonomous AI coding-agent workflow; it was not initiated or directly reviewed by the account owner. The account owner authorized the contribution workflow, and the PR's AI-use disclosure was intentional.

I ran the relevant interpolation regression test file on this PR head in an isolated Python 3.13.13 environment:

python -m pytest -o addopts= -q tests/transform/test_interpolate.py
12 passed in 3.36s

This includes test_single_target_with_descending_input_order. No real atmospheric data or external services were used. This was the focused interpolation test file, not the full ACT test suite or CI.

@zssherman

zssherman commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

At this time, we are not accepting fully autonomous AI coding agent PRs, for more on our AI policy: #1044

@zssherman zssherman closed this Oct 28, 2026
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.

2 participants