feat(scheduler,rotation,envelope,api,ui): pgqueuer jobs and deferred injects, master rotation with handout, vault envelope, jobs page

This commit is contained in:
hh
2026-08-29 02:29:05 +02:00
parent fd69eae05d
commit bc4233977d
27 changed files with 2123 additions and 120 deletions
+6 -5
View File
@@ -568,15 +568,16 @@ async def test_read_and_bindings(world: World) -> None:
)
async def test_schedule_rows_and_parse_at(world: World) -> None:
async def test_schedule_without_scheduler_and_parse_at(world: World) -> None:
conv = await world.conversations.create(kind="master", agent="a", origin="test")
row = await world.conversations.schedule(conv, "+15m", "push X")
delta = (row.execute_at.replace(tzinfo=UTC) - datetime.now(UTC)).total_seconds()
assert 14 * 60 < delta <= 15 * 60
assert [s.text for s in await world.conversations.schedules(conv)] == ["push X"]
with pytest.raises(RuntimeError, match="no scheduler"):
await world.conversations.schedule(conv, "+15m", "push X")
assert await world.conversations.schedules(conv) == []
assert parse_at("2026-09-01T10:00:00+02:00") == datetime(
2026, 9, 1, 8, 0, tzinfo=UTC
)
delta = (parse_at("+15m") - datetime.now(UTC)).total_seconds()
assert 14 * 60 < delta <= 15 * 60
with pytest.raises(ValueError, match="Invalid isoformat"):
parse_at("tomorrow")