Repository navigation
Conversation
| namespace = { | ||
| "_SchedulerState": _SchedulerState, | ||
| "_ancestor_ids": _ancestor_ids, | ||
| "_dependency_ids": _dependency_ids, | ||
| } | ||
| exec(compile(extracted, f"{base_ref}:src/agent_env/task/task.py", "exec"), namespace) |
There was a problem hiding this comment.
If --base points to a revision with different dependency helpers, the benchmark runs that revision’s methods with helpers from the working tree. The printed speedup may then compare a mix of versions. Load the helpers from the selected revision or reject the comparison when they differ.
Prompt To Fix With AI
This is a comment left during a code review.
Path: tst/benchmarks/task_graphs.py
Line: 51-56
Comment:
**Baseline uses newer helpers**
If `--base` points to a revision with different dependency helpers, the benchmark runs that revision’s methods with helpers from the working tree. The printed speedup may then compare a mix of versions. Load the helpers from the selected revision or reject the comparison when they differ.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly._drive_dag rebuilt each active step's dependency ids to re-arm after a retry's rollback, mirroring _build_scheduler_state's chain-or-dense choice. _build_scheduler_state now records them on _SchedulerState as `dependencies`, and _rearm reads that, so the choice lives in one place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| - `ready`: steps whose deps are all satisfied and can launch immediately. | ||
| """ | ||
| step_by_id: dict[str, "TaskStep"] | ||
| dependencies: dict[str, set[str]] |
There was a problem hiding this comment.
Benchmark graph comparison crashes
The new required dependencies field breaks the documented comparison with main. The benchmark gives the old _build_scheduler_state method the current _SchedulerState class, but the old method does not pass dependencies. The “scheduler graph” row raises TypeError instead of printing a measurement. Load the baseline state class with the baseline method, or adapt its return value.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/agent_env/task/task.py
Line: 289
Comment:
**Benchmark graph comparison crashes**
The new required `dependencies` field breaks the documented comparison with `main`. The benchmark gives the old `_build_scheduler_state` method the current `_SchedulerState` class, but the old method does not pass `dependencies`. The “scheduler graph” row raises `TypeError` instead of printing a measurement. Load the baseline state class with the baseline method, or adapt its return value.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Closes #76.
Prune unused task validation work and replace dense graphs with predecessor chains for wholly implicit sequential tasks. Mixed/explicit graphs retain their existing behavior. Both initial scheduling and retry rearming use the reduced representation.
The graph uses 2,999 edges instead of 4,498,500. Peak traced allocations: 39.1 MB → 0.61 MB. Measurements are validation/graph microbenchmarks on macOS arm64, Python 3.12.13, against
602d730, with five timing samples. They do not measure complete task execution; earlier-target retries and mixed graphs retain their existing validation costs.Reproduce:
Validation:
Two commits separate validation pruning from scheduler graph reduction. This PR is independent of the journal, Explorer and existing context-diff PRs.
The PR is not ready to merge because the documented graph benchmark fails against its baseline.
Fix with agent prompt
Summary
Task validation skips work it does not need, and wholly implicit task graphs use a predecessor chain with the same sequential run order. Mixed and explicit graphs keep their existing dependency behavior.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR A[Implicit step A] --> B[Implicit step B] --> C[Implicit step C] C --> D[Retry rearm counts stored predecessors]Reviews (2) · Last reviewed commit: "refactor(task): build the scheduler's de..."