@@ -56,6 +56,21 @@ then push those fixes back to the PR branch.
5656
5757## Step-by-step instructions
5858
59+ ### 0. Circuit breaker — check attempt count
60+
61+ Before doing anything else, count how many ` [copilot-fix] ` commits are already
62+ on this branch:
63+
64+ ``` bash
65+ git log --oneline | grep -c ' \[copilot-fix\]' || true
66+ ```
67+
68+ If the count is ** 3 or more** , the maximum number of automated fix attempts has
69+ been reached. Call ` noop ` immediately with the message:
70+ "Max fix attempts (3) reached. Human review required."
71+
72+ Do NOT attempt any further fixes.
73+
5974### 1. Identify the failing CI run
6075
6176Use the ` agentic-workflows ` tools to find the most recent failed workflow run
@@ -97,17 +112,21 @@ Use `cat`, `grep`, and `find` to explore the repository before editing.
97112### 5. Push your fixes
98113
99114After making all edits, push them to the PR branch using
100- ` push-to-pull-request-branch ` .
115+ ` push-to-pull-request-branch ` . Use a commit message that includes ` [copilot-fix] `
116+ so the circuit breaker in step 0 can count previous attempts, e.g.:
117+ ` fix: update call sites for marshmallow 3.26.2 API change [copilot-fix] `
101118
102119Then remove the ` renovate-fix-needed ` label from the PR using ` remove-labels `
103120to signal that the fix has been applied. A separate workflow will detect the
104121label removal and push an empty commit to re-trigger CI.
105122
106123### 6. If no action is needed
107124
108- If the CI run is already green (the label was applied redundantly), or if you
109- cannot determine a safe fix, call ` noop ` with a clear explanation.
125+ Call ` noop ` with a clear explanation if:
126+ - The CI run is already green (label applied redundantly)
127+ - You cannot determine a safe fix
128+ - The max attempt count was reached (step 0)
110129
111130** Never** guess at a fix or make changes you are not confident about.
112- If you are unsure, call ` noop ` and leave a comment explaining what you found.
131+ If you are unsure, call ` noop ` and describe exactly what you found in the logs .
113132
0 commit comments