History is kept by flow id: runs, cascades, rollups and events file the id in their flow column and nodes as <flow id>.<node>, the API answers flow plus flow_name and shows and takes nodes as <key>.<node>; events carry flow_id from the moment they are published; run queue items, the stage cache and cached curves keep ids and keys apart; endpoints, the brain graph, device bindings and search name the id to open
This commit is contained in:
@@ -20,12 +20,14 @@ def test_a_stored_instant_comes_back_aware_and_in_utc() -> None:
|
||||
stamp = datetime(2026, 8, 21, 15, 30, tzinfo=timezone(timedelta(hours=2)))
|
||||
with Session(engine) as session:
|
||||
session.add(
|
||||
EngineEvent(ts=stamp, type="node_error", flow="tz", node="n", detail="")
|
||||
EngineEvent(ts=stamp, type="node_error", flow_id="tz", node="n", detail="")
|
||||
)
|
||||
session.commit()
|
||||
|
||||
with Session(engine) as session:
|
||||
stored = session.exec(select(EngineEvent).where(EngineEvent.flow == "tz")).one()
|
||||
stored = session.exec(
|
||||
select(EngineEvent).where(EngineEvent.flow_id == "tz")
|
||||
).one()
|
||||
assert stored.ts.tzinfo is not None
|
||||
assert stored.ts.utcoffset() == timedelta(0)
|
||||
assert stored.ts == stamp
|
||||
|
||||
Reference in New Issue
Block a user