Rename planner and document rewrite: rewrite_documents moves qualified names of the renamed flow in every flow (ports, inputs, outputs) and dashboard binding (one key table, WIDGET_BINDINGS, shared with the WidgetDef accessors, legacy pages included), published and draft, as plain JSON with both variants above either version; plan_rename reports documents, counts, fingerprint, warnings and refusals; superuser plan routes for flows and dashboards; key residue classifies state as the mapper does; duplicate retargets inputs and outputs too; queue reports its Redis version and other consumers

This commit is contained in:
2026-11-02 21:06:39 +01:00
parent 81bd7c2724
commit fa2a213631
14 changed files with 1922 additions and 41 deletions
+17
View File
@@ -4,6 +4,7 @@ FLUKSIO_TEST_REDIS_HOST (and optional PORT)."""
import os
import threading
import time
import uuid
import pytest
@@ -487,3 +488,19 @@ def test_state_is_never_moved_onto_a_key_that_exists(state):
with pytest.raises(RuntimeError, match="exists"):
state.rename_keys(HEAT)
assert state.get("warm.temp") == 2
def test_another_engine_reading_the_queue_is_seen(redis_queue):
assert redis_queue.server_version() >= (7, 0)
redis_queue.claim(1, 10)
assert redis_queue.other_consumers(10_000) == []
other = _redis_queue(redis_queue._ns, "engine-b")
try:
other.claim(1, 10)
assert redis_queue.other_consumers(10_000) == ["engine-b"]
# Gone quiet for longer than asked about: a stopped engine.
time.sleep(0.05)
assert redis_queue.other_consumers(10) == []
finally:
other.close()