Skip to content

feat(multitask)!: read derived pipeline state from task.run_state#190

Merged
bartzbeielstein merged 2 commits into
developfrom
feat/runstate-phase-b
Jun 6, 2026
Merged

feat(multitask)!: read derived pipeline state from task.run_state#190
bartzbeielstein merged 2 commits into
developfrom
feat/runstate-phase-b

Conversation

@bartzbeielstein
Copy link
Copy Markdown
Collaborator

Summary

Phase B of ADR adr-multitask-configmulti-merge (accepted 2026-06-06; Phase A = spotforecast2-safe #332, merged): this repo consumes the derived pipeline state from the task-owned RunState instead of the config.

  • PlottingMixin and BaseTask._aggregate_and_show read the resolved target list from task.run_state.targets (config.targets always holds the user input verbatim; the pre-pipeline default in task_entsoe.py stays)
  • plots/plotter.py plot_with_outliers gains an explicit targets parameter (typed Optional[list[str]]); the config.targets fallback remains for one cycle for legacy standalone callers
  • 21 test files migrated off setattr-ing derived window fields onto configs (the Phase A review blind spot, applied proactively here) — tests set/assert run_state.*
  • New tests cover the explicit-targets path and the exact kwarg forwarding PlottingMixin → plot_with_outliers

⚠️ Draft — CI red by design until the safe 18.0.0 pin bump

pyproject.toml still pins spotforecast2-safe>=16.3.0,<17 (PyPI), which has no RunState. The pin/lock bump to >=18,<19 is a deliberate follow-up commit once safe 18.0.0 is released (develop→main promotion in spotforecast2-safe). Authoritative verification ran against the editable local safe (Phase A merge):

  • Full suite: 1159 passed (3:22)
  • Consumer-contract gate (protected lecture qmd): 4/4 passed
  • ruff / black / isort clean; REUSE 3.3 compliant (175/175)

Review

Implemented and reviewed via the python-dev agent pipeline; review verdict (1 important: explicit-targets test coverage; 2 nits: Optional[list[str]] annotation, import-block recombine) fully addressed in this commit. Findings recorded in the spot-knowledge KB.

BREAKING CHANGE

spotforecast2 no longer reads start_download, end_download, data_start, data_end, cov_start, cov_end, end_train_ts, start_train_ts, or the resolved target list from the config — use task.run_state. Semantic-release → sf2 5.0.0.

🤖 Generated with Claude Code

bartzbeielstein and others added 2 commits June 6, 2026 22:31
Phase B of ADR adr-multitask-configmulti-merge (accepted 2026-06-06):
PlottingMixin and plot helpers consume the resolved target list from
task.run_state instead of the config; test fixtures no longer setattr
derived window fields onto configs. Requires spotforecast2-safe >= 18
(RunState); the dependency pin bump follows as a separate commit once
18.0.0 is released.

BREAKING CHANGE: spotforecast2 no longer reads start_download,
end_download, data_start, data_end, cov_start, cov_end, end_train_ts,
start_train_ts, or the resolved target list from the config; use
task.run_state. config.targets always holds the user input.

NOTE: CI stays red against PyPI spotforecast2-safe < 18; green requires
the 18.0.0 pin bump follow-up.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
spotforecast2-safe 18.0.0 (RunState extraction, ADR
adr-multitask-configmulti-merge Phase A) is released on PyPI; this
branch's run_state reads now resolve against the published package.
Full suite (1159 passed), consumer-contract gate (4/4), and ruff are
green against the PyPI build — no editable override involved.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@bartzbeielstein bartzbeielstein marked this pull request as ready for review June 6, 2026 20:53
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@bartzbeielstein bartzbeielstein merged commit 57905c4 into develop Jun 6, 2026
9 checks passed
@bartzbeielstein
Copy link
Copy Markdown
Collaborator Author

🎉 This PR is included in version 5.0.0-rc.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@bartzbeielstein
Copy link
Copy Markdown
Collaborator Author

🎉 This PR is included in version 5.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@bartzbeielstein bartzbeielstein deleted the feat/runstate-phase-b branch June 7, 2026 13:35
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.

1 participant