test(foreman): lock in sliced-workload verdict rollup#1048
Merged
Conversation
Task 5 of the Sliced Workloads epic (defilantech#1033): confirm a sliced Workload's integrate/reconcile steps roll up to the Workload correctly. No production wiring is needed: classifyChildren is verdict-based, not kind-based, so a Succeeded + GATE-FAIL reconcile (pinned interface drift) or integrate (overlap / stale-base apply) already lands in the incomplete bucket and keeps the Workload out of Completed, while a clean GATE-PASS counts as succeeded. Adds a classifyChildren unit test over the integrate/reconcile kinds x GATE-PASS/GATE-FAIL so a future kind-special-casing change can't silently regress the slicer's reliance on this, plus a doc note recording it. Part of defilantech#1033 Signed-off-by: Christopher Maher <chris@mahercode.io>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Task 5 of the Sliced Workloads epic (#1033): confirm and lock in that a sliced Workload's
integrateandreconcilesteps roll up to the Workload correctly.No production wiring is needed.
classifyChildrenis verdict-based, not kind-based, so aSucceeded + GATE-FAILreconcile (pinned interface drift) or integrate (overlap / stale-base apply) already lands in theincompletebucket — which keeps the Workload out ofCompleted— while a cleanGATE-PASScounts assucceeded. Same mechanism as the existing verify/reviewerGATE-FAILrollup (#541/#548).Why
The epic listed a "controller rollup" task assuming new wiring. On inspection the #548 rollup already does the right thing for the new kinds; this PR makes that a tested, documented guarantee rather than an accident.
How
classifyChildrenunit test over{integrate, reconcile} x {GATE-PASS, GATE-FAIL}, asserting the clean verdicts count assucceededand the failing ones asincomplete. If a future change special-cases kinds inclassifyChildren, this fails.classifyChildrenrecording that the slicer kinds deliberately ride this kind-agnostic classification.Deferred (with
llm_sweep): thellm-flagged-advisory annotation on the Workload — that arrives when the LLM sweep is wired intorun_reconcile.Testing
go test ./internal/foreman/controller/ -run TestClassifyChildren_SlicerVerdicts— 4/4 subtests pass. Build +golangci-lintclean.Checklist
Part of #1033
Assisted-by: Claude Code (Opus 4.8); reviewed and verified by the author.