19 tasks covering core testing, Redis hardening, WebSocket client/server adapters, Worker adapter, and final review gates. Iroh adapters are tracked as a deferred placeholder blocked on the @alkdev/iroh fork. Phases: core validation → Redis hardening → review gate → WebSocket adapters → review gate → Worker adapter → review gate → final validation.
1.9 KiB
1.9 KiB
id, name, status, depends_on, scope, risk, impact, level
| id | name | status | depends_on | scope | risk | impact | level |
|---|---|---|---|---|---|---|---|
| core-operators-tests | Write tests for all stream operators | pending | moderate | low | component | implementation |
Description
The operators.ts module exports 13 operators (filter, map, pipe, take, reduce, toArray, batch, dedupe, window, flat, groupBy, chain, join). None have tests. Each operator works with AsyncIterable input; Repeater-returning operators (filter, map) provide backpressure-aware push semantics.
The operators are adapted from graphql-yoga (filter, map, pipe) and added from the async-utility reference (take, reduce, toArray, batch, dedupe, window, flat, groupBy, chain, join).
Acceptance Criteria
test/operators.test.tsexists and passesfilter— filters items by predicate; type-narrowing overload worksfilter— async predicate supportmap— transforms items; async mapper supportpipe— composes 1-5 functionspipe— compose withsubscribe:pipe(pubsub.subscribe("myEvent", id), filter(...), map(...))take— yields first N items, then stopsreduce— reduces to single valuetoArray— collects all items into arraybatch— groups into arrays ofsizebatch— yields remaining items if not a full batchdedupe— yields only unique itemswindow— sliding window ofsizeitems, advancing bystepflat— flattensAsyncIterable<T[]>intoAsyncIterable<T>groupBy— groups items by key intoMap(terminal operation)chain— concatenates multiple async iterablesjoin— streaming join between two sources on matching keys
References
- docs/architecture/api-surface.md (Operators section)
- src/operators.ts
Notes
To be filled by implementation agent
Summary
To be filled on completion