Fix CI regressions and stabilize tests

This commit is contained in:
Codex Agent
2025-11-17 10:06:35 -07:00
parent 42233073bc
commit 7b63b5a30b
16 changed files with 575 additions and 583 deletions

View File

@@ -150,7 +150,7 @@ func Merge3Way(outputPath, basePath, leftPath, rightPath string, debug bool) err
if err := outFile.Sync(); err != nil {
fmt.Fprintf(os.Stderr, "Warning: failed to sync output file: %v\n", err)
}
if content, err := os.ReadFile(outputPath); err == nil {
if content, err := os.ReadFile(outputPath); err == nil { // #nosec G304 -- debug output reads file created earlier in same function
lines := 0
fmt.Fprintf(os.Stderr, "Output file preview (first 10 lines):\n")
for _, line := range splitLines(string(content)) {
@@ -195,7 +195,7 @@ func splitLines(s string) []string {
}
func readIssues(path string) ([]Issue, error) {
file, err := os.Open(path)
file, err := os.Open(path) // #nosec G304 -- path supplied by CLI flag and validated upstream
if err != nil {
return nil, fmt.Errorf("failed to open file: %w", err)
}