You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Batch operations process repeated work across real discovered inputs. A First-Class Tool V2 batch flow must be explicit, observable, and safe to resume or diagnose.
4
+
5
+
## Discovery Rules
6
+
7
+
- Discover real files and directories.
8
+
- Never assume numeric folder sequences.
9
+
- Missing discovered candidates are logged as `SKIP`, not `FAIL`, unless the missing item is the selected single input.
10
+
- Logs must identify the resolved input path or identifier for every item.
11
+
12
+
## Per-Item Logging
13
+
14
+
Every item must log exactly one terminal outcome through the tool logger:
15
+
16
+
-`OK`: item completed and wrote or updated the expected output.
17
+
-`WARN`: item completed with a recoverable warning.
18
+
-`FAIL`: item failed with an actionable error.
19
+
-`SKIP`: item was intentionally skipped.
20
+
21
+
Per-item logs must include the item identifier and the reason for `WARN`, `FAIL`, or `SKIP`.
22
+
23
+
## Failure Isolation
24
+
25
+
- One item failure must not stop the batch unless the failure is global.
26
+
- Global failures include missing required configuration, unavailable repo access, invalid destination root, or a cancelled run.
27
+
- Batch processors must keep processing remaining discovered items after item-level `FAIL` or `SKIP` outcomes.
28
+
29
+
## Summary Contract
30
+
31
+
Every batch run must finish with a summary that includes:
32
+
33
+
-`written`
34
+
-`failed`
35
+
-`skipped`
36
+
-`warnings`
37
+
38
+
The summary must match the per-item log outcomes.
39
+
40
+
## Stop/Cancel Contract
41
+
42
+
Long-running batches must support a stop or cancel pattern when applicable.
43
+
44
+
- Stop/cancel requests must prevent new items from starting.
45
+
- Already-running item work should finish or fail safely.
46
+
- Cancelled remaining items should be logged as `SKIP` or another clearly documented non-success outcome.
47
+
- The final summary must make cancellation visible.
48
+
49
+
## No Silent Fallback
50
+
51
+
Batch processors must not invent default inputs, substitute fallback targets, or claim success when a fallback or partial result occurred.
0 commit comments