Skip to content

Commit fde0362

Browse files
committed
fix: reconcile main-merge — actors.user schema + stderr-only console
Three merge-integration fixes surfaced when running the full suite against the consolidated feat/terminal-dx branch: - `tolokaforge/core/dry_run.py` — use `task.resolve_user_simulator()` instead of the removed `task.user_simulator` attribute (main's M9 project-layer work moved the field to `actors.user`). - `tests/unit/test_dry_run.py` — same rename in the corresponding assertion. - `tests/unit/dx/test_cli_assets.py::test_directory_seed_stamped_and_check_passes` — assert on `result.stderr` (not `result.output`); the terminal-dx branch already routes progress output to stderr per PR #280's "stdout is artifact, stderr is progress" contract, but the merge picked up main's stdout-based assertions on this test path.
1 parent 641eefd commit fde0362

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

tests/unit/dx/test_cli_assets.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,14 @@ def test_directory_seed_stamped_and_check_passes(
156156
)
157157

158158
result = runner.invoke(cli, ["assets", "stamp", str(tmp_path)])
159-
assert result.exit_code == 0, result.output
160-
assert "wrote 1 digest" in result.output
159+
assert result.exit_code == 0, result.stderr
160+
assert "wrote 1 digest" in result.stderr
161161
entry = yaml.safe_load(project_yaml.read_text())["assets"]["seeds"]["src"]
162162
assert entry["digest"] == expected
163163

164164
check = runner.invoke(cli, ["assets", "stamp", "--check", str(tmp_path)])
165-
assert check.exit_code == 0, check.output
166-
assert "match" in check.output
165+
assert check.exit_code == 0, check.stderr
166+
assert "match" in check.stderr
167167

168168
def test_bare_string_shorthand_coerced_to_dict_with_digest(
169169
self, runner: CliRunner, tmp_path: Path

tests/unit/test_dry_run.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,11 @@ def test_materialize_placeholder_when_no_initial_user_message(self) -> None:
112112
runtime_choice="shared",
113113
)
114114

115+
sim = task.resolve_user_simulator()
115116
assert sample.user_prompt_is_literal is False
116117
assert "generated at runtime by user simulator" in sample.user_prompt_text
117-
assert f"mode={task.user_simulator.mode}" in sample.user_prompt_text
118-
assert f"persona={task.user_simulator.persona}" in sample.user_prompt_text
118+
assert f"mode={sim.mode}" in sample.user_prompt_text
119+
assert f"persona={sim.persona}" in sample.user_prompt_text
119120

120121
def test_materialize_no_http_via_respx(self, monkeypatch: pytest.MonkeyPatch) -> None:
121122
"""No socket opens. Belt-and-braces: patch httpx.Client.send AND

tolokaforge/core/dry_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def _placeholder_user_prompt(task: TaskConfig) -> str:
8686
operator sees what the user simulator would generate at runtime
8787
without firing the simulator's LLM call.
8888
"""
89-
sim = task.user_simulator
89+
sim = task.resolve_user_simulator()
9090
backstory = sim.backstory or ""
9191
truncated = backstory[:120]
9292
suffix = "…" if len(backstory) > 120 else ""

0 commit comments

Comments
 (0)