[quality] test: pin degraded-boot branches of MergeLayersYAML/MergeLayersWithFallback + PauseIsOperatorOwned - #5746
Conversation
…yersWithFallback and PauseIsOperatorOwned Covers the previously untested branches in pkg/config/layers_yaml.go: - unparsable seed returns an error (no empty-config boot) - absent overlay uses the seed with no rejection reported - malformed (non-YAML) overlay falls back to the seed with OverlayRejected + parse-error reason - MergeLayersWithFallback keeps the seed when the last-good backup is itself unparsable (LastGoodUsed stays false) - seedHasIsPublic assumes present on an unparsable probe Also pins the PauseIsOperatorOwned predicate (pkg/config/config.go) the ACMM pack visibility sweep consults (#5706): exact 'operator' marker only. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: hive-quality <quality@hive.local>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Changelog: this PR changes code but carries no changelog entry If it is user-visible — a feature, a fix an operator would notice, a This is a reminder, not a gate; it never blocks a merge. |
clubanderson
left a comment
There was a problem hiding this comment.
Reviewed tests against pkg/config behavior rather than just accepting the assertions. The pinned degraded-boot branches match the documented MergeLayersYAML/MergeLayersWithFallback contracts (seed parse fails closed, malformed overlay falls back loudly, unparsable last-good is ignored) and PauseIsOperatorOwned is exact-marker only. go build ./... and targeted pkg/config tests pass.
|
LGTM label has been added. DetailsGit tree hash: c112364e714680c1d5391dcc625926560df2a56b |
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
Test Improvement
Adds
src/pkg/config/layers_yaml_boot_branches_test.gopinning the previously untested degraded-boot branches insrc/pkg/config/layers_yaml.goand the pause-ownership predicate insrc/pkg/config/config.go:MergeLayersYAML(58.8% → 100%):layers_guard_test.goalready covers) falls back to the seed withOverlayRejectedand a parse-error reasonMergeLayersWithFallback(→ 95.5%): an unparsable last-good backup keeps the seed and leavesLastGoodUsedfalse — no phantom recoveryseedHasIsPublic(→ 100%): unparsable probe assumeshub.is_publicpresent, preserving fleet visibility semanticsPauseIsOperatorOwned(0% → 100%): the ACMM pack visibility sweep immunity marker (ACMM pack apply re-pauses operator-created non-pack agents on every boot #5706) matches exactlyoperator— empty/pack/case-variant owners do not grant immunityThe only remaining uncovered branch in
MergeLayersWithFallbackis the seed re-unmarshal failure at layers_yaml.go:113, which is unreachable whenMergeLayersYAMLhas already parsed the same bytes.Cluster claimed:
src/pkg/config/layers_yaml.go(MergeLayersYAML, MergeLayersWithFallback, seedHasIsPublic) andsrc/pkg/config/config.go(PauseIsOperatorOwned). Disjoint from open PRs #5697 (pkg/hub wrapkey), #5705/#5728 (pkg/hub alerts/remediation), #5720 (scheduler reviewer-lane), #5711 (dashboard contribute activity), and the open lease-registry persist test PR.Verified:
go test ./pkg/config/green (94.3% pkg coverage).Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5