@@ -522,5 +522,40 @@ it.layer(layerTest)("CheckpointStore.layer", (it) => {
522522 ) ;
523523 } ) ,
524524 ) ;
525+
526+ it . effect ( "keeps paths from signed commits under log.showSignature" , ( ) =>
527+ Effect . gen ( function * ( ) {
528+ const tmp = yield * makeTmpDir ( ) ;
529+ yield * initRepoWithCommit ( tmp ) ;
530+ const signingKey = NodePath . join ( yield * makeTmpDir ( "checkpoint-signing-key-" ) , "key" ) ;
531+ yield * ( yield * VcsProcess . VcsProcess ) . run ( {
532+ operation : "CheckpointStore.test.sshKeygen" ,
533+ command : "ssh-keygen" ,
534+ cwd : tmp ,
535+ args : [ "-q" , "-t" , "ed25519" , "-N" , "" , "-f" , signingKey ] ,
536+ timeoutMs : 10_000 ,
537+ } ) ;
538+ yield * git ( tmp , [ "config" , "gpg.format" , "ssh" ] ) ;
539+ yield * git ( tmp , [ "config" , "user.signingkey" , `${ signingKey } .pub` ] ) ;
540+ yield * git ( tmp , [ "config" , "log.showSignature" , "true" ] ) ;
541+ const checkpointStore = yield * CheckpointStore . CheckpointStore ;
542+ const threadId = ThreadId . make ( "checkpoint-authored-paths-signed" ) ;
543+ const refs = {
544+ cwd : tmp ,
545+ fromCheckpointRef : checkpointRefForThreadTurn ( threadId , 0 ) ,
546+ toCheckpointRef : checkpointRefForThreadTurn ( threadId , 1 ) ,
547+ } ;
548+ yield * checkpointStore . captureCheckpoint ( {
549+ cwd : tmp ,
550+ checkpointRef : refs . fromCheckpointRef ,
551+ } ) ;
552+ yield * writeTextFile ( NodePath . join ( tmp , "kept.txt" ) , "kept\n" ) ;
553+ yield * git ( tmp , [ "add" , "kept.txt" ] ) ;
554+ yield * git ( tmp , [ "commit" , "-S" , "-m" , "kept" ] ) ;
555+ yield * checkpointStore . captureCheckpoint ( { cwd : tmp , checkpointRef : refs . toCheckpointRef } ) ;
556+
557+ expect ( yield * checkpointStore . listAuthoredPaths ( refs ) ) . toEqual ( new Set ( [ "kept.txt" ] ) ) ;
558+ } ) ,
559+ ) ;
525560 } ) ;
526561} ) ;
0 commit comments