Skip to content

[BREAKING] MAINT: Simplify scenario construction and initializer parameters - #3404

Merged
Richard Lundeen (richlundeen) merged 6 commits into
microsoft:mainfrom
richlundeen:richlundeen-phase-g-relevance
Oct 21, 2026
Merged

Richard Lundeen (richlundeen) merged 6 commits into
microsoft:mainfrom
richlundeen:richlundeen-phase-g-relevance

Conversation

@richlundeen

@richlundeen Richard Lundeen (richlundeen) commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Description

Complete the remaining simplifications from the Simplifying Scenarios plan, following #2132. The two historical adaptive bugs were already fixed in #2152; this PR preserves their regression coverage rather than introducing another fix. The biggest change is to modify initializer paramaters to match other registries like scenarios and converters/targets/etc.

Here is a list of changes:

  • Use classmethod parameter declarations and the shared typed resolver for initializers. Separate configuration from validation, so startup checks do not replace the configured parameter bag or its values.
  • Support required scalar/list inputs without blocking no-argument construction or metadata discovery. Reject missing required inputs when configuration is complete.
  • Reject fractional integer conversions instead of truncating them. In particular, YAML days: 0.5 or days: -0.5 cannot become days: 0 and trigger unconditional dataset refresh.
  • Pass common construction inputs through ScenarioContext, including nested manual builders and per-technique converters. Copy converter containers while retaining live converter instances by identity. Keep scenario-specific scorers and options on the scenario.
  • Reuse the existing registry configuration helper for estimates with cancellation-safe construction ownership. Read the stored scenario result once during resume.
  • Correct the adaptive guide: technique choices use historical results during initialization, are saved in the run plan, and are replayed on resume. Execution stops on success; it does not reselect based on earlier objectives in the same prebuilt run.

Breaking change and migration: custom initializers must change supported_parameters from an instance property to a classmethod, declare parameter types, and read typed scalar values rather than indexing string lists. Use set_params_from_args to configure inputs instead of assigning raw or partial parameter dictionaries. validate_params() checks resolved values without coercing or repairing them. CLI/YAML syntax is unchanged. Fractional values supplied for integer parameters now raise an error rather than truncate. These changes remove separate parsing and configuration mechanisms; no generic builder framework, new dependency, lockfile change, or persistence migration is included.

…meters

Unify initializer declarations and typed parameter resolution, separate configuration from validation, and handle required inputs without blocking metadata. Reject fractional integer coercion, route construction through ScenarioContext, reuse registry configuration for estimates, and avoid duplicate resume reads. Update author guides and focused regression coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 11462efb-198b-4fa6-869c-2be302f88fa6
Separate registration, clearing/default restoration, and saved-name registration into independent desktop and mobile tests. Preserve assertions and the 30-second budget, wait for runtime readiness and saved preferences before reloads, and seed complete preferences in the isolated restored-name case.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 11462efb-198b-4fa6-869c-2be302f88fa6
Keep the split operation acceptance flows together with upstream runtime-readiness and preference-persistence assertions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 11462efb-198b-4fa6-869c-2be302f88fa6
Keep the scenario and initializer changes current with the approved main branch. The merge is conflict-free. Preserve typed parameter resolution and the split browser acceptance flows.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 11462efb-198b-4fa6-869c-2be302f88fa6
Integrate the latest main changes to keep the approved PR eligible under strict up-to-date branch protection. Preserve the existing scenario simplification and browser test fixes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 11462efb-198b-4fa6-869c-2be302f88fa6
Preserve main's faster initial preference seeding and explicit state checks, together with the PR's runtime-readiness waits. Retain upstream Pillow and Ruff updates. Local validation passed 1,861 scoped Python tests and all six changed browser preference cases; the full pre-commit command was attempted twice but the configured package index cannot provide the upstream Ruff 0.17.1 pin.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 11462efb-198b-4fa6-869c-2be302f88fa6
@richlundeen
Richard Lundeen (richlundeen) added this pull request to the merge queue Oct 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 21, 2026
@richlundeen
Richard Lundeen (richlundeen) added this pull request to the merge queue Oct 21, 2026
Merged via the queue into microsoft:main with commit 6446a03 Oct 21, 2026
65 checks passed
@richlundeen
Richard Lundeen (richlundeen) deleted the richlundeen-phase-g-relevance branch October 21, 2026 22:23
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