-
Notifications
You must be signed in to change notification settings - Fork 1
fix: unblock generated maintenance waves #2789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
283100e
f473d4e
2209fa5
f5dc378
d3ecd4b
9ab5b15
ccfcbc6
2f73671
3836794
affc49c
2cb8f34
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,16 @@ | ||
| { | ||
| "agent": "codex", | ||
| "cli_version": "0.125.0", | ||
| "emitted_at": "2026-07-16T06:27:48.218526Z", | ||
| "emitted_at": "2026-07-17T21:24:31.100466Z", | ||
| "execution_profile": "codex-default", | ||
| "fallback_models": [ | ||
| "gpt-5.4" | ||
| ], | ||
| "operation_role": "worker", | ||
| "pr_number": "2785", | ||
| "pr_number": "2789", | ||
| "requested_model": "gpt-5.5", | ||
| "runner": "reusable-codex-run", | ||
| "schema": "langsmith-fleet/v1", | ||
| "selected_model": "", | ||
| "selection_reason": "" | ||
| "selected_model": "gpt-5.5", | ||
| "selection_reason": "input" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,6 +62,20 @@ def test_sync_lockfile_apply_updates_versions(tmp_path: Path) -> None: | |
| assert "requests==2.0.0" in updated | ||
|
|
||
|
|
||
| def test_sync_lockfile_reports_requirements_dev_lockfile_name(tmp_path: Path) -> None: | ||
| lockfile = tmp_path / "requirements-dev.lock" | ||
| lockfile.write_text("ruff==0.1.0\n", encoding="utf-8") | ||
|
|
||
| changes, errors = sdd.sync_lockfile( | ||
| lockfile, | ||
| {"RUFF_VERSION": "1.0.0"}, | ||
| apply=False, | ||
| ) | ||
|
|
||
| assert errors == [] | ||
| assert changes == ["requirements-dev.lock:ruff: 0.1.0 -> ==1.0.0"] | ||
|
|
||
|
|
||
|
Comment on lines
+65
to
+78
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Assert that dry-run mode leaves the lockfile unchanged. This test uses 🤖 Prompt for AI AgentsSource: Path instructions |
||
| def test_sync_lockfile_preserves_comments_and_whitespace(tmp_path: Path) -> None: | ||
| lockfile = tmp_path / "requirements.lock" | ||
| lockfile.write_text( | ||
|
|
@@ -87,6 +101,26 @@ def test_sync_lockfile_preserves_comments_and_whitespace(tmp_path: Path) -> None | |
| assert "black==2.0.0" in updated | ||
|
|
||
|
|
||
| def test_sync_pyproject_normalizes_minimum_pin_at_target_version( | ||
| tmp_path: Path, | ||
| ) -> None: | ||
| pyproject = tmp_path / "pyproject.toml" | ||
| pyproject.write_text( | ||
| '[project.optional-dependencies]\ndev = [\n "black>=2.0.0",\n]\n', | ||
| encoding="utf-8", | ||
| ) | ||
|
|
||
| changes, errors = sdd.sync_pyproject( | ||
| pyproject, | ||
| {"BLACK_VERSION": "2.0.0"}, | ||
| apply=True, | ||
| ) | ||
|
|
||
| assert errors == [] | ||
| assert changes == ["black: >=2.0.0 -> ==2.0.0"] | ||
| assert '"black==2.0.0"' in pyproject.read_text(encoding="utf-8") | ||
|
|
||
|
|
||
| def test_main_apply_updates_pyproject_and_lockfile( | ||
| tmp_path: Path, monkeypatch: pytest.MonkeyPatch | ||
| ) -> None: | ||
|
|
@@ -117,6 +151,36 @@ def test_main_apply_updates_pyproject_and_lockfile( | |
| assert "ruff==1.0.0" in lockfile.read_text(encoding="utf-8") | ||
|
|
||
|
|
||
| def test_main_apply_updates_all_present_requirements_lockfiles( | ||
| tmp_path: Path, monkeypatch: pytest.MonkeyPatch | ||
| ) -> None: | ||
| env_path = tmp_path / "pins.env" | ||
| pyproject_path = tmp_path / "pyproject.toml" | ||
| requirements_lock = tmp_path / "requirements.lock" | ||
| requirements_dev_lock = tmp_path / "requirements-dev.lock" | ||
| pins = {"RUFF_VERSION": "1.0.0", "BLACK_VERSION": "2.0.0"} | ||
|
|
||
| _write_env_file(env_path, pins) | ||
| _write_pyproject(pyproject_path, "0.9.0", "2.0.0") | ||
| requirements_lock.write_text("ruff==0.9.0\n", encoding="utf-8") | ||
| requirements_dev_lock.write_text("ruff==0.8.0\n", encoding="utf-8") | ||
| monkeypatch.chdir(tmp_path) | ||
|
|
||
| exit_code = sdd.main( | ||
| [ | ||
| "--apply", | ||
| "--pin-file", | ||
| str(env_path), | ||
| "--pyproject", | ||
| str(pyproject_path), | ||
| ] | ||
| ) | ||
|
|
||
| assert exit_code == 0 | ||
| assert requirements_lock.read_text(encoding="utf-8") == "ruff==1.0.0\n" | ||
| assert requirements_dev_lock.read_text(encoding="utf-8") == "ruff==1.0.0\n" | ||
|
|
||
|
|
||
| def test_main_check_reports_lockfile_mismatch( | ||
| tmp_path: Path, monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str] | ||
| ) -> None: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -508,10 +508,11 @@ def test_get_llm_client_github_token_defaults(monkeypatch) -> None: | |
| client, provider = client_info | ||
| assert provider == "github-models" | ||
| assert isinstance(client, FakeChatOpenAI) | ||
| from tools import llm_provider | ||
| from tools.llm_provider import GITHUB_MODELS_BASE_URL | ||
| from tools.llm_registry import configured_model_for_provider | ||
|
|
||
| assert client.kwargs["model"] == llm_provider.DEFAULT_MODEL | ||
| assert client.kwargs["base_url"] == llm_provider.GITHUB_MODELS_BASE_URL | ||
| assert client.kwargs["model"] == configured_model_for_provider("github-models") | ||
| assert client.kwargs["base_url"] == GITHUB_MODELS_BASE_URL | ||
|
Comment on lines
+511
to
+515
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Assert the production fallback contract instead of mirroring the selector.
As per path instructions, Python changes should prioritize correctness and test coverage, including tests for new or changed behavior. 🤖 Prompt for AI AgentsSource: Path instructions |
||
|
|
||
|
|
||
| def test_get_llm_client_with_openai_token(monkeypatch) -> None: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.