mirror of
https://github.com/Comfy-Org/ComfyUI.git
synced 2026-09-14 12:56:37 +08:00
19e1058f4c
* review-stack 1/4: code (37 files, +3217/-3958) Review-and-land stack for synap5e/feat/asset-record-content-split, generated by review-stack.py. Once approved, merges DOWN into the layer below (a fast-forward); only the bottom layer squash-merges into the real base. See ~/adocs/review-stack.md. Rule: path not under tests-unit/ or tests/ Question: Is the logic change right? Source tip:7007d18582Merge-base:783545f689* review-stack 2/4: tests-removed (24 files, +274/-8220) Review-and-land stack for synap5e/feat/asset-record-content-split, generated by review-stack.py. Once approved, merges DOWN into the layer below (a fast-forward); only the bottom layer squash-merges into the real base. See ~/adocs/review-stack.md. Rule: test file deleted, or modified with deleted/(added+deleted) >= 0.9 Question: For each dropped assertion: obsolete by a ruling, or covered by a tests-new test? Source tip:7007d18582Merge-base:783545f689* review-stack 3/4: tests-changed (13 files, +1043/-1218) Review-and-land stack for synap5e/feat/asset-record-content-split, generated by review-stack.py. Once approved, merges DOWN into the layer below (a fast-forward); only the bottom layer squash-merges into the real base. See ~/adocs/review-stack.md. Rule: remaining modified test files (incl. conftest.py / helpers) Question: Did the edits weaken an existing check? Source tip:7007d18582Merge-base:783545f689* review-stack 4/4: tests-new (46 files, +8601/-0) Review-and-land stack for synap5e/feat/asset-record-content-split, generated by review-stack.py. Once approved, merges DOWN into the layer below (a fast-forward); only the bottom layer squash-merges into the real base. See ~/adocs/review-stack.md. Rule: test file added Question: Is the code layer well covered? Source tip:7007d18582Merge-base:783545f689* review-stack 5/6: code (13 files, +351/-104) Review-and-land stack for synap5e/feat/assets-di, generated by review-stack.py. Once approved, merges DOWN into the layer below (a fast-forward); only the bottom layer squash-merges into the real base. See ~/adocs/review-stack.md. Rule: path not under tests-unit/ or tests/ Question: Is the logic change right? Source tip:eca2c74bffMerge-base:20d59d2a5f* review-stack 6/6: tests (8 files, +753/-238) Review-and-land stack for synap5e/feat/assets-di, generated by review-stack.py. Once approved, merges DOWN into the layer below (a fast-forward); only the bottom layer squash-merges into the real base. See ~/adocs/review-stack.md. Rule: every changed file under tests-unit/ or tests/ (added, modified, or deleted) Question: Is the code layer well covered, and did any edit weaken an existing check? Source tip:eca2c74bffMerge-base:20d59d2a5f* review-stack 7/8: ported-fixes (42 files, +1361/-180) Review-and-land stack for synap5e/feat/assets-di-v2, generated by review-stack.py conventions (hand-built continuation layer; see the PR body). Once approved, merges DOWN into the layer below (a fast-forward); only the bottom layer squash-merges into the real base. See ~/adocs/review-stack.md. Rule: the 11 base-branch fix/docs commits 595cd6e4..94d7185b cherry-picked across the DI refactor (7efdd1d7excluded, superseded by layer 8) Question: was each base fix ported faithfully across the DI refactor? Source tip: 6841881069284803b902b4a9e33bdcda13126771 Merge-base:7fdfb40f4b* review-stack 8/8: defensive-parity (4 files, +36/-3) Review-and-land stack for synap5e/feat/assets-di-v2, generated by review-stack.py conventions (hand-built continuation layer; see the PR body). Once approved, merges DOWN into the layer below (a fast-forward); only the bottom layer squash-merges into the real base. See ~/adocs/review-stack.md. Rule: match-or-improve master's dependency defenses — NoAssets selection when DB deps unavailable (7efdd1d7's outcome via the DI seam), requirements warning before assets imports, blake3 in the guarded dependency set Question: does each degradation path now match or improve master's behavior? Source tip:ebc2cfeebcMerge-base:7fdfb40f4b* fix(assets): only discard content rows this operation actually inserted CR-9: Enumerated all six create_content call sites. Only scanner seeding and the three ingest registration paths track IDs for failure cleanup. * fix(assets): reject hash-only uploads with FEATURE_DISABLED when hashing is off CodeRabbit finding CR-2: reject hash-only multipart uploads before create_from_hash when hashing is disabled. * fix(assets): seed persists the stat it verified CR-7: persist the fresh seed-time restat instead of walk-time spec values. * fix(assets): route database lock failures to the lock guidance CR-16: route file-lock startup failures through the existing lock guidance and exit path. * fix(assets): drop the inaccurate temp-cleanup claim from the shutdown warning References CR-10. * fix(assets): walk the output root after execution so undeclared outputs register promptly Custom nodes that write files into the output directory without declaring them in output_ui only became assets when the next full walk happened - a frontend GET /object_info or a restart. Headless and API-only sessions never trigger either, so those files never converged into the asset database. The post-execution hook now requests a FULL scan of the output root instead of an enrich-only pass. The seeder's pending-request queue was generalised from enrich-specific to carrying a scan phase, so the request starts immediately when the seeder is idle and coalesces (escalating to FULL on a phase mismatch) when a scan is already running. queue_output_enrichment is renamed to queue_output_scan across the protocol, the NoAssets no-op and the call site. References FIX-6. * chore(assets): remove seeder paths orphaned by the output-scan change 45c2f96e rerouted both former enrich call sites to start()/enqueue_scan(), leaving two seeder methods that look live but are not. Review round F2 raised this along with four smaller items; the user's disposition was to fix all six here. - Delete start_enrich: zero callers repo-wide after 45c2f96e. - Delete enqueue_enrich: no production callers; its ~18 call sites in tests/test_asset_seeder.py move to enqueue_scan(phase=ScanPhase.ENRICH) with their semantics unchanged. The deletion forces the half-done class renames (TestEnqueueEnrich* -> TestEnqueueScan*, consistent with the already-renamed TestPendingScanDrain) and restores the module docstring that was dropped rather than reworded. - Document at manager.queue_output_scan that ScanPhase.FULL per debounce window is the deliberate, user-ratified trade, so it is not optimised back to ENRICH without revisiting the decision. - Document that SeedAssetSpec.size_bytes/mtime_ns are walk-time diagnostics only - production persists the seed-time restat since CR-7. - Export create_content_reporting_insert from the queries facade and fold scanner.py's direct-module import into the existing facade block. - Harden test_queue_output_scan_does_not_duplicate_declared_output against a vacuous pass: it now asserts the seeder finished without errors and that an undeclared sibling written into the same directory WAS registered by the same scan, proving the walk actually ran. No production behaviour changes beyond the two deletions. References F2-cleanup. * chore: comment cleanup Comment-Gate: 18 quarantined * fix(assets): preserve pause across the seeder's pending-scan drain pause() runs before every prompt, while pending-scan enqueue and resume only run inside the debounced gc-interval gate. If the active scan finishes just after the next prompt's pause, its finally block resets the seeder to idle and the pending drain starts a replacement with the run gate open, so resume becomes a no-op. Capture pausedness under the lock before resetting to idle, then start the drained scan already paused. Setting the state and gate before launching the thread avoids the start-then-reclear window and lets resume release the existing scan checkpoints. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * test(assets): pin job_id absence for scan-discovered assets Owner ruling, recorded 2026-09-03 in the stack-9-hardening planning notepad: scan-discovered assets — including undeclared outputs found by the post-execution walk — carry job_id = None, always; only emission-time registration (output_ui declaration) attributes a job; attributing walk finds to the most recent prompt would be a temporal-correlation guess that is wrong exactly when prompts interleave; None is honest provenance. Do NOT add proximity-based attribution heuristics to the scanner. Ratified against Jacob Segal's cross-job-attribution concern (2026-09-08 review meeting) — a wrongly-attributed asset could mean one user's cloud job sees another user's asset. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * [review-stack 10/10] assets-tests (#16218) * test(execution): run the battery with assets enabled and assert asset-system health at teardown * test(execution): cover list-shaped outputs registering assets Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> --------- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * [review-stack 11/11] review-fixes (#16261) * fix(assets): only exit on database file-lock timeout when assets are enabled * test(assets): pin live_contents_under_prefixes path-filtering semantics * perf(assets): push live-content prefix filtering into SQL * test(assets): declare per-entry intent in the path-prefix corpus * test(assets): normalize POSIX-literal path expectations for Windows * test(assets): force observable stat changes and close-before-mutate on Windows-sensitive rewrites * test(assets): force an observable mtime change in the hash-mode split test --------- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> Co-authored-by: guill <jacob.e.segal@gmail.com>
387 lines
12 KiB
Python
387 lines
12 KiB
Python
import copy
|
|
import os
|
|
import tempfile
|
|
from collections import namedtuple
|
|
from unittest.mock import patch
|
|
|
|
import folder_paths
|
|
import pytest
|
|
|
|
from app.assets.manager import NoAssets
|
|
from comfy_execution.asset_enrichment import (
|
|
emit_cached_output,
|
|
register_cached_outputs,
|
|
register_executed_outputs,
|
|
)
|
|
from test_inmemory_assets import AssetCall, InMemoryAssets
|
|
|
|
_CacheEntry = namedtuple("_CacheEntry", ["ui", "outputs"])
|
|
|
|
_BASE = os.path.join(tempfile.gettempdir(), "asset-enrichment-test-base")
|
|
|
|
|
|
class _ArgsStub:
|
|
enable_assets = False
|
|
enable_asset_hashing = False
|
|
|
|
|
|
class _Server:
|
|
last_node_id: str | None = None
|
|
sockets_metadata: dict[str, dict[str, object]] = {}
|
|
|
|
def __init__(self, client_id: str | None = None) -> None:
|
|
self.client_id = client_id
|
|
self.sent: list[tuple] = []
|
|
|
|
def send_sync(self, event, data, sid=None):
|
|
self.sent.append((event, data, sid))
|
|
|
|
def queue_updated(self) -> None:
|
|
pass
|
|
|
|
|
|
@pytest.fixture
|
|
def output_path_environment(monkeypatch: pytest.MonkeyPatch) -> None:
|
|
monkeypatch.setattr(folder_paths, "get_directory_by_type", lambda _type: _BASE)
|
|
monkeypatch.setattr(os.path, "isfile", lambda _path: True)
|
|
|
|
|
|
def _output(filename: str, *, subfolder: str = "", type_: str = "output") -> dict:
|
|
return {"images": [{"filename": filename, "subfolder": subfolder, "type": type_}]}
|
|
|
|
|
|
def _wrapper(filename: str, node_id: str = "1") -> dict:
|
|
return {
|
|
"meta": {
|
|
"node_id": node_id,
|
|
"display_node": node_id,
|
|
"parent_node": None,
|
|
"real_node_id": node_id,
|
|
},
|
|
"output": _output(filename),
|
|
}
|
|
|
|
|
|
def _find_ids(value) -> list:
|
|
found: list = []
|
|
if isinstance(value, dict):
|
|
for key, sub in value.items():
|
|
if key == "id":
|
|
found.append(sub)
|
|
found.extend(_find_ids(sub))
|
|
elif isinstance(value, list):
|
|
for item in value:
|
|
found.extend(_find_ids(item))
|
|
return found
|
|
|
|
|
|
# REQUIRED test names (invoked verbatim downstream). Do not rename.
|
|
def test_executed_new_path_gets_fresh_id(output_path_environment) -> None:
|
|
manager = InMemoryAssets()
|
|
output_ui = _output("new.png")
|
|
|
|
enriched = register_executed_outputs(output_ui, "job-1", manager)
|
|
|
|
assert enriched["images"][0]["id"] == "asset-1"
|
|
assert "id" not in output_ui["images"][0]
|
|
assert manager.calls == [
|
|
AssetCall(
|
|
"register_executed_output", (os.path.join(_BASE, "new.png"), "job-1")
|
|
)
|
|
]
|
|
deliveries = manager.deliveries_by_path[os.path.join(_BASE, "new.png")]
|
|
assert [(delivery.asset.id, delivery.asset.job_id) for delivery in deliveries] == [
|
|
("asset-1", "job-1")
|
|
]
|
|
|
|
|
|
def test_executed_multiple_entries_register_each_output(output_path_environment) -> None:
|
|
manager = InMemoryAssets()
|
|
filenames = ["first.png", "second.png", "third.png"]
|
|
output_ui = {
|
|
"images": [
|
|
{"filename": filename, "subfolder": "batch", "type": "output"}
|
|
for filename in filenames
|
|
]
|
|
}
|
|
|
|
register_executed_outputs(output_ui, "job-list", manager)
|
|
|
|
expected_paths = [os.path.join(_BASE, "batch", filename) for filename in filenames]
|
|
assert manager.calls == [
|
|
AssetCall("register_executed_output", (path, "job-list"))
|
|
for path in expected_paths
|
|
]
|
|
assert [
|
|
(delivery.abs_path, delivery.asset.job_id, delivery.superseded)
|
|
for path in expected_paths
|
|
for delivery in manager.deliveries_by_path[path]
|
|
] == [(path, "job-list", False) for path in expected_paths]
|
|
|
|
|
|
def test_executed_mixed_types_use_their_own_roots(
|
|
monkeypatch: pytest.MonkeyPatch,
|
|
) -> None:
|
|
manager = InMemoryAssets()
|
|
output_root = f"{_BASE}-output"
|
|
temp_root = f"{_BASE}-temp"
|
|
roots = {"output": output_root, "temp": temp_root}
|
|
monkeypatch.setattr(
|
|
folder_paths,
|
|
"get_directory_by_type",
|
|
lambda output_type: roots[output_type],
|
|
)
|
|
monkeypatch.setattr(os.path, "isfile", lambda _path: True)
|
|
output_ui = {
|
|
"images": [
|
|
{"filename": "kept.png", "subfolder": "saved", "type": "output"},
|
|
{"filename": "preview.png", "subfolder": "staged", "type": "temp"},
|
|
]
|
|
}
|
|
|
|
register_executed_outputs(output_ui, "job-mixed", manager)
|
|
|
|
assert manager.calls == [
|
|
AssetCall(
|
|
"register_executed_output",
|
|
(os.path.join(output_root, "saved", "kept.png"), "job-mixed"),
|
|
),
|
|
AssetCall(
|
|
"register_executed_output",
|
|
(os.path.join(temp_root, "staged", "preview.png"), "job-mixed"),
|
|
),
|
|
]
|
|
|
|
|
|
def test_executed_repeated_calls_keep_distinct_path_deliveries(
|
|
output_path_environment,
|
|
) -> None:
|
|
manager = InMemoryAssets()
|
|
filenames = ["iteration-1.png", "iteration-2.png", "iteration-3.png"]
|
|
|
|
for filename in filenames:
|
|
register_executed_outputs(_output(filename), "loop-job", manager)
|
|
|
|
expected_paths = [os.path.join(_BASE, filename) for filename in filenames]
|
|
assert manager.calls == [
|
|
AssetCall("register_executed_output", (path, "loop-job"))
|
|
for path in expected_paths
|
|
]
|
|
assert [
|
|
(delivery.abs_path, delivery.asset.job_id, delivery.superseded)
|
|
for path in expected_paths
|
|
for delivery in manager.deliveries_by_path[path]
|
|
] == [(path, "loop-job", False) for path in expected_paths]
|
|
|
|
|
|
def test_executed_empty_entry_list_is_noop(output_path_environment) -> None:
|
|
manager = InMemoryAssets()
|
|
|
|
enriched = register_executed_outputs({"images": []}, "job", manager)
|
|
|
|
assert enriched == {"images": []}
|
|
assert manager.calls == []
|
|
assert manager.deliveries_by_path == {}
|
|
|
|
|
|
def test_executed_over_existing_path_gets_new_id_and_marks_old_missing(output_path_environment) -> None:
|
|
manager = InMemoryAssets()
|
|
|
|
first = register_executed_outputs(_output("same.png"), "job-1", manager)
|
|
old_id = first["images"][0]["id"]
|
|
|
|
second = register_executed_outputs(_output("same.png"), "job-2", manager)
|
|
new_id = second["images"][0]["id"]
|
|
|
|
deliveries = manager.deliveries_by_path[os.path.join(_BASE, "same.png")]
|
|
assert new_id != old_id
|
|
assert deliveries[0].superseded is True
|
|
assert deliveries[-1].asset.id == new_id
|
|
|
|
|
|
def test_cached_replay_creates_delivery_with_current_job_id(output_path_environment) -> None:
|
|
manager = InMemoryAssets()
|
|
|
|
register_executed_outputs(_output("replay.png"), "seed-job", manager)
|
|
enriched = register_cached_outputs(_wrapper("replay.png"), "replay-job", manager)
|
|
|
|
replay_id = enriched["output"]["images"][0]["id"]
|
|
deliveries = manager.deliveries_by_path[os.path.join(_BASE, "replay.png")]
|
|
assert (replay_id, "replay-job") == (deliveries[-1].asset.id, deliveries[-1].asset.job_id)
|
|
assert replay_id != "asset-1"
|
|
|
|
|
|
def test_cached_registration_happens_without_client(output_path_environment) -> None:
|
|
manager = InMemoryAssets()
|
|
server = _Server(client_id=None)
|
|
ui_outputs: dict = {}
|
|
|
|
register_executed_outputs(_output("noclient.png"), "seed-job", manager)
|
|
emit_cached_output(
|
|
server,
|
|
"node-1",
|
|
"node-1",
|
|
_CacheEntry(ui=_wrapper("noclient.png"), outputs=[]),
|
|
"job-x",
|
|
ui_outputs,
|
|
manager,
|
|
)
|
|
|
|
deliveries = manager.deliveries_by_path[os.path.join(_BASE, "noclient.png")]
|
|
assert any(delivery.asset.job_id == "job-x" for delivery in deliveries)
|
|
assert "node-1" in ui_outputs
|
|
assert ui_outputs["node-1"]["output"]["images"][0]["id"] is not None
|
|
assert server.sent == []
|
|
|
|
|
|
def test_cache_entry_contains_no_asset_ids(output_path_environment) -> None:
|
|
manager = InMemoryAssets()
|
|
output_ui = _output("keep.png")
|
|
|
|
enriched = register_executed_outputs(output_ui, "job", manager)
|
|
|
|
cache_entry = _CacheEntry(
|
|
ui={"meta": {"node_id": "1"}, "output": output_ui}, outputs=[]
|
|
)
|
|
assert _find_ids(cache_entry.ui) == []
|
|
assert _find_ids(enriched) == ["asset-1"]
|
|
|
|
|
|
def test_cached_ui_object_unmodified_after_emission(output_path_environment) -> None:
|
|
manager = InMemoryAssets()
|
|
server = _Server(client_id="client-1")
|
|
cached = _CacheEntry(ui=_wrapper("immut.png"), outputs=[])
|
|
snapshot = copy.deepcopy(cached.ui)
|
|
|
|
register_executed_outputs(_output("immut.png"), "seed-job", manager)
|
|
emit_cached_output(server, "1", "1", cached, "prompt-1", {}, manager)
|
|
|
|
assert cached.ui == snapshot
|
|
|
|
|
|
def test_double_emission_yields_single_delivery(output_path_environment) -> None:
|
|
manager = InMemoryAssets()
|
|
server = _Server(client_id="client-1")
|
|
ui_outputs: dict = {}
|
|
cached = _CacheEntry(ui=_wrapper("dbl.png"), outputs=[])
|
|
|
|
register_executed_outputs(_output("dbl.png"), "seed-job", manager)
|
|
emit_cached_output(server, "1", "1", cached, "prompt-1", ui_outputs, manager)
|
|
emit_cached_output(server, "1", "1", cached, "prompt-1", ui_outputs, manager)
|
|
|
|
deliveries = manager.deliveries_by_path[os.path.join(_BASE, "dbl.png")]
|
|
assert len([delivery for delivery in deliveries if delivery.asset.job_id == "prompt-1"]) == 1
|
|
|
|
|
|
def test_executed_disabled_returns_unenriched_copy(output_path_environment) -> None:
|
|
manager = NoAssets(_ArgsStub())
|
|
output_ui = _output("a.png")
|
|
|
|
with patch.object(
|
|
manager,
|
|
"register_executed_output",
|
|
wraps=manager.register_executed_output,
|
|
) as register_executed_output:
|
|
enriched = register_executed_outputs(output_ui, "job", manager)
|
|
|
|
assert enriched is not output_ui
|
|
assert "id" not in enriched["images"][0]
|
|
register_executed_output.assert_not_called()
|
|
|
|
|
|
def test_executed_missing_file_is_skipped(monkeypatch: pytest.MonkeyPatch) -> None:
|
|
manager = InMemoryAssets()
|
|
monkeypatch.setattr(folder_paths, "get_directory_by_type", lambda _type: _BASE)
|
|
monkeypatch.setattr(os.path, "isfile", lambda _path: False)
|
|
|
|
enriched = register_executed_outputs(_output("gone.png"), "job", manager)
|
|
|
|
assert "id" not in enriched["images"][0]
|
|
assert manager.calls == []
|
|
|
|
|
|
def test_executed_path_escape_is_skipped(output_path_environment) -> None:
|
|
manager = InMemoryAssets()
|
|
output_ui = {"images": [{"filename": "passwd", "subfolder": "../../etc", "type": "output"}]}
|
|
|
|
enriched = register_executed_outputs(output_ui, "job", manager)
|
|
|
|
assert "id" not in enriched["images"][0]
|
|
assert manager.calls == []
|
|
|
|
|
|
def test_executed_non_list_value_passes_through(output_path_environment) -> None:
|
|
manager = InMemoryAssets()
|
|
|
|
enriched = register_executed_outputs({"text": "hello"}, "job", manager)
|
|
|
|
assert enriched["text"] == "hello"
|
|
|
|
|
|
def test_executed_registration_failure_never_raises(
|
|
output_path_environment, monkeypatch: pytest.MonkeyPatch
|
|
) -> None:
|
|
manager = InMemoryAssets()
|
|
|
|
def boom(_abs_path: str, job_id: str | None) -> None:
|
|
raise RuntimeError("registration blew up")
|
|
|
|
monkeypatch.setattr(manager, "register_executed_output", boom)
|
|
|
|
enriched = register_executed_outputs(_output("boom.png"), "job", manager)
|
|
|
|
assert "id" not in enriched["images"][0]
|
|
|
|
|
|
def test_cached_strips_legacy_ids_before_replay(output_path_environment) -> None:
|
|
manager = InMemoryAssets()
|
|
wrapper = _wrapper("legacy.png")
|
|
wrapper["output"]["images"][0]["id"] = "stale-id"
|
|
|
|
register_executed_outputs(_output("legacy.png"), "seed-job", manager)
|
|
enriched = register_cached_outputs(wrapper, "replay-job", manager)
|
|
|
|
assert enriched["output"]["images"][0]["id"] != "stale-id"
|
|
assert wrapper["output"]["images"][0]["id"] == "stale-id"
|
|
|
|
|
|
def test_cached_none_wrapper_returns_none(output_path_environment) -> None:
|
|
manager = InMemoryAssets()
|
|
|
|
result = register_cached_outputs(None, "job", manager)
|
|
|
|
assert result is None
|
|
assert manager.calls == []
|
|
|
|
|
|
def test_cached_missing_live_content_is_nonevent(output_path_environment) -> None:
|
|
manager = InMemoryAssets()
|
|
|
|
enriched = register_cached_outputs(_wrapper("orphan.png"), "job", manager)
|
|
|
|
assert "id" not in enriched["output"]["images"][0]
|
|
assert manager.deliveries_by_path == {}
|
|
|
|
|
|
def test_emit_cached_sends_enriched_output_to_client(output_path_environment) -> None:
|
|
manager = InMemoryAssets()
|
|
server = _Server(client_id="client-1")
|
|
ui_outputs: dict = {}
|
|
|
|
register_executed_outputs(_output("send.png"), "seed-job", manager)
|
|
emit_cached_output(
|
|
server,
|
|
"1",
|
|
"1",
|
|
_CacheEntry(ui=_wrapper("send.png"), outputs=[]),
|
|
"prompt-1",
|
|
ui_outputs,
|
|
manager,
|
|
)
|
|
|
|
assert len(server.sent) == 1
|
|
event, payload, client_id = server.sent[0]
|
|
assert event == "executed"
|
|
assert client_id == "client-1"
|
|
assert payload["output"]["images"][0]["id"] is not None
|