Skip to content

Commit 6eb73d0

Browse files
committed
fix(ci): restore fork main test consistency
1 parent 9be7cf4 commit 6eb73d0

8 files changed

Lines changed: 8 additions & 36475 deletions

File tree

apps/desktop/package-lock.json

Lines changed: 0 additions & 18363 deletions
This file was deleted.

tests/cron/test_cron_profile.py

Lines changed: 0 additions & 437 deletions
This file was deleted.

tests/hermes_cli/test_cmd_update.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,9 @@ def test_update_on_fork_checks_upstream_when_origin_up_to_date(
246246
), patch.object(hm, "_sync_with_upstream_if_needed") as sync_mock:
247247
cmd_update(mock_args)
248248

249-
sync_mock.assert_called_once_with(["git"], PROJECT_ROOT)
249+
sync_mock.assert_called_once_with(
250+
["git", "-c", "windows.appendAtomically=false"], PROJECT_ROOT
251+
)
250252
captured = capsys.readouterr()
251253
assert "Already up to date!" in captured.out
252254

@@ -267,6 +269,7 @@ def test_update_refreshes_repo_and_tui_node_dependencies(
267269
import subprocess as _subprocess
268270
build_ok = _subprocess.CompletedProcess([], 0, stdout="", stderr="")
269271
with patch.object(hm, "_is_termux_env", return_value=False), \
272+
patch("hermes_constants.find_node_executable", return_value="/usr/bin/npm"), \
270273
patch.object(hm, "_run_with_idle_timeout", return_value=build_ok) as mock_idle:
271274
cmd_update(mock_args)
272275

tests/hermes_cli/test_models.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ def read(self):
8282

8383
def test_falls_back_to_static_snapshot_on_fetch_failure(self, monkeypatch):
8484
monkeypatch.setattr(_models_mod, "_openrouter_catalog_cache", None)
85-
with patch("hermes_cli.models._urlopen_model_catalog_request", side_effect=OSError("boom")):
85+
# Pin the remote manifest out too — otherwise the fallback silently
86+
# depends on whatever the deployed catalog currently contains.
87+
with patch("hermes_cli.model_catalog.get_curated_openrouter_models", return_value=None), \
88+
patch("hermes_cli.models._urlopen_model_catalog_request", side_effect=OSError("boom")):
8689
models = fetch_openrouter_models(force_refresh=True)
8790

8891
assert models == OPENROUTER_MODELS

tools/image_generation_tool.py

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -668,54 +668,6 @@ def _build_fal_edit_payload(
668668
}
669669

670670

671-
def _build_fal_edit_payload(
672-
model_id: str,
673-
prompt: str,
674-
image_urls: list,
675-
aspect_ratio: str = DEFAULT_ASPECT_RATIO,
676-
seed: Optional[int] = None,
677-
overrides: Optional[Dict[str, Any]] = None,
678-
) -> Dict[str, Any]:
679-
"""Build a FAL *edit* request payload (image-to-image) from unified inputs.
680-
681-
Every FAL edit endpoint takes ``image_urls`` (a list of source/reference
682-
image URLs) plus the prompt. Size handling differs from text-to-image:
683-
most edit endpoints auto-infer output dimensions from the input image, so
684-
we only send ``image_size`` / ``aspect_ratio`` when the edit endpoint's
685-
``edit_supports`` whitelist accepts it. Keys outside ``edit_supports`` are
686-
stripped before submission.
687-
"""
688-
meta = FAL_MODELS[model_id]
689-
edit_supports = meta.get("edit_supports") or set()
690-
size_style = meta["size_style"]
691-
sizes = meta["sizes"]
692-
693-
aspect = (aspect_ratio or DEFAULT_ASPECT_RATIO).lower().strip()
694-
if aspect not in sizes:
695-
aspect = DEFAULT_ASPECT_RATIO
696-
697-
payload: Dict[str, Any] = dict(meta.get("defaults", {}))
698-
payload["prompt"] = (prompt or "").strip()
699-
payload["image_urls"] = list(image_urls)
700-
701-
# Only express output size when the edit endpoint advertises the key.
702-
# gpt-image-2 edit auto-infers size from the input, so `image_size` is
703-
# intentionally absent from its edit_supports whitelist.
704-
if size_style in {"image_size_preset", "gpt_literal"} and "image_size" in edit_supports:
705-
payload["image_size"] = sizes[aspect]
706-
elif size_style == "aspect_ratio" and "aspect_ratio" in edit_supports:
707-
payload["aspect_ratio"] = sizes[aspect]
708-
709-
if seed is not None and isinstance(seed, int):
710-
payload["seed"] = seed
711-
712-
if overrides:
713-
for k, v in overrides.items():
714-
if v is not None:
715-
payload[k] = v
716-
717-
return {k: v for k, v in payload.items() if k in edit_supports}
718-
719671

720672
# ---------------------------------------------------------------------------
721673
# Upscaler

0 commit comments

Comments
 (0)