fix(demo): anchor seeded dates to the real reset moment

Booking/inspection/maintenance/outbox dates were authored as absolute
timestamps around a fixed 2026-08-01 anchor and never re-anchored at
seed/reset time, so demo scenarios (e.g. BK-DEMO-RETURN) silently drifted
into the past. Every reset now shifts seeded dates by (today - authored
anchor); dashboard's "today" filter uses real wall-clock time instead of
the now-removed frozen demo_today setting. Adds seed-validation tests
proving scenarios S1/S2/S4/S5 are present and internally consistent after
every reset.
This commit is contained in:
NuklearRabbit
2026-08-03 13:08:02 +02:00
parent 7c94eb9e87
commit 8989ffb23c
9 changed files with 218 additions and 15 deletions
+10 -2
View File
@@ -99,8 +99,16 @@ def demo_reset(
actor_label=user.display_name,
action="demo_reset",
entity_type="system",
metadata={"counts": result.counts},
metadata={
"counts": result.counts,
"anchor_date": result.anchor_date.isoformat(),
},
)
db.commit()
response.delete_cookie(settings.session_cookie_name)
return {"status": "reset", "counts": result.counts}
return {
"status": "reset",
"counts": result.counts,
"anchor_date": result.anchor_date.isoformat(),
"seeded_at": result.seeded_at.isoformat(),
}