@@ -25,7 +25,9 @@ A finding may be converted to a fix only if all hold:
2525 | ` packages/data-designer-config ` | ` make test-config ` |
2626 | ` packages/data-designer-engine ` | ` make test-engine ` |
2727 | ` packages/data-designer ` | ` make test-interface ` |
28- - ** Single concern** : one finding per PR.
28+ - ** Single concern** : one finding per PR, except suite-declared batchable
29+ mechanical fixes. A batch must share one suite/category and satisfy the
30+ localized-fix bar as a single combined diff.
2931- ** Allowlisted paths** : matches the suite's path allowlist.
3032
3133If the top-ranked candidate fails the bar, try the next. If none of the top
@@ -79,6 +81,9 @@ Each daily recipe maintains two arrays in
7981Also: ` draft_until_proven ` (boolean, per-suite, default ` true ` for
8082code-quality and unset elsewhere) controls draft-PR mode.
8183
84+ Batch PRs still record one ` attempted_fixes ` entry per finding. Multiple
85+ entries may point to the same ` pr_number ` and ` branch ` .
86+
8287### ` fix_backlog ` rules (audit phase populates this)
8388
8489- Append every detected finding in an eligible category. If ` id ` is already
@@ -90,6 +95,9 @@ code-quality and unset elsewhere) controls draft-PR mode.
9095- Cap at 200 entries (drop oldest by ` first_seen ` ).
9196- Populated ** before** the ` known_issues ` filter so fixable findings persist
9297 even when their report row is suppressed for being unchanged.
98+ - Batchable categories must include enough information in ` data ` to group
99+ siblings safely. For package-scoped Python fixes, derive ` test_target ` from
100+ the package containing the source file.
93101
94102### ` attempted_fixes ` rules
95103
@@ -101,9 +109,9 @@ code-quality and unset elsewhere) controls draft-PR mode.
101109 ` open ` attempts that have a ` pr_number ` : query the PR and flip the
102110 attempt to ` merged ` or ` closed ` if it is no longer open. Then recover
103111 from crashes that left state un-updated: list open PRs (` gh pr list ` )
104- whose bodies contain the
105- ` <!-- agentic-ci finding=<id> suite=<suite> --> ` marker , parse out
106- each ` <id> ` , and back-fill any missing ` attempted_fixes ` entries with
112+ whose bodies contain one or more
113+ ` <!-- agentic-ci finding=<id> suite=<suite> --> ` markers , parse out
114+ every ` <id> ` , and back-fill any missing ` attempted_fixes ` entries with
107115 ` outcome: "open" ` and the parsed ` pr_number ` and ` branch ` .
108116- Prune: drop ` merged ` entries older than 90 days. Do ** not** prune
109117 ` closed ` or ` abandoned ` entries by age — pruning a single-strike entry
@@ -175,7 +183,7 @@ Earlier criteria override later ones:
175183
1761844 . ** Recency** — newer findings rank above long-standing ones.
177185
178- Record the chosen finding's id, scores, and rationale at the top of
186+ Record the chosen finding id(s) , scores, and rationale at the top of
179187` /tmp/audit-{{suite}}.md ` .
180188
181189## Standard fix procedure
@@ -191,29 +199,38 @@ declare only the parts that vary (eligible categories, branch type,
191199 ` merged ` ; surface two-strike entries in the report's
192200 ` Repeatedly-failed fix attempts ` section and drop them from selection.
1932013 . Rank the remainder per the Ranking section.
194- 4 . For each candidate, top 5 max:
195- 1 . Re-verify the finding still applies (re-grep / re-read). If not,
196- remove from ` fix_backlog ` and continue.
197- 2 . Apply the fix. If the diff exceeds the localized-fix bar or touches
198- a non-allowlisted path, abandon and continue.
199- 3 . If the category sets ` test_required: true ` , run the per-package
202+ 4 . For each primary candidate, top 5 max:
203+ 1 . If the suite declares the category batchable, collect sibling
204+ ` fix_backlog ` entries for the same suite/category that share the same
205+ test target and branch type. Do not discover new findings; use only
206+ existing backlog entries. Batch at most 3 entries to stay within the
207+ localized-fix file cap.
208+ 2 . Re-verify every finding still applies (re-grep / re-read). If a
209+ sibling no longer applies, remove it from ` fix_backlog ` ; if the
210+ primary no longer applies, remove it from ` fix_backlog ` and continue
211+ to the next primary candidate.
212+ 3 . Apply the fix or batch. If the combined diff exceeds the
213+ localized-fix bar or touches a non-allowlisted path, abandon and
214+ continue.
215+ 4 . If the category sets ` test_required: true ` , run the per-package
200216 test target (see the mapping table in "Localized fix bar" above)
201- for the package containing the change. On failure: abandon and
217+ for the package containing the change(s) . On failure: abandon and
202218 continue.
203- 4 . Branch: ` agentic-ci/<type>/<suite>-YYYYMMDD-<short-slug> ` . Commit:
219+ 5 . Branch: ` agentic-ci/<type>/<suite>-YYYYMMDD-<short-slug> ` . Commit:
204220 ` <type>(agentic-ci): <one-line> ` . Push.
205- 5 . Write the PR body to ` /tmp/pr-body-{{suite}}.md ` , including the
206- hidden metadata block:
221+ 6 . Write the PR body to ` /tmp/pr-body-{{suite}}.md ` , including one
222+ hidden metadata block per fixed finding :
207223 ` <!-- agentic-ci finding=<id> suite=<suite> --> `
208- 6 . ` gh pr create --body-file /tmp/pr-body-{{suite}}.md ` with ` --draft `
224+ 7 . ` gh pr create --body-file /tmp/pr-body-{{suite}}.md ` with ` --draft `
209225 iff ` draft_until_proven ` is true for the suite.
210- 7 . ` gh pr edit <num> --add-label agentic-ci --add-label agentic-ci/<suite> ` .
211- 8 . Record ` attempted_fixes ` entry with ` outcome: "open" ` and exit.
226+ 8 . ` gh pr edit <num> --add-label agentic-ci --add-label agentic-ci/<suite> ` .
227+ 9 . Record one ` attempted_fixes ` entry per fixed finding with
228+ ` outcome: "open" ` and exit.
2122295 . If all 5 candidates were abandoned, append a one-line note to the
213230 report and exit cleanly. The state already reflects the abandonments.
214231
215232On any failure mid-flow: record ` outcome: "abandoned" ` for the chosen
216- finding (with ` pr_number: null ` ), leave any pushed branch in place
233+ finding(s) (with ` pr_number: null ` ), leave any pushed branch in place
217234(` pr-stale.yml ` will reap it; branch deletion is forbidden), and continue
218235to the next candidate.
219236
@@ -223,6 +240,8 @@ to the next candidate.
223240 interactive-only and shells the body inline; CI needs determinism.
224241- ** Title** : conventional, ` <type>(agentic-ci): <one-line> ` .
225242- ** Labels** : ` agentic-ci ` , ` agentic-ci/<suite> ` .
243+ - ** Batch markers** : batch PRs include one hidden finding marker per fixed
244+ finding so crash recovery can reconstruct every ` attempted_fixes ` entry.
226245- ** Draft PRs** : ` code-quality ` opens draft until a maintainer flips
227246 ` draft_until_proven ` to ` false ` in runner-state, after at least two
228247 non-draft PRs from that suite have landed clean. This flip is
0 commit comments