feat(foreman): opt-in coder escalation on capability-wall failures (#1108)#1128
Open
Defilan wants to merge 1 commit into
Open
feat(foreman): opt-in coder escalation on capability-wall failures (#1108)#1128Defilan wants to merge 1 commit into
Defilan wants to merge 1 commit into
Conversation
…efilantech#1108) Add Workload.spec.escalateOnFailure (default false, preserving today's NO-GO-only escalation). When set and escalationCoderAgentRef is configured, a terminal STUCK-LOOP-DETECTED, INCOMPLETE, or ERROR from the base coder also re-attempts the issue on the escalation coder, so an unattended heterogeneous fleet keeps making progress instead of stalling for a human. ALREADY-RESOLVED and NEEDS-VERIFICATION never escalate; a distinct condition reason surfaces why the escalation fired. Fixes defilantech#1108 Signed-off-by: Christopher Maher <chris@mahercode.io>
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
Adds
Workload.spec.escalateOnFailure(defaultfalse). When set andescalationCoderAgentRefis configured, a terminal STUCK-LOOP-DETECTED, INCOMPLETE, or ERROR from the base coder also re-attempts the issue on the escalation coder — not just a capability NO-GO.Why
Today escalation fires only on a capability NO-GO. The failure modes where a mid-size coder actually hits its ceiling (stuck-loop, model-decided INCOMPLETE, harness ERROR) leave the Workload dead with no usable branch, waiting for a human to hand-queue a retry on a bigger model. On a heterogeneous fleet (small fast coder + larger fallback), an unattended batch should keep making progress. (Live example: a batch run stuck-looped on one issue with no branch — exactly what this automates.)
How
Workload.spec.escalateOnFailure *boolonWorkloadSpec, default off preserves today's NO-GO-only behavior.shouldEscalateCoderOnFailurehelper: true forSTUCK-LOOP-DETECTED/ERROR(topOutcome strings) and INCOMPLETE (verdict); ALWAYS false forALREADY-RESOLVEDandNEEDS-VERIFICATION.coderEscalationSteps: escalate on the existing NO-GO trigger OR (opt-in + failure trigger). Still gated onescalationCoderAgentRef != nil, so single-model fleets are unaffected. A distinct condition reason surfaces why the escalation fired.AgenticTaskVerdictenum values (STUCK-LOOP/ERROR are outcome strings, not verdicts).Testing
TestShouldEscalateCoderOnFailureplusTestCoderEscalationSteps_EscalateOnFailure_{True,False,NeverEscalate,Mixed}; existing NO-GO / off-when-unset cases still pass.go build,go vetclean;make manifests && make generate && make foreman-chart-crdsproduce no drift.Checklist
make foreman-chart-crds) with no driftFixes #1108AI assistance
Implemented via the Foreman agentic-coding harness (GO), then rebased onto current
main, verified, and finalized by the author. Band-3 disclosure per the project's AI-assisted contribution policy.Fixes #1108