test(pipeline): record verified limits and complete cluster recovery evidence

This commit is contained in:
2026-11-15 23:18:33 +03:00
parent ef619490f2
commit eb6d229afb
4 changed files with 5199 additions and 15 deletions
+15
View File
@@ -7,6 +7,7 @@ import multiprocessing
import resource
import threading
import time
from pathlib import Path
from uuid import uuid4
import redis
@@ -122,6 +123,20 @@ def process(job_id, fence, sender):
if not row:
sender.send({"result": "stale"})
return
# Record limits before fault hooks: a slow external inspector must not
# consume the child timeout while attempting to observe the limit.
cgroup = Path("/sys/fs/cgroup")
limits = {
name: (cgroup / name).read_text().strip()
if (cgroup / name).exists()
else "unavailable"
for name in ["memory.max", "cpu.max"]
}
limits["address_space_bytes"] = list(
resource.getrlimit(resource.RLIMIT_AS)
)
with db.connection() as conn:
event(conn, job_id, "worker_resource_limits", limits)
fault(db, job_id, "before_effect")
upstream = store.get(key=row["source_key"])
try: