Implement rec - Phase 4 complete
Quality Gate / gate (push) Successful in 2m38s

This commit is contained in:
Jim Lancaster
2026-09-02 16:23:09 -05:00
parent 27ec81ca5b
commit 6f4accf275
13 changed files with 98 additions and 141 deletions
+16
View File
@@ -107,6 +107,22 @@ def test_runtime_settings_uses_override_env_file(tmp_path: Path, monkeypatch):
assert "PORT=9001" in target.read_text(encoding="utf-8")
def test_runtime_settings_falls_back_to_shared_settings_env_file_override(tmp_path: Path, monkeypatch):
settings = _settings_for_runtime_editing(tmp_path)
target = tmp_path / "shared.env"
target.write_text("OPENROUTER_API_KEY=test-key\nPORT=8000\n", encoding="utf-8")
monkeypatch.delenv("RUNTIME_SETTINGS_ENV_FILE", raising=False)
monkeypatch.setenv("ENV_FILE", str(target))
snapshot = save_runtime_settings(
settings=settings,
updates={"port": "9001"},
)
assert snapshot.env_file_path == target
assert "PORT=9001" in target.read_text(encoding="utf-8")
def test_save_runtime_settings_surfaces_unreadable_target(tmp_path: Path, monkeypatch):
settings = _settings_for_runtime_editing(tmp_path)
env_path = tmp_path / ".env"