Commit f31d76b
feat: add pipeline_sync_batch, takeThroughStates, sync_batch CLI improvements, and observability (#349)
* Add source_discover script
* feat: log event IDs at all webhook ingress points
Adds structured info-level logs for every Stripe event received across
all ingress paths (HTTP webhook, WebSocket, service endpoint) for
observability.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude
* fix(progress): increment per-stream state_count on source_state messages
state_count was never incremented — the old code only created a new
stream entry when missing, but createInitialProgress pre-populates all
streams so the branch never ran. Bug existed since the reducer was
introduced in d6ee08e.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Committed-By-Agent: claude
* Add IxJS iterator behavior test
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
* feat: add pipeline_sync_batch, --raw flag, and derived total counts
- Add pipeline_sync_batch to Engine interface, implementation, remote
engine, engine API (/pipeline_sync_batch), and service API
(/pipelines/{id}/sync_batch) with CLI subcommand. Returns EofPayload
as JSON instead of streaming NDJSON.
- Add --raw flag to pipelines sync CLI to dump raw NDJSON to stdout.
- Add total_record_count and total_state_count to ProgressPayload.derived.
- Fix states_per_second to include per-stream state counts.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Committed-By-Agent: claude
* Add takeThroughStates helper
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
* Add limit callback to takeThroughStates
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
* Refactor pipeline_sync_batch around state limits
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
* feat(cli): add --loop, --raw, --state-limit to sync_batch command
- --loop: repeat sync_batch until has_more is false
- --raw: output JSONL to stdout instead of progress to stderr
- --state-limit: stop after N source_state messages per request
- --time-limit: stop after N seconds per request
- Progress rendered via formatProgress after each iteration
- JSONL output (one line per eof) for piping into jq
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Committed-By-Agent: claude
* feat(cli): make --loop a count (default 1, 0 = unlimited)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Committed-By-Agent: claude
* feat(source-stripe): log Stripe-Rate-Limited-Reason on 429 retries
Extracts the stripe-rate-limited-reason header (global-rate,
global-concurrency, endpoint-rate, etc.) from 429 responses and
includes it in retry log messages.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Committed-By-Agent: claude
* fix: add total_record_count/total_state_count to derived progress in tests and update OpenAPI
- Add missing required `total_record_count` and `total_state_count` fields to
`derived` objects in test fixtures (engine, service, e2e, state-reducer tests)
- Regenerate engine and service OpenAPI specs (adds pipeline_sync_batch to table)
- Format-only refactors (no logic changes) in protocol.ts, helpers.ts, reducer.ts,
app.ts, src-websocket.ts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: codex <noreply@openai.com>1 parent d77349c commit f31d76b
37 files changed
Lines changed: 1582 additions & 61 deletions
File tree
- apps
- engine
- src
- __generated__
- __tests__
- api
- lib
- progress
- service/src
- __generated__
- __tests__
- api
- docs
- e2e
- packages
- logger/src/format
- protocol
- src
- iter-utils
- source-stripe/src
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
101 | 116 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
165 | 182 | | |
166 | 183 | | |
167 | 184 | | |
| |||
502 | 519 | | |
503 | 520 | | |
504 | 521 | | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
505 | 559 | | |
506 | 560 | | |
507 | 561 | | |
| |||
0 commit comments