Implement post-triage operational hardening

This commit is contained in:
2026-06-04 12:15:07 +02:00
parent 8a33ec44b6
commit 20d4f26166
11 changed files with 775 additions and 31 deletions

View File

@@ -377,6 +377,7 @@ async def emit_tasks(payload: dict) -> list[str]:
Session = _get_session_factory()
refs: list[str] = []
errors: list[str] = []
async with Session() as session:
async with session.begin():
for spec_dict in task_specs_raw:
@@ -411,6 +412,11 @@ async def emit_tasks(payload: dict) -> list[str]:
)
session.add(log_row)
except Exception as exc:
message = f"{spec.source_type}:{spec.source_id}: {exc}"
errors.append(message)
activity.logger.warning("emit_tasks: sink.emit failed — %s", exc)
if errors:
raise RuntimeError(f"task emission sink failure: {errors!r}")
return refs