@@ -73,6 +73,7 @@ describe("dedupeLatestChildCompletionRows", () => {
7373 childSessionKey,
7474 task : "older" ,
7575 createdAt : 1_000 ,
76+ execution : { } ,
7677 } ;
7778 const newer = { ...older , runId : "run-newer" , generation : 2 , task : "newer" } ;
7879
@@ -376,7 +377,7 @@ describe("buildChildCompletionFindings", () => {
376377 task : `worker ${ index } ` ,
377378 createdAt : index ,
378379 completion : { resultText : "🚀" . repeat ( 60_000 ) } ,
379- outcome : { status : "ok" as const } ,
380+ execution : { outcome : { status : "ok" as const } } ,
380381 } ) ) ,
381382 ) ;
382383
@@ -399,21 +400,23 @@ describe("buildChildCompletionFindings", () => {
399400 task : "first large result" ,
400401 createdAt : 1 ,
401402 completion : { resultText : "<" . repeat ( 100_000 ) } ,
402- outcome : { status : "ok" } ,
403+ execution : { outcome : { status : "ok" } } ,
403404 } ,
404405 {
405406 childSessionKey : "agent:main:subagent:second" ,
406407 task : "second large result" ,
407408 createdAt : 2 ,
408409 completion : { resultText : "<" . repeat ( 100_000 ) } ,
409- outcome : { status : "ok" } ,
410+ execution : { outcome : { status : "ok" } } ,
410411 } ,
411412 {
412413 childSessionKey : "agent:main:subagent:failure" ,
413414 task : "later actionable failure" ,
414415 createdAt : 3 ,
415416 completion : { resultText : "Permission required." } ,
416- outcome : { status : "error" , error : "Writable session authorization required." } ,
417+ execution : {
418+ outcome : { status : "error" , error : "Writable session authorization required." } ,
419+ } ,
417420 } ,
418421 ] ) ;
419422
@@ -431,14 +434,16 @@ describe("buildChildCompletionFindings", () => {
431434 task : "earlier oversized success" ,
432435 createdAt : 1 ,
433436 completion : { resultText : "<" . repeat ( 100_000 ) } ,
434- outcome : { status : "ok" } ,
437+ execution : { outcome : { status : "ok" } } ,
435438 } ,
436439 {
437440 childSessionKey : "agent:main:subagent:failure" ,
438441 task : "later oversized failure" ,
439442 createdAt : 2 ,
440443 completion : { resultText : "<" . repeat ( 100_000 ) } ,
441- outcome : { status : "error" , error : "Writable session authorization required." } ,
444+ execution : {
445+ outcome : { status : "error" , error : "Writable session authorization required." } ,
446+ } ,
442447 } ,
443448 ] ) ;
444449
@@ -457,7 +462,7 @@ describe("buildChildCompletionFindings", () => {
457462 task : "child task" ,
458463 createdAt : 1 ,
459464 completion : { resultText : "<" . repeat ( 100_000 ) } ,
460- outcome : { status : "error" , error : "E" . repeat ( 20_000 ) } ,
465+ execution : { outcome : { status : "error" , error : "E" . repeat ( 20_000 ) } } ,
461466 } ,
462467 ] ) ;
463468
@@ -476,7 +481,7 @@ describe("buildChildCompletionFindings", () => {
476481 task : "silent task" ,
477482 createdAt : 1 ,
478483 completion : { resultText : "ANNOUNCE_SKIP" } ,
479- outcome : { status : "ok" } ,
484+ execution : { outcome : { status : "ok" } } ,
480485 } ,
481486 ] ) ;
482487
@@ -490,7 +495,7 @@ describe("buildChildCompletionFindings", () => {
490495 task : "silent task" ,
491496 createdAt : 1 ,
492497 completion : { resultText : "ANNOUNCE_SKIP" } ,
493- outcome : { status : "error" , error : "boom" } ,
498+ execution : { outcome : { status : "error" , error : "boom" } } ,
494499 } ,
495500 ] ) ;
496501
@@ -505,7 +510,7 @@ describe("buildChildCompletionFindings", () => {
505510 task : "child task" ,
506511 createdAt : 1 ,
507512 frozenResultText : "final child output" ,
508- outcome : { status : "ok" } ,
513+ execution : { outcome : { status : "ok" } } ,
509514 } ,
510515 ] ) ;
511516
@@ -525,7 +530,7 @@ describe("buildChildCompletionFindings", () => {
525530 frozenResultText : "delivery payload output" ,
526531 } ,
527532 } ,
528- outcome : { status : "ok" } ,
533+ execution : { outcome : { status : "ok" } } ,
529534 } ,
530535 ] ) ;
531536
@@ -543,7 +548,7 @@ describe("buildChildCompletionFindings", () => {
543548 resultText : "NO_REPLY" ,
544549 fallbackResultText : "findings captured before the wake" ,
545550 } ,
546- outcome : { status : "ok" } ,
551+ execution : { outcome : { status : "ok" } } ,
547552 } ,
548553 ] ) ;
549554
@@ -563,7 +568,7 @@ describe("buildChildCompletionFindings", () => {
563568 resultText,
564569 fallbackResultText : "stale findings" ,
565570 } ,
566- outcome : { status : "ok" } ,
571+ execution : { outcome : { status : "ok" } } ,
567572 } ,
568573 ] ) ;
569574
@@ -578,14 +583,14 @@ describe("buildChildCompletionFindings", () => {
578583 task : "silent task" ,
579584 createdAt : 1 ,
580585 completion : { resultText : "ANNOUNCE_SKIP" } ,
581- outcome : { status : "ok" } ,
586+ execution : { outcome : { status : "ok" } } ,
582587 } ,
583588 {
584589 childSessionKey : "agent:main:subagent:visible" ,
585590 task : "visible task" ,
586591 createdAt : 2 ,
587592 completion : { resultText : "actual output" } ,
588- outcome : { status : "ok" } ,
593+ execution : { outcome : { status : "ok" } } ,
589594 } ,
590595 ] ) ;
591596
@@ -598,9 +603,8 @@ describe("buildChildCompletionFindings", () => {
598603 childSessionKey : "agent:main:subagent:z" ,
599604 task : "Z task" ,
600605 createdAt : 1_000 ,
601- endedAt : 2_000 ,
602606 completion : { resultText : "Z result" } ,
603- outcome : { status : "ok" as const } ,
607+ execution : { endedAt : 2_000 , outcome : { status : "ok" as const } } ,
604608 } ;
605609 const earlierKey = {
606610 ...laterKey ,
0 commit comments