···739739 } else {
740740 return "", fmt.Errorf("operation %d missing raw JSON data", i)
741741 }
742742-743742 // Add newline ONLY between operations
744744- if i < len(ops)-1 {
745745- jsonlData = append(jsonlData, '\n')
746746- }
743743+ jsonlData = append(jsonlData, '\n')
747744 }
748745749746 hash := sha256.Sum256(jsonlData)
+3-8
internal/plc/bundle.go
···526526527527 // Calculate uncompressed hash from operations
528528 var jsonlData []byte
529529- for i, op := range operations {
530530- lineJSON, _ := json.Marshal(op)
531531- jsonlData = append(jsonlData, lineJSON...)
532532-533533- // Add newline ONLY if not the last operation
534534- if i < len(operations)-1 {
535535- jsonlData = append(jsonlData, '\n')
536536- }
529529+ for _, op := range operations {
530530+ jsonlData = append(jsonlData, op.RawJSON...)
531531+ jsonlData = append(jsonlData, '\n')
537532 }
538533 uncompressedHash := bm.calculateHash(jsonlData)
539534