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
refactor: add explicit timed_out field to AgentResult for consistency with other result types
AgentResult was the only result type using an implicit convention (returncode
is None) to signal timeout. CheckResult, ContextResult, RunResult, and
_StreamResult all have explicit timed_out fields. This converts AgentResult
from NamedTuple to dataclass with a timed_out: bool field, making the timeout
condition self-documenting and the engine code more readable.
Also fixes stale _discover_and_filter_enabled() references in codebase-map.md
(the actual function is _discover_enabled_primitives()).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/contributing/codebase-map.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ ralph run
71
71
72
72
### The three primitives and the `Primitive` protocol
73
73
74
-
All three primitive types follow the same pattern: a directory under `.ralphify/` with a marker markdown file containing YAML frontmatter. Each type's dataclass (`Check`, `Context`, `Ralph`) satisfies the `Primitive` protocol defined in `_discovery.py`, which requires `name` and `enabled` properties. This enables type-safe generic functions for discovery, filtering, merging, and display β the engine's `_discover_and_filter_enabled()` helper uses the protocol to handle all three types through a single code path.
74
+
All three primitive types follow the same pattern: a directory under `.ralphify/` with a marker markdown file containing YAML frontmatter. Each type's dataclass (`Check`, `Context`, `Ralph`) satisfies the `Primitive` protocol defined in `_discovery.py`, which requires `name` and `enabled` properties. This enables type-safe generic functions for discovery, filtering, merging, and display β the engine's `_discover_enabled_primitives()` helper uses the protocol to handle all three types through a single code path.
1. Create a new module (like `ralphs.py`) with a dataclass that satisfies the `Primitive` protocol (`name` and `enabled` properties), plus discover and resolve functions
138
138
2. Add a scaffold template in `_templates.py` and a `new` subcommand in `cli.py`
139
-
3. Wire it into `engine.py:run_loop()` β add it to `EnabledPrimitives` and use `_discover_and_filter_enabled()`
139
+
3. Wire it into `engine.py:run_loop()` β add it to `EnabledPrimitives` and use `_discover_enabled_primitives()`
0 commit comments