@@ -939,6 +939,11 @@ it("reports redaction follow-ups on migration and retry", async () => {
939939 destination,
940940 contents : "learnings" ,
941941 } )
942+ const anotherExport = await store . exportRecords ( human ( secondScope ) , {
943+ purpose : "instruction" ,
944+ destination : "private/exports/other.json" ,
945+ contents : "learnings" ,
946+ } )
942947 const redacted = await store . redactHubComment ( human ( firstScope ) , 101 )
943948 assert . ok ( ! redacted . exportsToFollowUp . some ( ( item ) => item . id === exported . manifest . id ) )
944949 const jsonlRepo = checkout ( "jsonl-redaction-follow-ups" )
@@ -1008,6 +1013,13 @@ it("reports redaction follow-ups on migration and retry", async () => {
10081013 ( item ) => item . id === exported . manifest . id && item . destination === destination ,
10091014 ) ,
10101015 )
1016+ assert . ok (
1017+ followUps . exportsToFollowUp . some (
1018+ ( item ) =>
1019+ item . id === anotherExport . manifest . id &&
1020+ item . destination === "private/exports/other.json" ,
1021+ ) ,
1022+ )
10111023 const retry = ok ( repo , migrate , { failLookup : true } )
10121024 assert . deepEqual ( retry . redactionFollowUps , followUps )
10131025 const retryText = cli ( repo , migrate , { failLookup : true , json : false } )
@@ -1059,6 +1071,25 @@ it("reports redaction follow-ups on migration and retry", async () => {
10591071 `Copied migration retry should include ${ value } ` ,
10601072 )
10611073 assert . ok ( ! copiedRetryText . stdout . includes ( "\u001b" ) )
1074+ const defaultRetry = [ "migrate-scope" , "--offline" ]
1075+ const defaultRetryJson = ok ( jsonlRepo , defaultRetry , { failLookup : true } )
1076+ assert . equal ( defaultRetryJson . alreadyMigrated , true )
1077+ assert . deepEqual ( defaultRetryJson . redactionFollowUps , followUps )
1078+ const defaultRetryText = cli ( jsonlRepo , defaultRetry , { failLookup : true , json : false } )
1079+ assert . equal ( defaultRetryText . status , 0 , defaultRetryText . stderr )
1080+ for ( const id of followUps . memoriesNeedingRebuild )
1081+ assert . ok ( defaultRetryText . stdout . includes ( id ) , `Default retry should include ${ id } ` )
1082+ for ( const item of followUps . exportsToFollowUp ) {
1083+ assert . ok (
1084+ defaultRetryText . stdout . includes ( item . id ) ,
1085+ `Default retry should include ${ item . id } ` ,
1086+ )
1087+ assert . ok (
1088+ defaultRetryText . stdout . includes ( JSON . stringify ( item . destination ) ) ,
1089+ `Default retry should include the quoted destination for ${ item . id } ` ,
1090+ )
1091+ }
1092+ assert . ok ( ! defaultRetryText . stdout . includes ( "\u001b" ) )
10621093 assert . deepEqual (
10631094 ok ( jsonlRepo , [ "status" ] , { failLookup : true } ) . migrationRedactionFollowUps ,
10641095 followUps ,
0 commit comments