codex-flow 2.1.13__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- codex_flow/__init__.py +28 -0
- codex_flow/__main__.py +9 -0
- codex_flow/cli.py +242 -0
- codex_flow/data/LICENSE +21 -0
- codex_flow/data/README.en.md +303 -0
- codex_flow/data/README.md +305 -0
- codex_flow/data/VERSION +1 -0
- codex_flow/data/apps/chatgpt-mcp/README.md +86 -0
- codex_flow/data/apps/chatgpt-mcp/__init__.py +1 -0
- codex_flow/data/apps/chatgpt-mcp/adapter.py +458 -0
- codex_flow/data/apps/chatgpt-mcp/server.py +358 -0
- codex_flow/data/apps/chatgpt-mcp/widget.html +927 -0
- codex_flow/data/apps/macos-overlay/README.en.md +121 -0
- codex_flow/data/apps/macos-overlay/README.md +123 -0
- codex_flow/data/apps/macos-overlay/Sources/Controllers/OverlayRuntimeState.swift +126 -0
- codex_flow/data/apps/macos-overlay/Sources/Controllers/OverlayScreenGeometry.swift +82 -0
- codex_flow/data/apps/macos-overlay/Sources/Controllers/OverlayWindowController.swift +1052 -0
- codex_flow/data/apps/macos-overlay/Sources/Localization.swift +197 -0
- codex_flow/data/apps/macos-overlay/Sources/Models/TelemetryData.swift +1557 -0
- codex_flow/data/apps/macos-overlay/Sources/Services/AccountSnapshotService.swift +1101 -0
- codex_flow/data/apps/macos-overlay/Sources/Services/FlowPilotInstanceLock.swift +153 -0
- codex_flow/data/apps/macos-overlay/Sources/Services/IPCServer.swift +298 -0
- codex_flow/data/apps/macos-overlay/Sources/Services/TelemetryQueryEngine.swift +800 -0
- codex_flow/data/apps/macos-overlay/Sources/Services/TelemetryWatcher.swift +135 -0
- codex_flow/data/apps/macos-overlay/Sources/Services/UpdateService.swift +610 -0
- codex_flow/data/apps/macos-overlay/Sources/Views/AccountView.swift +610 -0
- codex_flow/data/apps/macos-overlay/Sources/Views/AnalyticsView.swift +566 -0
- codex_flow/data/apps/macos-overlay/Sources/Views/AutostartView.swift +293 -0
- codex_flow/data/apps/macos-overlay/Sources/Views/BubbleView.swift +317 -0
- codex_flow/data/apps/macos-overlay/Sources/Views/HistoryView.swift +1124 -0
- codex_flow/data/apps/macos-overlay/Sources/Views/HoverRevealText.swift +165 -0
- codex_flow/data/apps/macos-overlay/Sources/Views/InspectorSkillsToolsView.swift +121 -0
- codex_flow/data/apps/macos-overlay/Sources/Views/LogoView.swift +182 -0
- codex_flow/data/apps/macos-overlay/Sources/Views/SleekSwitch.swift +117 -0
- codex_flow/data/apps/macos-overlay/Sources/Views/StrategyModeView.swift +561 -0
- codex_flow/data/apps/macos-overlay/Sources/Views/SummaryView.swift +1273 -0
- codex_flow/data/apps/macos-overlay/Sources/Views/UpdateView.swift +352 -0
- codex_flow/data/apps/macos-overlay/Sources/main.swift +340 -0
- codex_flow/data/apps/macos-overlay/Tests/OverlayScreenGeometryTests.swift +163 -0
- codex_flow/data/apps/macos-overlay/Tests/TelemetryPhase1ContractTests.swift +357 -0
- codex_flow/data/apps/macos-overlay/Tests/TelemetryQueryEngineConcurrencyTests.swift +221 -0
- codex_flow/data/apps/macos-overlay/Tests/TelemetryQuotaSelectionTests.swift +158 -0
- codex_flow/data/apps/macos-overlay/Tests/TelemetryWorkerTokenTests.swift +122 -0
- codex_flow/data/apps/macos-overlay/build.sh +75 -0
- codex_flow/data/benchmark/corpus.json +103 -0
- codex_flow/data/benchmark/manifest.example.json +41 -0
- codex_flow/data/benchmark/manifest.schema.json +137 -0
- codex_flow/data/benchmark/prices/gpt-5.6-2026-08-30.json +5 -0
- codex_flow/data/benchmark/profiles.json +90 -0
- codex_flow/data/benchmark/schema.json +77 -0
- codex_flow/data/benchmark/tasks.json +50 -0
- codex_flow/data/completions/codex-flow.bash +34 -0
- codex_flow/data/completions/codex-flow.zsh +52 -0
- codex_flow/data/glama.json +6 -0
- codex_flow/data/install-release.ps1 +126 -0
- codex_flow/data/install-release.sh +155 -0
- codex_flow/data/install.ps1 +349 -0
- codex_flow/data/install.sh +362 -0
- codex_flow/data/policy/benchmark.toml +49 -0
- codex_flow/data/policy/defaults.toml +70 -0
- codex_flow/data/scripts/analyze-benchmark.py +510 -0
- codex_flow/data/scripts/benchmark-local.py +171 -0
- codex_flow/data/scripts/check-recommendation.py +277 -0
- codex_flow/data/scripts/doctor.py +449 -0
- codex_flow/data/scripts/generate-release-manifest.py +74 -0
- codex_flow/data/scripts/localization.py +192 -0
- codex_flow/data/scripts/manage-hooks.py +448 -0
- codex_flow/data/scripts/manage-instructions.py +389 -0
- codex_flow/data/scripts/manage-shell.py +151 -0
- codex_flow/data/scripts/materialize-corpus.py +193 -0
- codex_flow/data/scripts/menu.py +646 -0
- codex_flow/data/scripts/migrations/0001_update_settings.py +80 -0
- codex_flow/data/scripts/package-release.py +132 -0
- codex_flow/data/scripts/render-benchmark-report.py +292 -0
- codex_flow/data/scripts/run-benchmark.py +829 -0
- codex_flow/data/scripts/strategies/__init__.py +28 -0
- codex_flow/data/scripts/strategies/balanced.py +115 -0
- codex_flow/data/scripts/strategies/base.py +363 -0
- codex_flow/data/scripts/strategies/efficient.py +158 -0
- codex_flow/data/scripts/strategies/lifecycle_runtime.py +590 -0
- codex_flow/data/scripts/strategies/quality.py +209 -0
- codex_flow/data/scripts/strategies/speed.py +108 -0
- codex_flow/data/scripts/strategies/task_budget_runtime.py +644 -0
- codex_flow/data/scripts/strategies/task_phase_runtime.py +341 -0
- codex_flow/data/scripts/strategies/work_unit_runtime.py +421 -0
- codex_flow/data/scripts/strategy_runtime.py +1091 -0
- codex_flow/data/scripts/telemetry.py +400 -0
- codex_flow/data/scripts/telemetry_core/__init__.py +192 -0
- codex_flow/data/scripts/telemetry_core/app_server.py +1192 -0
- codex_flow/data/scripts/telemetry_core/collector.py +1247 -0
- codex_flow/data/scripts/telemetry_core/common.py +421 -0
- codex_flow/data/scripts/telemetry_core/latency.py +593 -0
- codex_flow/data/scripts/telemetry_core/query.py +427 -0
- codex_flow/data/scripts/telemetry_core/quota_ledger.py +598 -0
- codex_flow/data/scripts/telemetry_core/render.py +460 -0
- codex_flow/data/scripts/telemetry_core/repair.py +223 -0
- codex_flow/data/scripts/ui.py +266 -0
- codex_flow/data/scripts/update-homebrew-formula.py +146 -0
- codex_flow/data/scripts/update_runtime_config.py +134 -0
- codex_flow/data/scripts/updater.py +1718 -0
- codex_flow/data/smithery.yaml +18 -0
- codex_flow/data/templates/agents/worker-explorer.toml +24 -0
- codex_flow/data/templates/agents/worker-implementer.toml +49 -0
- codex_flow/data/templates/agents/worker-reviewer.toml +25 -0
- codex_flow/data/templates/flow-pilot-instructions.md +35 -0
- codex_flow/data/templates/skills/flow-pilot/SKILL.md +577 -0
- codex_flow/mcp.py +35 -0
- codex_flow-2.1.13.dist-info/METADATA +342 -0
- codex_flow-2.1.13.dist-info/RECORD +113 -0
- codex_flow-2.1.13.dist-info/WHEEL +5 -0
- codex_flow-2.1.13.dist-info/entry_points.txt +3 -0
- codex_flow-2.1.13.dist-info/licenses/LICENSE +21 -0
- codex_flow-2.1.13.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
"""Correctness- and verification-first strategy."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from .base import StagePolicy, StrategySpec, TaskBudgetPolicy, WorkerBudget, small_low_risk_is_direct, standard_effort
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def adaptive_route(task) -> str:
|
|
8
|
+
if task.quality_intent in {"strong", "absolute"}:
|
|
9
|
+
return "delegate"
|
|
10
|
+
if small_low_risk_is_direct(task):
|
|
11
|
+
return "direct"
|
|
12
|
+
return "delegate" if task.complexity != "small" or task.risk in {"high", "critical"} or task.uncertainty == "high" else "direct"
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def effort(task, role: str) -> str:
|
|
16
|
+
if task.quality_intent == "absolute":
|
|
17
|
+
return "max"
|
|
18
|
+
if task.quality_intent == "strong":
|
|
19
|
+
return "xhigh" if role == "parent" else "max"
|
|
20
|
+
if task.complexity == "critical" or task.risk == "critical":
|
|
21
|
+
return "xhigh" if role == "parent" else "max"
|
|
22
|
+
if task.complexity == "complex" or task.risk == "high" or task.verification_cost == "high":
|
|
23
|
+
return "xhigh" if role == "parent" else "max"
|
|
24
|
+
return standard_effort(task, role)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def worker_budget(task) -> WorkerBudget:
|
|
28
|
+
if task.quality_intent == "absolute":
|
|
29
|
+
return WorkerBudget(4, 4, 2, 8, "high")
|
|
30
|
+
if task.quality_intent == "strong":
|
|
31
|
+
return WorkerBudget(4, 3, 2, 7, "high")
|
|
32
|
+
if task.complexity == "critical" or task.risk == "critical":
|
|
33
|
+
return WorkerBudget(4, 3, 2, 7, "high")
|
|
34
|
+
if task.complexity == "complex" or task.risk == "high" or task.verification_cost == "high":
|
|
35
|
+
return WorkerBudget(4, 3, 2, 6, "high")
|
|
36
|
+
return WorkerBudget(2, 2, 1, 4, "high")
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def independent_review(task) -> bool:
|
|
40
|
+
return (
|
|
41
|
+
task.quality_intent in {"strong", "absolute"}
|
|
42
|
+
or task.complexity != "small"
|
|
43
|
+
or task.risk in {"high", "critical"}
|
|
44
|
+
or task.verification_cost == "high"
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def capability(task, role: str) -> str:
|
|
49
|
+
critical = task.complexity == "critical" or task.risk == "critical"
|
|
50
|
+
if role == "explorer":
|
|
51
|
+
return "parent" if critical else "worker"
|
|
52
|
+
if role in {"implementer", "reviewer"}:
|
|
53
|
+
return "parent" if critical or task.quality_intent in {"strong", "absolute"} else "worker"
|
|
54
|
+
return "worker"
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def exploration_bonus(task) -> int:
|
|
58
|
+
if task.quality_intent == "absolute":
|
|
59
|
+
return 4
|
|
60
|
+
if task.quality_intent == "strong":
|
|
61
|
+
return 2
|
|
62
|
+
return 0
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def reviewer_bonus(task) -> int:
|
|
66
|
+
return 1 if task.quality_intent == "absolute" else 0
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def notes(task) -> tuple[str, ...]:
|
|
70
|
+
if task.quality_intent == "strong":
|
|
71
|
+
return ("strong quality intent authorizes parent-class implementer and reviewer capability",)
|
|
72
|
+
if task.quality_intent == "absolute":
|
|
73
|
+
return ("absolute quality intent prioritizes correctness over quota and latency within runtime safety ceilings",)
|
|
74
|
+
return ()
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def implementation_soft_timeout(task) -> int:
|
|
78
|
+
if task.quality_intent == "absolute" or task.complexity == "critical" or task.risk == "critical":
|
|
79
|
+
return 2700
|
|
80
|
+
if (
|
|
81
|
+
task.quality_intent == "strong"
|
|
82
|
+
or task.complexity == "complex"
|
|
83
|
+
or task.scope == "repo-wide"
|
|
84
|
+
or task.iteration_intensity == "heavy-loop"
|
|
85
|
+
or task.verification_cost == "high"
|
|
86
|
+
):
|
|
87
|
+
return 2400
|
|
88
|
+
return 1800
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def implementation_checkpoint_rearm_seconds(task) -> int:
|
|
92
|
+
if task.quality_intent == "absolute" or task.complexity == "critical" or task.risk == "critical":
|
|
93
|
+
return 600
|
|
94
|
+
if (
|
|
95
|
+
task.quality_intent == "strong"
|
|
96
|
+
or task.complexity == "complex"
|
|
97
|
+
or task.scope in {"cross-module", "repo-wide"}
|
|
98
|
+
or task.iteration_intensity == "heavy-loop"
|
|
99
|
+
or task.verification_cost == "high"
|
|
100
|
+
):
|
|
101
|
+
return 480
|
|
102
|
+
return 360
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def implementation_repair_attempts(task) -> int:
|
|
106
|
+
if (
|
|
107
|
+
task.quality_intent in {"strong", "absolute"}
|
|
108
|
+
or task.complexity in {"complex", "critical"}
|
|
109
|
+
or task.risk in {"high", "critical"}
|
|
110
|
+
or task.scope == "repo-wide"
|
|
111
|
+
or task.iteration_intensity == "heavy-loop"
|
|
112
|
+
or task.verification_cost == "high"
|
|
113
|
+
):
|
|
114
|
+
return 3
|
|
115
|
+
return 2
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def implementation_maximum_work_units(task) -> int:
|
|
119
|
+
if (
|
|
120
|
+
task.quality_intent == "absolute"
|
|
121
|
+
or task.complexity == "critical"
|
|
122
|
+
or task.risk == "critical"
|
|
123
|
+
or task.scope == "repo-wide"
|
|
124
|
+
or task.iteration_intensity == "heavy-loop"
|
|
125
|
+
):
|
|
126
|
+
semantic_maximum = 4
|
|
127
|
+
elif (
|
|
128
|
+
task.quality_intent == "strong"
|
|
129
|
+
or task.complexity == "complex"
|
|
130
|
+
or task.risk == "high"
|
|
131
|
+
or task.scope == "cross-module"
|
|
132
|
+
or task.verification_cost == "high"
|
|
133
|
+
):
|
|
134
|
+
semantic_maximum = 3
|
|
135
|
+
else:
|
|
136
|
+
semantic_maximum = 1
|
|
137
|
+
topology_floor = min(task.writable_workstreams, worker_budget(task).max_implementers)
|
|
138
|
+
return max(semantic_maximum, topology_floor)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
def task_budget(task) -> TaskBudgetPolicy:
|
|
142
|
+
maximum_work_units = implementation_maximum_work_units(task)
|
|
143
|
+
if (
|
|
144
|
+
task.quality_intent == "absolute"
|
|
145
|
+
or task.complexity == "critical"
|
|
146
|
+
or task.risk == "critical"
|
|
147
|
+
or task.scope == "repo-wide"
|
|
148
|
+
or task.iteration_intensity == "heavy-loop"
|
|
149
|
+
):
|
|
150
|
+
soft_timeout, hard_timeout = 6000, 7200
|
|
151
|
+
elif (
|
|
152
|
+
task.quality_intent == "strong"
|
|
153
|
+
or task.complexity == "complex"
|
|
154
|
+
or task.scope == "cross-module"
|
|
155
|
+
or task.risk == "high"
|
|
156
|
+
or task.verification_cost == "high"
|
|
157
|
+
):
|
|
158
|
+
soft_timeout, hard_timeout = 5400, 6600
|
|
159
|
+
else:
|
|
160
|
+
soft_timeout, hard_timeout = 4800, 6000
|
|
161
|
+
return TaskBudgetPolicy(
|
|
162
|
+
soft_timeout_seconds=soft_timeout,
|
|
163
|
+
hard_timeout_seconds=hard_timeout,
|
|
164
|
+
max_work_units=maximum_work_units,
|
|
165
|
+
max_implementation_attempts=maximum_work_units + 3,
|
|
166
|
+
max_replans=3,
|
|
167
|
+
max_replacements=3,
|
|
168
|
+
max_review_attempts=worker_budget(task).max_reviewers * 2,
|
|
169
|
+
parent_finalization_seconds=300,
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
def lifecycle(task, stage: str) -> StagePolicy:
|
|
174
|
+
if stage == "exploration":
|
|
175
|
+
return StagePolicy("quorum", 2, 300, 2400, True, False, "parent_delta")
|
|
176
|
+
if stage == "implementation":
|
|
177
|
+
maximum_work_units = implementation_maximum_work_units(task)
|
|
178
|
+
bounded_mode = maximum_work_units > 1
|
|
179
|
+
return StagePolicy(
|
|
180
|
+
"required", 1, 300, 3600, False, False, "replan",
|
|
181
|
+
soft_timeout_seconds=implementation_soft_timeout(task),
|
|
182
|
+
checkpoint_rearm_seconds=implementation_checkpoint_rearm_seconds(task),
|
|
183
|
+
max_worker_repair_attempts=implementation_repair_attempts(task),
|
|
184
|
+
work_unit_mode="bounded" if bounded_mode else "single",
|
|
185
|
+
minimum_work_units=1,
|
|
186
|
+
join_between_work_units=bounded_mode,
|
|
187
|
+
maximum_work_units=maximum_work_units,
|
|
188
|
+
require_write_paths=bounded_mode,
|
|
189
|
+
)
|
|
190
|
+
if stage == "review":
|
|
191
|
+
return StagePolicy("required", 2, 300, 3000, False, False, "retry_review")
|
|
192
|
+
raise ValueError(f"invalid lifecycle stage: {stage}")
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
STRATEGY = StrategySpec(
|
|
196
|
+
name="quality",
|
|
197
|
+
description="maximize correctness through deep reasoning, scalable verification, and role-scoped parent-class capability",
|
|
198
|
+
adaptive_route=adaptive_route,
|
|
199
|
+
effort=effort,
|
|
200
|
+
worker_budget=worker_budget,
|
|
201
|
+
independent_review=independent_review,
|
|
202
|
+
capability=capability,
|
|
203
|
+
exploration_bonus=exploration_bonus,
|
|
204
|
+
reviewer_bonus=reviewer_bonus,
|
|
205
|
+
notes=notes,
|
|
206
|
+
lifecycle=lifecycle,
|
|
207
|
+
allow_parallel_write=True,
|
|
208
|
+
task_budget=task_budget,
|
|
209
|
+
)
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"""Wall-clock-latency strategy."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from .base import StagePolicy, StrategySpec, TaskBudgetPolicy, WorkerBudget, never, small_low_risk_is_direct, standard_effort
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def adaptive_route(task) -> str:
|
|
8
|
+
if small_low_risk_is_direct(task):
|
|
9
|
+
return "direct"
|
|
10
|
+
return "delegate" if task.parallelism != "none" and task.complexity != "small" else "direct"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def worker_budget(task) -> WorkerBudget:
|
|
14
|
+
if task.complexity in {"complex", "critical"} or task.scope in {"cross-module", "repo-wide"}:
|
|
15
|
+
return WorkerBudget(4, 8, 1, 8, "high")
|
|
16
|
+
return WorkerBudget(3, 8, 1, 8, "high")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def implementation_soft_timeout(task) -> int:
|
|
20
|
+
if (
|
|
21
|
+
task.complexity == "critical"
|
|
22
|
+
or task.risk == "critical"
|
|
23
|
+
or task.scope == "repo-wide"
|
|
24
|
+
or task.iteration_intensity == "heavy-loop"
|
|
25
|
+
):
|
|
26
|
+
return 720
|
|
27
|
+
if task.complexity == "complex" or task.scope == "cross-module":
|
|
28
|
+
return 600
|
|
29
|
+
return 420
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def implementation_checkpoint_rearm_seconds(_task) -> int:
|
|
33
|
+
return 180
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def implementation_repair_attempts(_task) -> int:
|
|
37
|
+
return 1
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def implementation_maximum_work_units(task) -> int:
|
|
41
|
+
if (
|
|
42
|
+
task.complexity == "critical"
|
|
43
|
+
or task.risk == "critical"
|
|
44
|
+
or task.scope == "repo-wide"
|
|
45
|
+
or task.iteration_intensity == "heavy-loop"
|
|
46
|
+
):
|
|
47
|
+
semantic_maximum = 4
|
|
48
|
+
elif task.complexity == "complex" or task.scope == "cross-module":
|
|
49
|
+
semantic_maximum = 3
|
|
50
|
+
else:
|
|
51
|
+
semantic_maximum = 1
|
|
52
|
+
topology_floor = min(task.writable_workstreams, worker_budget(task).max_implementers)
|
|
53
|
+
return max(semantic_maximum, topology_floor)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def task_budget(task) -> TaskBudgetPolicy:
|
|
57
|
+
maximum_work_units = implementation_maximum_work_units(task)
|
|
58
|
+
return TaskBudgetPolicy(
|
|
59
|
+
soft_timeout_seconds=1200,
|
|
60
|
+
hard_timeout_seconds=1800,
|
|
61
|
+
max_work_units=maximum_work_units,
|
|
62
|
+
max_implementation_attempts=maximum_work_units + 1,
|
|
63
|
+
max_replans=1,
|
|
64
|
+
max_replacements=1,
|
|
65
|
+
max_review_attempts=2,
|
|
66
|
+
parent_finalization_seconds=120,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def lifecycle(task, stage: str) -> StagePolicy:
|
|
71
|
+
if stage == "exploration":
|
|
72
|
+
return StagePolicy("opportunistic", 0, 60, 600, True, True, "continue_partial")
|
|
73
|
+
if stage == "implementation":
|
|
74
|
+
maximum_work_units = implementation_maximum_work_units(task)
|
|
75
|
+
bounded_mode = maximum_work_units > 1
|
|
76
|
+
return StagePolicy(
|
|
77
|
+
"required",
|
|
78
|
+
1,
|
|
79
|
+
120,
|
|
80
|
+
1200,
|
|
81
|
+
False,
|
|
82
|
+
False,
|
|
83
|
+
"replan",
|
|
84
|
+
soft_timeout_seconds=implementation_soft_timeout(task),
|
|
85
|
+
checkpoint_rearm_seconds=implementation_checkpoint_rearm_seconds(task),
|
|
86
|
+
max_worker_repair_attempts=implementation_repair_attempts(task),
|
|
87
|
+
work_unit_mode="bounded" if bounded_mode else "single",
|
|
88
|
+
minimum_work_units=1,
|
|
89
|
+
join_between_work_units=bounded_mode,
|
|
90
|
+
maximum_work_units=maximum_work_units,
|
|
91
|
+
require_write_paths=bounded_mode,
|
|
92
|
+
)
|
|
93
|
+
if stage == "review":
|
|
94
|
+
return StagePolicy("quorum", 1, 90, 900, True, True, "retry_review")
|
|
95
|
+
raise ValueError(f"invalid lifecycle stage: {stage}")
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
STRATEGY = StrategySpec(
|
|
99
|
+
name="speed",
|
|
100
|
+
description="minimize wall-clock latency by saturating proven-safe worker concurrency",
|
|
101
|
+
adaptive_route=adaptive_route,
|
|
102
|
+
effort=standard_effort,
|
|
103
|
+
worker_budget=worker_budget,
|
|
104
|
+
independent_review=never,
|
|
105
|
+
lifecycle=lifecycle,
|
|
106
|
+
allow_parallel_write=True,
|
|
107
|
+
task_budget=task_budget,
|
|
108
|
+
)
|