evals(postmortem): notice probes target a grouped unit (per-group split on main; ungrouped tasks already report individually)

This commit is contained in:
Teknium
2026-09-06 12:12:09 -07:00
parent 14c3101256
commit 8f2167342f
2 changed files with 6 additions and 2 deletions
@@ -27,7 +27,9 @@ dd._Batch.run_child = fake_run_child
# Background dispatch requires an async-capable session; emulate a CLI session key.
import tools.async_delegation as ad
t0 = time.time()
out = dt.delegate_task(tasks=[{"goal": "fail fast on a simulated 401 error"}, {"goal": "slow successful worker number one"}, {"goal": "slow successful worker number two"}], background=True, parent_agent=parent)
out = dt.delegate_task(# Grouped: siblings share ONE final result, so a dead sibling would otherwise wait for the slowest. (Ungrouped tasks are
# their own async unit since the per-group split landed on main and already report as they finish.)
tasks=[{"goal": "fail fast on a simulated 401 error", "group": "g"}, {"goal": "slow successful worker number one", "group": "g"}, {"goal": "slow successful worker number two", "group": "g"}], background=True, parent_agent=parent)
print("dispatch:", json.dumps(json.loads(out))[:160])
seen = []
deadline = time.time() + 30
@@ -35,9 +35,11 @@ class Sink(GatewayNotificationsMixin):
return True
def batch_run(did, gates):
tasks=[{'goal':f'worker task {i}'} for i in range(3)]
tasks=[{'goal':f'worker task {i}','group':'g'} for i in range(3)] # grouped: one shared final, so the early notice matters
children=[(i,t,SimpleNamespace()) for i,t in enumerate(tasks)]
b=dd._Batch(tasks,children,SimpleNamespace(quiet_mode=True),{'model':'offline'},None,'leaf',3,did,[],[], '', '',None,None,time.monotonic())
# Since the per-group split on main, a detached unit carries its registry id; the notice keys on it.
if hasattr(b,'unit_id'): b.unit_id=did; b.group='g'
def child(i,t,c):
assert gates[i].wait(15)
return {'task_index':i,'status':'error' if i<2 else 'completed','error':'offline failure' if i<2 else None,'summary':None if i<2 else 'FINISHED_SUCCESS','duration_seconds':0.1}