|
9 | 9 | - ✅ **DONE**: Dependency count propagation for map steps |
10 | 10 | - ✅ **DONE**: Array element extraction - tasks receive individual array elements |
11 | 11 | - ✅ **DONE**: Output aggregation - inline implementation aggregates map task outputs for dependents |
12 | | -- ⏳ **NEXT**: DSL support for `.map()` for defining map steps |
| 12 | +- ✅ **DONE**: DSL support for `.map()` for defining map steps with compile-time duplicate detection |
| 13 | +- ⏳ **TODO**: Fix orphaned messages on run failure |
| 14 | +- ⏳ **TODO**: Performance optimization with step_states.output column |
13 | 15 |
|
14 | 16 | ### Chores |
15 | 17 |
|
16 | | -- ⏳ **WAITING**: Integration tests for map steps |
17 | | -- ⏳ **WAITING**: Consolidated migration for map steps |
18 | | -- ⏳ **WAITING**: Documentation for map steps |
19 | | -- ⏳ **WAITING**: Graphite stack merge for map steps |
| 18 | +- ⏳ **TODO**: Integration tests for map steps |
| 19 | +- ⏳ **TODO**: Update core README |
| 20 | +- ⏳ **TODO**: Add docs page for array and map steps |
| 21 | +- ⏳ **TODO**: Migration consolidation |
| 22 | +- ⏳ **TODO**: Graphite stack merge |
20 | 23 |
|
21 | 24 | ## Implementation Status |
22 | 25 |
|
|
83 | 86 | - Validates non-array outputs to map steps fail correctly |
84 | 87 | - Fixed broadcast aggregation to send full array not individual task output |
85 | 88 |
|
86 | | -#### ❌ Remaining Work |
| 89 | +- [x] **PR #218: DSL Support for .map() Step Type** - `09-18-add-map-support-to-dsl` ✅ COMPLETED |
87 | 90 |
|
88 | | -- [ ] **DSL Support for .map() Step Type** |
89 | | - |
90 | | - - Add `.map()` method to Flow DSL for defining map steps |
| 91 | + - Added `.map()` method to Flow DSL for defining map steps |
91 | 92 | - Constraints: |
92 | 93 | - Locked to exactly one dependency (enforced at compile time) |
93 | 94 | - Dependency must return an array (type-checked) |
94 | 95 | - Syntax design: |
95 | 96 | - Dependent maps: `flow.map({ slug: 'stepName', array: 'arrayReturningStep' }, handler)` |
96 | | - - Root maps: Decide between `{ array: 'run' }` or omitting array property |
| 97 | + - Root maps: Omit array property |
97 | 98 | - Return type always inferred as array |
98 | 99 | - Comprehensive tests: |
99 | 100 | - Runtime validation of array dependencies |
100 | 101 | - Type safety for input/output types |
101 | 102 | - Compile-time enforcement of single dependency rule |
| 103 | + - Fixed complex TypeScript type inference issue with overloads |
| 104 | + - Added compile-time duplicate slug detection across all DSL methods |
| 105 | + - Fixed all linting errors (replaced `{}` with `Record<string, never>`) |
| 106 | + - Updated DSL README with .map() documentation |
| 107 | + - Created detailed changeset |
| 108 | + |
| 109 | +#### ❌ Remaining Work (Priority Order) |
102 | 110 |
|
103 | | -- [ ] **Fix Orphaned Messages on Run Failure** |
| 111 | +- [ ] **Priority 1: Fix Orphaned Messages on Run Failure** 🚨 CRITICAL |
104 | 112 |
|
105 | 113 | - Archive all pending messages when run fails |
106 | 114 | - Handle map sibling tasks specially |
107 | 115 | - Fix type constraint violations to fail immediately without retries |
108 | 116 | - See detailed plan: [PLAN_orphaned_messages.md](./PLAN_orphaned_messages.md) |
109 | | - - Critical for production: prevents queue performance degradation |
| 117 | + - **Critical for production: prevents queue performance degradation** |
110 | 118 | - Tests already written (stashed) that document the problem |
111 | 119 |
|
112 | | -- [ ] **Performance Optimization: step_states.output Column** |
| 120 | +- [ ] **Priority 2: Performance Optimization - step_states.output Column** |
113 | 121 |
|
114 | 122 | - Migrate from inline aggregation to storing outputs in step_states |
115 | 123 | - See detailed plan: [PLAN_step_output.md](./PLAN_step_output.md) |
|
124 | 132 | - Update all aggregation tests (~17 files) |
125 | 133 | - **Note**: This is an optimization that should be done after core functionality is stable |
126 | 134 |
|
127 | | -- [ ] **Integration Tests** |
| 135 | +- [ ] **Priority 3: Integration Tests** |
128 | 136 |
|
129 | 137 | - End-to-end workflows with real array data |
130 | 138 | - Basic happy path coverage |
131 | 139 | - This should be minimal and added to the Edge Worker integration test suite for now |
132 | 140 |
|
133 | | -- [ ] **Migration Consolidation** |
134 | | - |
135 | | - - Remove all temporary/incremental migrations from feature branches |
136 | | - - Generate a single consolidated migration for the entire map infrastructure |
137 | | - - Ensure clean migration path from current production schema |
138 | | - - If NULL improvement is done, include it in the consolidated migration |
139 | | - |
140 | | -- [ ] **Update README's** and **Docs** |
| 141 | +- [ ] **Priority 4: Update core README** |
141 | 142 |
|
142 | 143 | - `pkgs/core/README.md` |
143 | 144 |
|
|
149 | 150 | - Explain root map vs dependent map and how it gets handled and what restrictions those apply on the Flow input |
150 | 151 | - Explain cascade completion of taskless steps and its limitations |
151 | 152 |
|
152 | | - - `pkgs/dsl/README.md` |
153 | | - |
154 | | - - Briefly describe the new `.array()` and `.map()` methods |
155 | | - - Mention `.array` is mostly sugar, and `.map` is the new step type |
156 | | - - Link to `pkgs/core/README.md` sections for more explanation about map steps |
157 | | - - Make sure to mention that maps are constrained to have exactly one dependency |
| 153 | +- [ ] **Priority 5: Add docs page** |
158 | 154 |
|
159 | 155 | - **Add basic docs page** |
160 | 156 |
|
|
165 | 161 | - focus mostly on how to use it, instead of how it works under the hood |
166 | 162 | - link to the README's for more details |
167 | 163 |
|
168 | | -- [ ] **Graphite Stack Merge** |
| 164 | +- [ ] **Priority 6: Migration Consolidation** (Do this last before merge!) |
| 165 | + |
| 166 | + - Remove all temporary/incremental migrations from feature branches |
| 167 | + - Generate a single consolidated migration for the entire map infrastructure |
| 168 | + - Ensure clean migration path from current production schema |
| 169 | + - If NULL improvement is done, include it in the consolidated migration |
| 170 | + |
| 171 | +- [ ] **Priority 7: Graphite Stack Merge** |
169 | 172 |
|
170 | 173 | - Configure Graphite merge queue for the complete PR stack |
171 | 174 | - Ensure all PRs in sequence can be merged together |
|
0 commit comments