Skip to content

ND scans: rebased on main, with finalization-crash and pipe_planner fixes - #930

Open
alongd wants to merge 5 commits into
mainfrom
nd_scans_rebased
Open

alongd wants to merge 5 commits into
mainfrom
nd_scans_rebased

Conversation

@alongd

@alongd alongd commented Jul 28, 2026

Copy link
Copy Markdown
Member

Summary

This PR supersedes/complements #855. It is #855's four commits (Added the ND Scan module, Added directed scan to xTB job adapter, Added ND scan functionalities to plotter, Adaptations to Scheduler) rebased onto current main (263 commits of drift since #855 was opened), plus two additional fixes:

#855 should not be force-pushed or rebased in place — its branch (nd_scans) is currently checked out in a live, long-running working session with uncommitted local patches, and rewriting it there would destroy that work. This PR exists so the rebased/fixed history can be reviewed and landed without touching nd_scans.

Detailed review findings (conflict-resolution notes, two latent bugs found on main, the finalization-crash fix, and several design questions worth discussing) are posted as a comment on #855.

Closes/relates to #855.

Test plan

Comment thread arc/scheduler_test.py
@codecov

codecov Bot commented Jul 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.73%. Comparing base (828e7a6) to head (17a740a).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #930      +/-   ##
==========================================
+ Coverage   67.18%   67.73%   +0.55%     
==========================================
  Files         123      124       +1     
  Lines       43674    44537     +863     
  Branches    11153    11312     +159     
==========================================
+ Hits        29342    30169     +827     
+ Misses      11194    11153      -41     
- Partials     3138     3215      +77     
Flag Coverage Δ
functionaltests 67.73% <ø> (+0.55%) ⬆️
unittests 67.73% <ø> (+0.55%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 15 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR rebases and integrates the ND rotor-scan work (superseding #855) onto current main, adds an ESS finalization crash fix, fixes a pipe-mode initialization-order issue in Scheduler.__init__, and introduces adaptive sparse 2D scan support end-to-end (scan utilities, scheduler orchestration, plotting, and tests).

Changes:

  • Added arc/species/nd_scan.py to centralize ND scan utilities and implement adaptive sparse 2D scanning, validation, coupling metrics, and classification.
  • Updated arc/scheduler.py to use the new ND-scan utilities, fix ESS scan finalization, support adaptive batching, and fix pipe planner/coordinator initialization ordering.
  • Added sparse/adaptive 2D plotting support in arc/plotter.py, plus extensive unit/functional tests and an xTB directed-scan --opt fix.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
arc/species/nd_scan.py New ND scan utility module including adaptive sparse 2D scanning, validation, and classification helpers.
arc/species/nd_scan_test.py New unit tests covering dense/continuous/adaptive scan utilities, validation, and classification.
arc/scheduler.py Integrates ND scan module, adds adaptive scan orchestration, fixes ESS finalization crash, and adjusts pipe init ordering.
arc/scheduler_test.py Adds functional directed-scan tests (dense + adaptive) using xTB, and related helpers.
arc/plotter.py Adds sparse/adaptive 2D plotting path (interpolation + overlays) and fixes axis limit setting bugs.
arc/plotter_test.py Adds tests for sparse plotting helpers and non-crashing plot generation.
arc/job/adapters/xtb_adapter.py Ensures directed_scan jobs that are optimization scans pass --opt to xTB.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread arc/scheduler.py
Comment thread arc/plotter.py
@alongd
alongd force-pushed the nd_scans_rebased branch 3 times, most recently from 9bf5748 to b0e86c3 Compare August 17, 2026 16:55
@alongd
alongd requested a lite review from Copilot October 19, 2026 03:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved critical and moderate correctness issues remain, including plotter import failure and scan limit, filtering, and scheduler bookkeeping bugs.

3 open issues
2 resolved since last review

Review effort: Lite

Comment thread arc/plotter.py Outdated
Comment thread arc/species/nd_scan.py Outdated
Comment thread arc/species/nd_scan.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread arc/scheduler.py
Comment thread arc/species/nd_scan.py
Comment thread arc/species/nd_scan.py
Comment thread arc/species/nd_scan.py
Comment thread arc/species/nd_scan.py Outdated
Comment thread arc/scheduler_test.py
Contains pure scan-surface helpers
Scheduler.__init__ calls run_scan_jobs() from its per-species restart loop,
and run_scan_jobs dereferences self.pipe_planner via try_pipe_rotor_scans_1d().
The planner was constructed after that loop, so restarting a project with
pending 1D rotor scans raised:
    AttributeError: 'Scheduler' object has no attribute 'pipe_planner'

Construction now happens before the restart loop. Both PipeCoordinator and
PipePlanner only store references in __init__, so early construction is safe.

This is a latent bug on main (main:464/487/511 call run_scan_jobs; main:521
assigns pipe_planner); it was surfaced by the ND scan functional tests, which
are the first tests to exercise that construction path.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants