Skip to content

Commit 7148088

Browse files
seefeldbclaude
andauthored
docs(scheduler): Investigate pull-based scheduler implementation (#2267)
* docs: scheduler graph investigation - pull-based scheduling & throttling Detailed analysis of proposed changes: 1. Pull-based scheduling using effect/sink as demand roots 2. Cycle detection and adaptive throttling 3. Automatic debouncing for slow computations Includes phased implementation plan with risk assessment. * docs: revise scheduler investigation - phase ordering and cycle semantics Key updates: - Swap phases 1 and 2: effect marking must come first - Clarify that storage handles memoization (no explicit caching needed) - Add detailed explanation of how cycle semantics change with pull-based: - Push: cycles iterate across scheduler batches - Pull: cycles iterate within single pull chain - Convergence strategy: fast cycles complete before effect, slow cycles yield - Explain phase dependency chain * docs: detailed scheduler implementation plan Comprehensive step-by-step implementation guide covering: Phase 1: Effect Marking - Add effect/computation distinction to subscribe() - Mark sink() callbacks as effects - Build reverse dependency graph - Diagnostic APIs Phase 2: Pull-Based Core - Dirty tracking with transitive propagation - Feature flag for pull mode - Modified storage change handler - pullDependencies() for effect execution Phase 3: Cycle-Aware Convergence - Compute time tracking - Cycle detection via pull stack - Fast cycle convergence (< 16ms) - Slow cycle yielding with continuation Phase 4: Throttling & Debounce - Debounce infrastructure - Auto-detection of slow actions - Declarative debounce API Includes testing strategy, rollout timeline, and rollback plan. * docs: move scheduler docs to docs/specs/pull-based-scheduler * docs: restructure scheduler plan for agent execution Reformatted implementation plan with: - Checkbox tasks that agents can tick off as they complete - Clear prerequisites section - Phase dependencies explicitly stated - Grouped tasks by file being modified - Verification checklist at end of each phase - Progress summary table for tracking - Testing commands reference - Rollback plan per phase * fix: correct test file path in scheduler implementation plan Tests are in packages/runner/test/, not packages/runner/src/ --------- Co-authored-by: Claude <[email protected]>
1 parent 2d1e957 commit 7148088

File tree

2 files changed

+987
-0
lines changed

2 files changed

+987
-0
lines changed

0 commit comments

Comments
 (0)