@@ -158,6 +158,17 @@ func TestParseFrontmatterConfig(t *testing.T) {
158158 }
159159 })
160160
161+ t .Run ("rejects timeout-minutes as float" , func (t * testing.T ) {
162+ frontmatter := map [string ]any {
163+ "timeout-minutes" : 5.5 ,
164+ }
165+
166+ _ , err := ParseFrontmatterConfig (frontmatter )
167+ if err == nil {
168+ t .Error ("expected error for float timeout-minutes, got nil" )
169+ }
170+ })
171+
161172 t .Run ("rejects timeout-minutes as free-form string" , func (t * testing.T ) {
162173 frontmatter := map [string ]any {
163174 "timeout-minutes" : "not-an-expression" ,
@@ -494,6 +505,25 @@ func TestFrontmatterConfigBackwardCompatibility(t *testing.T) {
494505 }
495506 })
496507
508+ t .Run ("round-trip preserves timeout-minutes expression" , func (t * testing.T ) {
509+ frontmatter := map [string ]any {
510+ "name" : "test-workflow" ,
511+ "engine" : "copilot" ,
512+ "timeout-minutes" : "${{ inputs.timeout }}" ,
513+ }
514+
515+ config , err := ParseFrontmatterConfig (frontmatter )
516+ if err != nil {
517+ t .Fatalf ("parse error: %v" , err )
518+ }
519+
520+ reconstructed := config .ToMap ()
521+
522+ if reconstructed ["timeout-minutes" ] != "${{ inputs.timeout }}" {
523+ t .Errorf ("timeout-minutes expression mismatch: got %v (%T)" , reconstructed ["timeout-minutes" ], reconstructed ["timeout-minutes" ])
524+ }
525+ })
526+
497527 t .Run ("round-trip preserves labels" , func (t * testing.T ) {
498528 frontmatter := map [string ]any {
499529 "name" : "test-workflow" ,
0 commit comments