@@ -798,13 +798,20 @@ it.layer(
798798 const { attachmentsDir } = yield * ServerConfig ;
799799 const now = "2026-01-01T00:00:00.000Z" ;
800800 const threadId = ThreadId . make ( "Thread Revert.Files" ) ;
801- const keepAttachmentId = "thread-revert-files-00000000-0000-4000-8000-000000000001" ;
802- const removeAttachmentId = "thread-revert-files-00000000-0000-4000-8000-000000000002" ;
801+ const keepAttachmentId = createAttachmentId ( threadId ) ;
802+ const removeAttachmentId = createAttachmentId ( threadId ) ;
803803 const keepTextAttachmentId = createAttachmentId ( threadId ) ;
804804 const removeTextAttachmentId = createAttachmentId ( threadId ) ;
805+ assert . isNotNull ( keepAttachmentId ) ;
806+ assert . isNotNull ( removeAttachmentId ) ;
805807 assert . isNotNull ( keepTextAttachmentId ) ;
806808 assert . isNotNull ( removeTextAttachmentId ) ;
807- if ( ! keepTextAttachmentId || ! removeTextAttachmentId ) {
809+ if (
810+ ! keepAttachmentId ||
811+ ! removeAttachmentId ||
812+ ! keepTextAttachmentId ||
813+ ! removeTextAttachmentId
814+ ) {
808815 return ;
809816 }
810817 const keepTextPath = path . join ( attachmentsDir , keepTextAttachmentId , "keep.md" ) ;
@@ -1038,13 +1045,14 @@ it.layer(Layer.fresh(makeProjectionPipelinePrefixedTestLayer("t3-projection-atta
10381045 const { attachmentsDir } = yield * ServerConfig ;
10391046 const now = "2026-01-01T00:00:00.000Z" ;
10401047 const threadId = ThreadId . make ( "Thread Delete.Files" ) ;
1041- const attachmentId = "thread-delete-files-00000000-0000-4000-8000-000000000001" ;
1048+ const attachmentId = createAttachmentId ( threadId ) ;
10421049 const otherThreadAttachmentId = "thread-delete-files-00000000-0000-4000-8000-000000000002" ;
10431050 const orphanAttachmentId = createAttachmentId ( threadId ) ;
10441051 const collidingThreadAttachmentId = createAttachmentId ( "Thread Delete/Files" ) ;
1052+ assert . isNotNull ( attachmentId ) ;
10451053 assert . isNotNull ( orphanAttachmentId ) ;
10461054 assert . isNotNull ( collidingThreadAttachmentId ) ;
1047- if ( ! orphanAttachmentId || ! collidingThreadAttachmentId ) {
1055+ if ( ! attachmentId || ! orphanAttachmentId || ! collidingThreadAttachmentId ) {
10481056 return ;
10491057 }
10501058
0 commit comments