Repository navigation
Add a --dry-run flag to flexmeasures add forecasts, and stop add schedule --dry-run from saving - #2483
Conversation
The forecast is computed in full, but nothing is recorded: the CLI reports the sensor, the data source, the number of beliefs and the event range it would have saved. The flag is threaded through as a (CLI-exclusive) forecaster parameter, which the train-predict pipeline hands to the predict pipeline, where the beliefs are persisted. Combining --dry-run with --as-job is rejected: a queued job runs on a worker, where the computed forecast would be discarded unseen. For the same reason, the flag is not part of the API's forecast trigger, and automations (which exist to record their forecasts) reject it, too. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HeRZd2nDDShZTE8ZmbERzn Signed-off-by: F.N. Claessen <claessen@seita.nl>
Also test that a normal run still records beliefs, and that --dry-run is rejected in combination with --as-job. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HeRZd2nDDShZTE8ZmbERzn Signed-off-by: F.N. Claessen <claessen@seita.nl>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HeRZd2nDDShZTE8ZmbERzn Signed-off-by: F.N. Claessen <claessen@seita.nl>
The dry run does flush the forecaster's data source, because it reports which source it would have recorded under, but it never commits it, so the row disappears with the session. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HeRZd2nDDShZTE8ZmbERzn Signed-off-by: F.N. Claessen <claessen@seita.nl>
There was a problem hiding this comment.
🟡 Changes recommended
The CLI’s dry-run behavior is inconsistent when dry-run: true is supplied via --parameters, which can bypass the --as-job conflict guard and misreport whether anything was saved.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a --dry-run flag to flexmeasures add forecasts to compute forecasts fully while skipping database persistence, aligning the forecasts CLI with existing dry-run behavior in other add subcommands and keeping the API/automation paths persistence-focused.
Changes:
- Add
dry-runas a CLI-exclusive forecaster parameter and thread it through forecasting pipelines to bypasssave_to_db/commit. - Add CLI behavior to reject
--dry-runwith--as-job, and to print a detailed “would have saved…” summary plus the computedBeliefsDataFrame. - Add regression tests and changelog entries documenting the new CLI capability and constraint.
File summaries
| File | Description |
|---|---|
| flexmeasures/data/schemas/forecasting/pipeline.py | Adds dry-run schema field and includes it in resolved forecasting parameters. |
| flexmeasures/data/models/forecasting/pipelines/train_predict.py | Passes dry_run through to PredictPipeline. |
| flexmeasures/data/models/forecasting/pipelines/predict.py | Skips DB persistence/commit on dry runs and logs what would have been saved. |
| flexmeasures/data/models/forecasting/init.py | Strips dry-run from stored data source parameters via _clean_parameters. |
| flexmeasures/cli/data_add.py | Implements --dry-run UX: reject with --as-job, print summary + BDFs, and avoid “successfully created” messaging in dry runs. |
| flexmeasures/cli/tests/test_data_add_fresh_db.py | Adds tests ensuring dry runs don’t write beliefs and that --as-job + --dry-run is rejected. |
| flexmeasures/api/v3_0/sensors.py | Explicitly rejects dry_run in the API trigger schema (CLI-only behavior). |
| documentation/cli/change_log.rst | Documents new flexmeasures add forecasts --dry-run CLI behavior and --as-job incompatibility. |
| documentation/changelog.rst | Adds end-user changelog entry for the new dry-run forecasting capability. |
Review details
- Files reviewed: 9/9 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| dry_run = kwargs.get("dry_run", False) | ||
| if as_job and dry_run: | ||
| click.secho( | ||
| "The --as-job flag cannot be combined with --dry-run:" | ||
| " a queued job runs on a worker, where the forecast that a dry run computes would be discarded unseen." | ||
| " Drop --as-job to compute the forecast here.", | ||
| **MsgStyle.ERROR, | ||
| ) | ||
| raise click.Abort() |
There was a problem hiding this comment.
Good catch, and it was worse than "ignored": with dry-run: true in a --parameters file, --as-job sailed past the guard and queued a job that computes a forecast and throws it away on the worker (confirmed: exit code 0, job queued).
Fixed in 53da566, without peeking at the file: the check now runs after _assemble_forecaster_config_and_parameters, and reads parameters.get("dry-run", False). That covers every route into the flag — the --dry-run option, the --parameters file, and the --edit-parameters editor — and it also drives the CLI's output branch, so a dry run from a file reports what it would have saved instead of "Successfully created".
test_add_forecast_rejects_dry_run_as_job_from_parameters_file covers it; with the old kwargs-only reading restored, it fails with assert 0 == 1.
Documentation build overview
5 files changed ·
|
The --as-job guard and the dry-run report now read the flag from the assembled parameters, so a dry run counts however it was supplied: as the --dry-run option, through the file passed to --parameters, or through the --edit-parameters editor. Also name the flag as --dry-run in the pipeline's log message, matching the CLI option that switches it on. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HeRZd2nDDShZTE8ZmbERzn Signed-off-by: F.N. Claessen <claessen@seita.nl>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HeRZd2nDDShZTE8ZmbERzn Signed-off-by: F.N. Claessen <claessen@seita.nl>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HeRZd2nDDShZTE8ZmbERzn Signed-off-by: F.N. Claessen <claessen@seita.nl>
There was a problem hiding this comment.
🟢 Approval recommended
The change is well-scoped, preserves existing non-dry behavior, adds targeted tests and docs, and only a minor docstring-style nit was found.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
flexmeasures/cli/tests/test_data_add_fresh_db.py:45
- This new test docstring is a one-line summary but it doesn’t end with a period, which is inconsistent with the repo’s docstring conventions.
- Files reviewed: 9/9 changed files
- Comments generated: 0 new
- Review effort level: Lite
…edule Combined with --as-job, the flag was dropped without a word: the CLI queued a job, which saves its schedule when a worker picks it up, so a flag that promises to write nothing wrote a schedule. That combination is now rejected, as it already is for reports and forecasts. A schedule dry run now also says what it would have saved — the sensor, the number of beliefs and the events they cover — and the CLI states that the schedule above was not stored, instead of falling silent. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HeRZd2nDDShZTE8ZmbERzn Signed-off-by: F.N. Claessen <claessen@seita.nl>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HeRZd2nDDShZTE8ZmbERzn Signed-off-by: F.N. Claessen <claessen@seita.nl>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HeRZd2nDDShZTE8ZmbERzn Signed-off-by: F.N. Claessen <claessen@seita.nl>
flexmeasures add forecastsflexmeasures add forecasts, and stop add schedule --dry-run from saving
There was a problem hiding this comment.
🟡 Changes recommended
The new schedule dry-run test mixes the module-scoped db fixture with fresh_db-based fixtures in a way that can cause DB teardown interference/hangs in this repo’s test setup.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
flexmeasures/data/schemas/forecasting/pipeline.py:568
dry_runis a new schema field but it lacks anexamplein itsmetadata, while the surrounding fields in this schema consistently include one (e.g.probabilistic,ensure_positive,sensor_to_save). Adding an example keeps CLI/docs metadata consistent and avoids schema consumers having to special-case this field.
- Files reviewed: 10/10 changed files
- Comments generated: 1
- Review effort level: Lite
The test read the market price sensor through the module-scoped `db` fixture while its other fixtures build on `fresh_db`; both manage the same database, so mixing them risks cross-test interference. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HeRZd2nDDShZTE8ZmbERzn Signed-off-by: F.N. Claessen <claessen@seita.nl>
|
On Copilot's suppressed note about
|
There was a problem hiding this comment.
🔵 Needs a closer look
The forecast dry-run CLI output currently assumes non-empty result frames when computing the overall event range, which can yield NaT/incorrect ranges or crash if an empty BeliefsDataFrame is returned.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
flexmeasures/cli/data_add.py:1689
- The --dry-run output branch always computes an overall event range via min/max on each returned BeliefsDataFrame. If any frame is empty, .event_starts.min()/.event_ends.max() can yield NaT (or compare oddly against real timestamps), and the CLI can crash or report a wrong range. Filtering out empty frames and only appending an event-range clause when there is data makes the dry-run output robust.
- Files reviewed: 10/10 changed files
- Comments generated: 0 new
- Review effort level: Lite
Taking the minimum and maximum over an empty frame yields NaT, so a dry run that computed no beliefs at all reported events "from NaT until NaT". Frames without beliefs are now left out of the range, and the clause is dropped when no frame has any, matching how a schedule dry run reports its range. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HeRZd2nDDShZTE8ZmbERzn Signed-off-by: F.N. Claessen <claessen@seita.nl>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HeRZd2nDDShZTE8ZmbERzn Signed-off-by: F.N. Claessen <claessen@seita.nl>
|
Addressed in b2ccc08 (round 4 finding, on the dry-run event range in The concern was right: a returned frame without beliefs made
|
There was a problem hiding this comment.
🟢 Approval recommended
The dry-run behavior is threaded consistently through schema/pipelines/CLI and is backed by targeted regression tests, with only minor user-facing wording nits outstanding.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
flexmeasures/data/services/scheduling.py:898
- The dry-run message can produce grammatically incorrect output like "1 beliefs". Consider pluralising "belief(s)" based on the computed row count so the user-facing output reads correctly for 0/1/n beliefs.
- Files reviewed: 10/10 changed files
- Comments generated: 1
- Review effort level: Lite
Context: - The dry run reported "1 beliefs" and "1 unique belief times", which reads as a bug in the count rather than in the wording. Change: - Say it through pluralize, which the CLI already uses elsewhere, so the noun follows the number. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HeRZd2nDDShZTE8ZmbERzn Signed-off-by: F.N. Claessen <claessen@seita.nl>
A blanket replacement of the placeholder PR number also rewrote the links of two unrelated entries that legitimately cite PR #2483. Only this branch's own entry points at #2494. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WS6V8nZyRzMxsvqGnNpUTk Signed-off-by: F.N. Claessen <claessen@seita.nl>
* Count an event once in a KPI, when several sources report it Two sources reporting one event are two claims about it, not two contributions to it, so adding them up produced a number no source ever reported, and that no point on the chart showed. A sensor with a forecast later corrected by an upload, or with two forecasters configured differently, totalled both. The KPI query now asks for one deterministic belief per event, which prefers the latest source version, and the most recent belief within it. `most_recent_beliefs_only` alone did not do this: it is per source, and `use_latest_version_per_event` only collapses sources sharing a name, type and model, and only within one belief time. The chart beside the KPI still draws every source, so it can show more points than the KPI counted, which the KPI documentation now says. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lp1bUhWjEQtyDbnvRZQgQs Signed-off-by: F.N. Claessen <claessen@seita.nl> * docs/changelog: record the KPI fix Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lp1bUhWjEQtyDbnvRZQgQs Signed-off-by: F.N. Claessen <claessen@seita.nl> * tests: cover the version priority a KPI applies, and say where ties stop The regression test only varied the belief time, while the docstring and the documentation also claimed a preference for the latest source version, which the fixture's unversioned sources could not show. A second test now gives one reporter two versions and has the newer one speak first, so the KPI answers with the newer version's value despite the older belief time. Ties beyond that are left alone, and `_select_latest_version_and_belief_per_event` now says why: beliefs which tie on version and belief time keep the order they came in, which is how a caller expresses its own precedence by the order it passes its sources. `test_source_transition` documents and relies on that. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LtMZ49GH6LaiY5MdgtfNe2 Signed-off-by: F.N. Claessen <claessen@seita.nl> * docs: reflow the tie-order docstring to break after punctuation Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LtMZ49GH6LaiY5MdgtfNe2 Signed-off-by: F.N. Claessen <claessen@seita.nl> * Settle which source wins an event with one rule, in two steps A version number orders the releases of one source and says nothing about a different one, but the choice between sources ranked every version in the frame together, so a forecaster at v9 outranked a scheduler at v1 on the strength of the number alone, against a fresher belief and against a caller that had asked for the scheduler. Sources are now grouped into families sharing a name, type and model, and versions are only compared inside one. Between families, the order in which a caller passed its sources decides. That is what the `AggregatorReporter` has documented since #819 — "the first source defined in the sources array is prioritized" — and what it never did: the winner was whichever source name sorted first, so `test_source_transition` passed because "source1" sorts before "source2", and reversing the list changed nothing. It does now, which that test also checks. What neither settles falls to the most recent belief, and then to the highest source id, which does not move when a source is renamed. The probabilistic path used to repeat the same ranking in pandas, with the same cross-family bug, so it now makes its beliefs deterministic and hands them to the one implementation. `keep_latest_version` is skipped when one belief per event is asked for, since that path settles versions itself, family by family, and it would otherwise drop a fresher belief before the choice was made. Closes #2476. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WS6V8nZyRzMxsvqGnNpUTk Signed-off-by: F.N. Claessen <claessen@seita.nl> * docs/changelog: point the entry at the PR Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WS6V8nZyRzMxsvqGnNpUTk Signed-off-by: F.N. Claessen <claessen@seita.nl> * docs/changelog: restore two entries' own PR references A blanket replacement of the placeholder PR number also rewrote the links of two unrelated entries that legitimately cite PR #2483. Only this branch's own entry points at #2494. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WS6V8nZyRzMxsvqGnNpUTk Signed-off-by: F.N. Claessen <claessen@seita.nl> * docs: reflow the tie-break sentence to break after punctuation Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WS6V8nZyRzMxsvqGnNpUTk Signed-off-by: F.N. Claessen <claessen@seita.nl> * Treat one named source as one preference, however many it matches A source name is not unique, and the query that resolves one has no ordering, so a caller naming a single source could hand the choice several of them in whatever order the database returned. Read as a precedence, that would have let the database decide, which is the opposite of the point. The sources of one entry now share a rank, and are told apart by belief time and then id, like any other tie. `parse_source_arg_per_entry` keeps that grouping, and `parse_source_arg` flattens it, so the older function behaves exactly as before. Also shorten the changelog entry to what a reader of the changelog needs, and leave the rule itself to the docstring and the pull request. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WS6V8nZyRzMxsvqGnNpUTk Signed-off-by: F.N. Claessen <claessen@seita.nl> * Let an entry that named nothing keep its place, without demoting the rest A caller can name a source this database does not know, and the entry then matches nothing. Those entries still count when ranking the ones that did match, which is right, but the rank standing for "nobody named this" was the number of sources found rather than the number of entries given. Name two unknown sources and then a real one, and the real one ranked behind the sources nobody had named at all — the opposite of what naming it meant. The rank for the unnamed now clears every entry, matched or not. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WS6V8nZyRzMxsvqGnNpUTk Signed-off-by: F.N. Claessen <claessen@seita.nl> * Say in the signature what a preference entry may be The parameter takes either a source or a group of them per entry, which `list | None` did not say, so a caller could pass the wrong thing and only find out when the ranking reached for an id. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WS6V8nZyRzMxsvqGnNpUTk Signed-off-by: F.N. Claessen <claessen@seita.nl> * Hold the reference implementation to the same rule as the selector The plainly written reference still read each entry as one source and still took the rank for the unnamed from the sources it found, so it encoded both of the mistakes the selector has since stopped making. An oracle that agrees with the old rule cannot catch a return to it: the equivalence test passed only because its trials never named a group, nor anything this database does not know. The reference now follows the same two rules, and the trials include an entry naming two sources and an entry naming nothing. Reintroducing either mistake in the selector now fails the equivalence test, which is what it is there for. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WS6V8nZyRzMxsvqGnNpUTk Signed-off-by: F.N. Claessen <claessen@seita.nl> * Test for the single source, rather than listing the containers The annotation says an entry is a source or any sequence of them, while the check asked whether it was a list or a tuple, so a sequence of another kind would have been read as one source and the ranking would have reached for an id it does not have. Asking whether the entry *is* a source cannot fall behind what the annotation allows. The reference implementation had the same check, and gets the same treatment. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WS6V8nZyRzMxsvqGnNpUTk Signed-off-by: F.N. Claessen <claessen@seita.nl> * docs: say that the source order matters wherever one belief per event is asked for `Sensor.search_beliefs` said so, while `TimedBelief.search`, which takes the flag, and `Sensor.latest_state`, which sets it, still described the argument as a plain list. A caller reading either would have assumed the order was ignored, as it used to be. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WS6V8nZyRzMxsvqGnNpUTk Signed-off-by: F.N. Claessen <claessen@seita.nl> --------- Signed-off-by: F.N. Claessen <claessen@seita.nl> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Why
flexmeasures add forecastsalways writes its forecasts to the database. There was no way to run a forecast just to see what it would produce — to check a config, compare a training window, or reproduce a problem — without adding beliefs.flexmeasures add scheduleandflexmeasures add reportalready have a--dry-runflag; this gives forecasts the same.What
flexmeasures add forecasts --dry-runcomputes the forecast in full, but records nothing, and reports what it would have done:followed by the computed
BeliefsDataFrameitself (asadd report --dry-rundoes).How the flag threads through
The saving happens in the forecasting pipeline, not in the CLI, so the flag travels as a forecaster parameter:
--dry-runis a new (CLI-exclusive) field onForecasterParametersSchema, whose help text follows the wording ofadd schedule --dry-run.resolve_configputsdry_runin the resolved parameters, andForecaster._clean_parametersstripsdry-runagain, so a dry run never ends up in a data source's stored parameters.TrainPredictPipeline.run_cyclepasses it toPredictPipeline, which skipssave_to_dband the commit, and logs what it would have saved instead. Everything else — training, prediction, post-processing, the optional CSV export via--output-path— is unchanged.A normal run is untouched: the non-dry branch is exactly the code that was there before.
What a dry run touches in the database
Nothing survives it. The forecaster's data source is flushed —
DataGenerator.data_sourcecallsget_or_create_source, which adds and flushes, and a dry run reads that source, both to build theBeliefsDataFrameand to report which source it would have recorded under. But no commit follows on this path (the only two commits in the forecasting pipeline are the one this PR skips and the one on the--as-jobpath), so the row is rolled back when the session goes away.Measured on a fresh database, for a configuration that had no source yet: 1 source and 200 beliefs before, 2 sources and 200 beliefs while the session is still open, and 1 source and 200 beliefs after the session rolls back. The test asserts both counts, after an explicit rollback.
This is also a second reason to reject
--dry-runwith--as-job:TrainPredictPipeline.run()commits the data source deliberately on the job path, to make its ID available to the worker, so a queued dry run really would leave a source behind.add schedule --dry-runwas quietly writing schedulesWhile making the three
--dry-runflags behave alike, one turned out to be broken:flexmeasures add schedule --dry-run --as-jobaccepted the flag, dropped it without a word, queued a job — and that job saves its schedule when a worker picks it up. A flag that promises to write nothing wrote a schedule. Measured before the fix: exit code 0,New scheduling job <id> has been added to the queue., one job on theschedulingqueue.add schedulenow rejects that combination, the same wayadd reportand (as of this PR)add forecastsdo.make_schedulealready supporteddry_runon the non-job path, so this is a guard, not new threading.A schedule dry run also reports more: it already printed the computed frame, but now says which sensor, how many beliefs and which events they cover, and the CLI closes with "The schedule above was computed but not stored (because of --dry-run)." instead of falling silent where a normal run says "New schedule is stored."
Remaining difference between the three commands
add forecastshonoursdry-runsupplied through--parameters(see the Copilot thread below: a parameters-filedry-runused to slip past the--as-jobguard);add scheduleandadd reporthave no parameters file, so their flags are option-only. That is a consequence of how forecasts take their parameters, not an inconsistency to iron out.About
--as-job--dry-runwith--as-jobis rejected with a CLI error. A queued job runs on a worker, so the whole point of a dry run — seeing the forecast — would be lost: the user would get a job ID and the computed forecast would be discarded unseen on the worker. This matches whatflexmeasures add reportalready does with the same combination.For the same reason, dry runs stay CLI-only:
dry-runis rejected as an unknown field; it was already absent from the OpenAPI spec, since CLI-exclusive fields are dropped there;flexmeasures add automationrejects it too (an automation exists to record its forecasts), which also keepsdry-runout of the parameters stored on automations.Testing
flexmeasures/cli/tests/test_data_add_fresh_db.py:test_add_forecast_dry_run_saves_no_beliefs— the belief count for the target sensor is unchanged after a dry run, the data source count is unchanged too, and a subsequent normal run does increase the belief count (so the dry run really skipped a step that otherwise happens). Proven to fail: with thedry_runbranch inPredictPipeline.rundisabled, it goes red withassert 248 == 200; with adb.session.commit()added to the dry-run branch, the source assertion goes red withassert 2 == 1.test_add_forecast_rejects_dry_run_as_job— proven to fail with the guard disabled:assert 0 == 1on the exit code.test_add_forecast_rejects_dry_run_as_job_from_parameters_file— adry-runin a--parametersfile is rejected with--as-jobtoo. Proven to fail with the oldkwargs-only reading:assert 0 == 1(it queued a job instead).test_add_schedule_dry_run_saves_no_beliefs— a schedule dry run reports what it computed and records nothing, while a normal run does record. Proven to fail: with the event range dropped from the report,AssertionError: assert 'covering events from' in '...Not saving schedule for sensorpower(ID 1)...'.test_add_schedule_rejects_dry_run_as_job— proven to fail with the new guard disabled:assert 0 == 1on the exit code, and before the fix the same setup queued a job (New scheduling job <id> has been added to the queue., queue count 1).flexmeasures/cli/tests/,flexmeasures/data/tests/test_scheduling_jobs.py,flexmeasures/data/tests/test_forecasting_pipeline.py,flexmeasures/data/schemas/tests/test_forecasting.pyand the v3.0 forecasting API tests all pass (274 passed, 1 xfailed).🤖 Generated with Claude Code
https://claude.ai/code/session_01HeRZd2nDDShZTE8ZmbERzn