Enforce bounded operation guardrails
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a028de-e2c8-7732-8521-46a7fc5db82f
This commit is contained in:
parent
c384f60530
commit
26934e25b9
51 changed files with 1843 additions and 472 deletions
|
|
@ -154,21 +154,6 @@ async def assert_run_in_db(run_id: str) -> bool:
|
|||
await engine.dispose()
|
||||
|
||||
|
||||
async def assert_task_instances_in_db(run_id: str) -> bool:
|
||||
engine = create_async_engine(ACTCORE_DB_URL)
|
||||
try:
|
||||
async with AsyncSession(engine) as session:
|
||||
result = await session.execute(
|
||||
sa.text("SELECT COUNT(*) FROM task_instances WHERE run_id = :rid"),
|
||||
{"rid": run_id},
|
||||
)
|
||||
count = result.scalar()
|
||||
ok = count > 0
|
||||
return step("TaskInstances written to DB", ok, f"count={count}")
|
||||
finally:
|
||||
await engine.dispose()
|
||||
|
||||
|
||||
# ── main ─────────────────────────────────────────────────────────────────────
|
||||
|
||||
async def main() -> int:
|
||||
|
|
@ -219,7 +204,6 @@ async def main() -> int:
|
|||
|
||||
# 7. Assert DB
|
||||
results.append(await assert_run_in_db(run_id))
|
||||
results.append(await assert_task_instances_in_db(run_id))
|
||||
|
||||
finally:
|
||||
if worker_proc and worker_proc.poll() is None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue