Skip to content

[Code Quality] Add missing tests for compiler_yaml_runtime_setup.go (no _test.go file) #48802

Description

@github-actions

Description

pkg/workflow/compiler_yaml_runtime_setup.go (434 lines) has zero test coverage - there is no corresponding _test.go file at all. An automated code-quality scan scored it 58/100 (Needs Work), the lowest of the files reviewed. Its most complex function, addCustomStepsWithRuntimeInsertion (81 lines), handles multiple branching insertion strategies with no dedicated test coverage.

Suggested Changes

  • Create pkg/workflow/compiler_yaml_runtime_setup_test.go.
  • Add table-driven tests covering addCustomStepsWithRuntimeInsertion's branching strategies (each insertion mode/path).
  • Cover the remaining exported/unexported helpers in the file with at least basic happy-path and edge-case tests.

Files Affected

  • pkg/workflow/compiler_yaml_runtime_setup.go
  • pkg/workflow/compiler_yaml_runtime_setup_test.go (new)

Success Criteria

  • New test file exists with coverage for addCustomStepsWithRuntimeInsertion and other functions in this file.
  • go test ./pkg/workflow/... passes.
  • File no longer flagged as having zero test coverage in subsequent code-quality scans.

Source

Extracted from Daily Compiler Code Quality Report - 2026-07-29 discussion #48759 (#48759)

Priority

Medium - untested complex branching logic in the compiler is a maintainability/regression risk.

🔍 Task mining by Discussion Task Miner - Code Quality Improvement Agent · sonnet50 · 29.8 AIC · ⌖ 4.66 AIC · ⊞ 9.8K · ◷

  • expires on Jul 29, 2026, 11:42 PM UTC-08:00

Activity

  1. github-actions commented on Jul 30, 2026

    @github-actions
    ContributorAuthor

    This issue was automatically closed because it expired on 2026-07-30T07:42:18.224Z.

    Closed by Workflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions