Skip to content

Commit fd1102a

Browse files
aledbfclaude
andcommitted
test(cli): edge-case unit tests for pure helpers; raise coverage ratchet
internal/cli is the largest, least-covered package (orchestration) — but many of its helpers are pure and were untested. Add hermetic, table-driven, edge-case tests for 19 of them: version parsing (getFeatureIdWithoutVersion incl. digest pins and registry ports, highestSatisfyingTag, majorOf), arg handling (appPortPublishArgs, splitExecArgs with the `--`/value-flag rules, envSliceToMap with `=`-in-value and last-wins), formatting (textTable ragged rows/trailing trim, encloseStringInBox rune width), config (buildArgs/OptionsFromConfig nil paths, featureKeyOrderFromFile order, orderedFeatureKeys never-drop invariant), and misc (folderImageName determinism, addFeatureOption non-map, ociAnnotationID bad JSON, appliedAny, proxyEnvFromEnviron). internal/cli 29.1% -> 33.1%, total 50.3% -> 52.6% (hermetic lane). Raise the ratchet floors accordingly (COVERAGE_MIN 48->52, cli 28->32). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent c8caff1 commit fd1102a

2 files changed

Lines changed: 414 additions & 2 deletions

File tree

Taskfile.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ vars:
1010
LDFLAGS: -s -w -X {{.MODULE}}/internal/product.version={{.VERSION}} -X {{.MODULE}}/internal/product.name={{.BINARY}}
1111
# Minimum hermetic-unit statement coverage the `coverage` gate enforces. Set as a
1212
# ratchet just below the current level; raise it as coverage grows (never lower).
13-
COVERAGE_MIN: "48"
13+
COVERAGE_MIN: "52"
1414
# Package ratchets prevent well-covered parsing packages from masking a
1515
# regression in the orchestration layers. Keep these just below the measured
1616
# hermetic baseline and only move them upward.
17-
COVERAGE_CLI_MIN: "28"
17+
COVERAGE_CLI_MIN: "32"
1818
COVERAGE_DOCKER_MIN: "77"
1919
COVERAGE_LIFECYCLE_MIN: "73"
2020
COVERAGE_OCI_MIN: "85"

0 commit comments

Comments
 (0)