fix(ci): instantiate CIEvoStr with a Scenario, add minimal CIScen#1417
Open
genisis0x wants to merge 1 commit into
Open
fix(ci): instantiate CIEvoStr with a Scenario, add minimal CIScen#1417genisis0x wants to merge 1 commit into
genisis0x wants to merge 1 commit into
Conversation
EvolvingStrategy.__init__ requires a Scenario instance, but
rdagent/app/CI/run.py was calling CIEvoStr() with no arguments. Running
'python rdagent/app/CI/run.py <path>' aborts before any work starts with:
TypeError: EvolvingStrategy.__init__() missing 1 required
positional argument: 'scen'
CIEvoStr does not actually read self.scen anywhere — the linting loop is
driven entirely by CI_prompts and ruff/mypy output — so the cleanest fix
is a small Scenario stub local to this file, named CIScen, that satisfies
the four abstract methods with CI-appropriate strings and an empty
runtime-environment value. Pass an instance through at the call site.
Fixes microsoft#1329
Author
|
Read the CLA — all clear from my side. @microsoft-github-policy-service agree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #1329.
python rdagent/app/CI/run.py <path>aborts at startup with:Root cause
EvolvingStrategy.__init__(self, scen: Scenario)(rdagent/core/evolving_framework.py:61-63) requires aScenarioinstance.CIEvoStrinherits without overriding__init__, but the script's module-level launch (rdagent/app/CI/run.py:729) constructs it with no arguments, so the call fails before the lint loop ever runs.CIEvoStr.evolveitself never readsself.scen— the linting workflow is driven entirely byCI_promptsand ruff/mypy output — so the missing argument is purely a contract violation, not a logical dependency.Change
rdagent/app/CI/run.py:CIScen(Scenario)class with the four abstract methods (background,rich_style_description,get_scenario_all_desc,get_runtime_environment) returning short CI-appropriate strings. Keeping it local avoids pulling a CI-specific scenario intordagent/scenarios/where it would have no other consumer.estr = CIEvoStr(scen=CIScen()).Verification
python -m py_compile rdagent/app/CI/run.pyclean.ast.parseclean.