mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-10-06 02:48:25 +00:00
Change default_max_retry from 50 to 3
Aligns with the kilroy implementation of the Attractor spec. A default of 50 retries is far too aggressive for most workflows. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
1b26702f95
commit
2a82a4e147
3 changed files with 9 additions and 9 deletions
|
|
@ -1426,11 +1426,11 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn build_retry_policy_no_attrs_uses_graph_default_50() {
|
||||
fn build_retry_policy_no_attrs_uses_graph_default_3() {
|
||||
let node = Node::new("n");
|
||||
let graph = Graph::new("test");
|
||||
let policy = build_retry_policy(&node, &graph);
|
||||
assert_eq!(policy.max_attempts, 51); // default_max_retry=50 + 1
|
||||
assert_eq!(policy.max_attempts, 4); // default_max_retry=3 + 1
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
@ -1512,8 +1512,8 @@ mod tests {
|
|||
);
|
||||
let graph = Graph::new("test");
|
||||
let policy = build_retry_policy(&node, &graph);
|
||||
// Unknown preset should fall back to graph default_max_retry=50
|
||||
assert_eq!(policy.max_attempts, 51);
|
||||
// Unknown preset should fall back to graph default_max_retry=3
|
||||
assert_eq!(policy.max_attempts, 4);
|
||||
}
|
||||
|
||||
// --- normalize_label tests ---
|
||||
|
|
|
|||
|
|
@ -384,12 +384,12 @@ impl Graph {
|
|||
.unwrap_or("")
|
||||
}
|
||||
|
||||
/// Graph-level `default_max_retry` (default 50).
|
||||
/// Graph-level `default_max_retry` (default 3).
|
||||
pub fn default_max_retry(&self) -> i64 {
|
||||
self.attrs
|
||||
.get("default_max_retry")
|
||||
.and_then(AttrValue::as_i64)
|
||||
.unwrap_or(50)
|
||||
.unwrap_or(3)
|
||||
}
|
||||
|
||||
/// Graph-level `retry_target`.
|
||||
|
|
@ -656,7 +656,7 @@ mod tests {
|
|||
#[test]
|
||||
fn graph_default_max_retry() {
|
||||
let g = Graph::new("empty");
|
||||
assert_eq!(g.default_max_retry(), 50);
|
||||
assert_eq!(g.default_max_retry(), 3);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ Graph attributes are declared in a `graph [ ... ]` block or as top-level `key =
|
|||
| `goal` | String | `""` | Human-readable goal for the pipeline. Exposed as `$goal` in prompt templates and mirrored into the run context as `graph.goal`. |
|
||||
| `label` | String | `""` | Display name for the graph (used in visualization). |
|
||||
| `model_stylesheet` | String | `""` | CSS-like stylesheet for per-node LLM model/provider defaults. See Section 8. |
|
||||
| `default_max_retry` | Integer | `50` | Global retry ceiling for nodes that omit `max_retries`. |
|
||||
| `default_max_retry` | Integer | `3` | Global retry ceiling for nodes that omit `max_retries`. |
|
||||
| `retry_target` | String | `""` | Node ID to jump to if exit is reached with unsatisfied goal gates. |
|
||||
| `fallback_retry_target` | String | `""` | Secondary jump target if `retry_target` is missing or invalid. |
|
||||
| `default_fidelity` | String | `""` | Default context fidelity mode (see Section 5.4). |
|
||||
|
|
@ -2028,7 +2028,7 @@ ASSERT "review" IN checkpoint.completed_nodes
|
|||
| `goal` | String | `""` | Pipeline-level goal description |
|
||||
| `label` | String | `""` | Display name for the graph |
|
||||
| `model_stylesheet` | String | `""` | CSS-like LLM model/provider stylesheet |
|
||||
| `default_max_retry` | Integer | `50` | Global retry ceiling |
|
||||
| `default_max_retry` | Integer | `3` | Global retry ceiling |
|
||||
| `default_fidelity` | String | `""` | Default context fidelity mode |
|
||||
| `retry_target` | String | `""` | Node to jump to on unsatisfied exit |
|
||||
| `fallback_retry_target` | String | `""` | Secondary jump target |
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue