feat(reliability): graceful degradation for non-critical agent failures#243
Merged
snipcodeit merged 3 commits intomainfrom Mar 6, 2026
Merged
Conversation
Classify each Task() spawn point as critical (blocks pipeline) or advisory (pipeline can continue without). Advisory agents include comment classifier, plan-checker, and verifier. Critical agents include planner, executor, and PR creator. Unknown spawn points default to critical (fail-safe). Provides wrapAdvisoryAgent() wrapper that catches errors for advisory agents and logs warnings instead of halting the pipeline. Closes #234 (partial) Co-Authored-By: Claude Opus 4.6 <[email protected]>
…ints Annotate all 9 Task() spawn points in mgw:run pipeline with <!-- mgw:criticality=critical|advisory --> comments that classify each agent's impact on pipeline continuity. Advisory agents (4): comment-classifier, plan-checker, verifier, milestone-verifier. These provide quality-of-life improvements but the pipeline can produce a valid PR without their output. Critical agents (5): planner, executor, milestone-planner, milestone-executor, pr-creator. These produce artifacts the pipeline cannot proceed without. The retry loop in execute.md now checks agent criticality before deciding between retry/dead-letter (critical) or warn-and-continue (advisory). Uses lib/agent-criticality.cjs for classification. Closes #234 (partial) Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 task
Resolve conflicts in command files: combine diagnostic hooks (from #240) with criticality annotations (from #243). Both additions are complementary. Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 task
snipcodeit
pushed a commit
that referenced
this pull request
Mar 6, 2026
…ine-ex Resolve conflicts in command files: combine checkpoint writes (from #244) with diagnostic hooks and criticality annotations (from #240, #243). Co-Authored-By: Claude Opus 4.6 <[email protected]>
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.
Summary
lib/agent-criticality.cjsmodule with spawn point classification,wrapAdvisoryAgent()wrapper, andisAdvisory()/isCritical()query functionsCloses #234
Milestone Context
Changes
New Files
CRITICALITY_MAP: maps all 9 spawn points to critical/advisoryisAdvisory(spawnPoint)/isCritical(spawnPoint): query functionswrapAdvisoryAgent(fn, spawnPoint, context): wraps async functions with graceful degradation for advisory agentsAdvisoryAgentWarning: error subclass for degraded advisory failureslib/retry-policy.cjs(dependency from Implement configurable retry policy engine for agent failures #232, may not be merged)Modified Files
<!-- mgw:criticality=advisory -->annotation to comment classifier spawn with degradation pattern<!-- mgw:criticality=critical -->annotation to PR creator spawnClassification Matrix
Test Plan
node -e "require('./lib/agent-criticality.cjs')"exits 0node -e "const ac = require('./lib/agent-criticality.cjs'); console.log(ac.isAdvisory('comment-classifier'), ac.isCritical('executor'))"outputstrue truegrep -rn 'mgw:criticality' commands/run/returns 9 matches (4 advisory, 5 critical)node -e "console.log(require('./lib/agent-criticality.cjs').isCritical('unknown'))"outputstrue