@@ -22,7 +22,7 @@ func TestRepoMemoryConfigDefault(t *testing.T) {
2222 }
2323
2424 compiler := NewCompiler ()
25- config , err := compiler .extractRepoMemoryConfig (toolsConfig )
25+ config , err := compiler .extractRepoMemoryConfig (toolsConfig , "my-workflow" )
2626 if err != nil {
2727 t .Fatalf ("Failed to extract repo-memory config: %v" , err )
2828 }
@@ -40,8 +40,8 @@ func TestRepoMemoryConfigDefault(t *testing.T) {
4040 t .Errorf ("Expected ID 'default', got '%s'" , memory .ID )
4141 }
4242
43- if memory .BranchName != "memory/default " {
44- t .Errorf ("Expected branch name 'memory/default ', got '%s'" , memory .BranchName )
43+ if memory .BranchName != "memory/my-workflow " {
44+ t .Errorf ("Expected branch name 'memory/my-workflow ', got '%s'" , memory .BranchName )
4545 }
4646
4747 if memory .MaxFileSize != 10240 {
@@ -74,7 +74,7 @@ func TestRepoMemoryConfigObject(t *testing.T) {
7474 }
7575
7676 compiler := NewCompiler ()
77- config , err := compiler .extractRepoMemoryConfig (toolsConfig )
77+ config , err := compiler .extractRepoMemoryConfig (toolsConfig , "" )
7878 if err != nil {
7979 t .Fatalf ("Failed to extract repo-memory config: %v" , err )
8080 }
@@ -127,7 +127,7 @@ func TestRepoMemoryConfigArray(t *testing.T) {
127127 }
128128
129129 compiler := NewCompiler ()
130- config , err := compiler .extractRepoMemoryConfig (toolsConfig )
130+ config , err := compiler .extractRepoMemoryConfig (toolsConfig , "" )
131131 if err != nil {
132132 t .Fatalf ("Failed to extract repo-memory config: %v" , err )
133133 }
@@ -183,7 +183,7 @@ func TestRepoMemoryConfigDuplicateIDs(t *testing.T) {
183183 }
184184
185185 compiler := NewCompiler ()
186- _ , err = compiler .extractRepoMemoryConfig (toolsConfig )
186+ _ , err = compiler .extractRepoMemoryConfig (toolsConfig , "" )
187187 if err == nil {
188188 t .Fatal ("Expected error for duplicate memory IDs, got nil" )
189189 }
@@ -395,7 +395,7 @@ func TestRepoMemoryMaxFileSizeValidation(t *testing.T) {
395395 }
396396
397397 compiler := NewCompiler ()
398- config , err := compiler .extractRepoMemoryConfig (toolsConfig )
398+ config , err := compiler .extractRepoMemoryConfig (toolsConfig , "" )
399399
400400 if tt .wantError {
401401 if err == nil {
@@ -465,7 +465,7 @@ func TestRepoMemoryMaxFileSizeValidationArray(t *testing.T) {
465465 }
466466
467467 compiler := NewCompiler ()
468- config , err := compiler .extractRepoMemoryConfig (toolsConfig )
468+ config , err := compiler .extractRepoMemoryConfig (toolsConfig , "" )
469469
470470 if tt .wantError {
471471 if err == nil {
@@ -554,7 +554,7 @@ func TestRepoMemoryMaxFileCountValidation(t *testing.T) {
554554 }
555555
556556 compiler := NewCompiler ()
557- config , err := compiler .extractRepoMemoryConfig (toolsConfig )
557+ config , err := compiler .extractRepoMemoryConfig (toolsConfig , "" )
558558
559559 if tt .wantError {
560560 if err == nil {
@@ -624,7 +624,7 @@ func TestRepoMemoryMaxFileCountValidationArray(t *testing.T) {
624624 }
625625
626626 compiler := NewCompiler ()
627- config , err := compiler .extractRepoMemoryConfig (toolsConfig )
627+ config , err := compiler .extractRepoMemoryConfig (toolsConfig , "" )
628628
629629 if tt .wantError {
630630 if err == nil {
@@ -778,15 +778,15 @@ func TestBranchPrefixInConfig(t *testing.T) {
778778 require .NoError (t , err , "Failed to parse tools config" )
779779
780780 compiler := NewCompiler ()
781- config , err := compiler .extractRepoMemoryConfig (toolsConfig )
781+ config , err := compiler .extractRepoMemoryConfig (toolsConfig , "my-workflow" )
782782 require .NoError (t , err , "Failed to extract repo-memory config" )
783783 require .NotNil (t , config , "Expected non-nil config" )
784784
785785 assert .Equal (t , "campaigns" , config .BranchPrefix , "Expected branch-prefix 'campaigns'" )
786786 assert .Len (t , config .Memories , 1 , "Expected 1 memory" )
787787
788788 memory := config .Memories [0 ]
789- assert .Equal (t , "campaigns/default " , memory .BranchName , "Expected branch name 'campaigns/default '" )
789+ assert .Equal (t , "campaigns/my-workflow " , memory .BranchName , "Expected branch name 'campaigns/my-workflow '" )
790790}
791791
792792// TestBranchPrefixInArrayConfig tests branch-prefix in array configuration
@@ -807,7 +807,7 @@ func TestBranchPrefixInArrayConfig(t *testing.T) {
807807 require .NoError (t , err , "Failed to parse tools config" )
808808
809809 compiler := NewCompiler ()
810- config , err := compiler .extractRepoMemoryConfig (toolsConfig )
810+ config , err := compiler .extractRepoMemoryConfig (toolsConfig , "" )
811811 require .NoError (t , err , "Failed to extract repo-memory config" )
812812 require .NotNil (t , config , "Expected non-nil config" )
813813
@@ -832,7 +832,7 @@ func TestBranchPrefixWithExplicitBranchName(t *testing.T) {
832832 require .NoError (t , err , "Failed to parse tools config" )
833833
834834 compiler := NewCompiler ()
835- config , err := compiler .extractRepoMemoryConfig (toolsConfig )
835+ config , err := compiler .extractRepoMemoryConfig (toolsConfig , "" )
836836 require .NoError (t , err , "Failed to extract repo-memory config" )
837837 require .NotNil (t , config , "Expected non-nil config" )
838838
@@ -866,7 +866,7 @@ func TestInvalidBranchPrefixRejectsConfig(t *testing.T) {
866866 require .NoError (t , err , "Failed to parse tools config" )
867867
868868 compiler := NewCompiler ()
869- config , err := compiler .extractRepoMemoryConfig (toolsConfig )
869+ config , err := compiler .extractRepoMemoryConfig (toolsConfig , "" )
870870 require .Error (t , err , "Expected error for invalid branch-prefix: %s" , tt .prefix )
871871 assert .Nil (t , config , "Expected nil config on error" )
872872 })
0 commit comments