Repository navigation
perf(task): prune validation and implicit scheduler graphs - #79
Merged
Merged
Conversation
morluto
marked this pull request as ready for review
October 6, 2026 19:54
_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>
earakely-scale
approved these changes
Oct 7, 2026
Collaborator
|
Nice PR, approved |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 → 1.32 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:
The baseline now loads its own methods, dependency helpers and state schema; regression coverage prevents mixed revisions and constructor mismatches.
157 focused task/retry tests passed, including actual execution, persisted retries, resume/end boundaries, callbacks and cancellation.
Full unit and protocol suites: 6,238 passed, 13 skipped.
Deterministic regressions check graph edge counts and absence of unused prefix slicing/self-retry ancestry.
Independent review completed with no actionable findings; plugin API check and diff checks passed.
Separate commits keep validation pruning and scheduler graph reduction reviewable. This PR is independent of the journal, Explorer and existing context-diff PRs.
The PR appears safe to merge; both earlier benchmark findings are addressed, and no new issue was established.
Summary
Task validation and scheduling now skip unnecessary work for tasks that use the default sequential order. The PR also adds a benchmark that compares these costs with methods loaded from a chosen Git revision.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR A[Build scheduler state] --> B{All active steps implicit?} B -->|Yes| C[Link each step to its predecessor] B -->|No| D[Keep the existing dependency edges] C --> E[Use dependency map for retry rearming] D --> EReviews (3) · Last reviewed commit: "fix(benchmark): load task baselines from..." · Reviewed by Greptile