Skip to content
Closed
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
297 commits
Select commit Hold shift + click to select a range
b1775b7
test(destination-postgres): add newer_than_field stale write preventi…
tonyxiao Apr 19, 2026
5e1a59a
refactor: simplify engine pipeline, remove error classification, fix …
tonyxiao Apr 19, 2026
6aab54e
chore: gitignore scripts/test-all-accounts.sh
tonyxiao Apr 19, 2026
dcac404
feat(engine): add formatProgress for CLI-friendly progress display
tonyxiao Apr 19, 2026
1edf114
fix: resolve AsyncIterableIterator type error in pipeline_read
tonyxiao Apr 19, 2026
1953e4c
test(format): use inline snapshots for formatProgress tests
tonyxiao Apr 19, 2026
5d2b7a6
refactor(format): cleaner status icons, add prev diff support
tonyxiao Apr 19, 2026
320e380
style(format): colorful circle emojis for stream status
tonyxiao Apr 19, 2026
88091b9
fix(format): use 'Sync failed' label when status is failed
tonyxiao Apr 19, 2026
bd6918b
refactor(format): inline error, header row delta, many-stream test
tonyxiao Apr 19, 2026
d3c9baf
refactor(format): error on stream line, checkpoint deltas
tonyxiao Apr 19, 2026
9f59aff
feat(format): show states/s rate next to checkpoints
tonyxiao Apr 19, 2026
4c85029
refactor(format): rename rows → records
tonyxiao Apr 19, 2026
046456b
feat(cli): log formatted run progress to stderr during sync
tonyxiao Apr 19, 2026
c8b443d
refactor(format): use derived rates, collapse not-started streams
tonyxiao Apr 19, 2026
6854a28
refactor(format): show all streams, fix failed-while-active, move to …
tonyxiao Apr 19, 2026
00be73e
fix(progress): fix deriveStatus, rates at 0 elapsed, collapse not_sta…
tonyxiao Apr 19, 2026
58c42f7
refactor(format): list not-started stream names on one line
tonyxiao Apr 19, 2026
bb5e669
refactor(format): show stream count and not-started count
tonyxiao Apr 19, 2026
c83eda8
refactor(format): stream status summary in header, simple collapsed n…
tonyxiao Apr 19, 2026
4e10d41
refactor(format): use words instead of emojis in stream summary
tonyxiao Apr 19, 2026
8799e9e
refactor(format): stream count in header, status summary at end of he…
tonyxiao Apr 19, 2026
b91e24c
refactor(format): status breakdown after stream count
tonyxiao Apr 19, 2026
8061add
fix(progress): require _ts on messages, stamp in pipeline_sync loop
tonyxiao Apr 19, 2026
4141ef6
fix(scripts): verify mitmweb web UI responds after startup
tonyxiao Apr 19, 2026
69d8ab6
refactor(cli): sync command delegates to serve subprocess
tonyxiao Apr 19, 2026
0088d3d
fix(engine): count records for progress before destination consumes them
tonyxiao Apr 19, 2026
754af7c
fix(engine): destinations yield records through for pure progress red…
tonyxiao Apr 19, 2026
42424eb
fix: enable --conditions bun for dev by adding src to package files
tonyxiao Apr 19, 2026
ee07415
fix: show per-stream error messages in progress view
tonyxiao Apr 19, 2026
d490843
fix(destination-postgres): emit stream_status error instead of killin…
tonyxiao Apr 19, 2026
1548f50
fix(upsert): use `updated` for stale-write guard, only when column ex…
tonyxiao Apr 19, 2026
09b1833
feat(cli): default file-based state in ~/.stripe-sync/<key-hash>.json
tonyxiao Apr 19, 2026
7b49953
feat(source-stripe): dynamic segment budget per stream
tonyxiao Apr 19, 2026
c7a2d2d
feat(progress): show time range progress bar for backfill streams
tonyxiao Apr 19, 2026
cac73b1
refactor: rename StreamProgress.error → message, store skip reason too
tonyxiao Apr 19, 2026
36003cf
Merge remote-tracking branch 'origin/main' into tx/nary-search-pagina…
tonyxiao Apr 19, 2026
b28c33a
refactor(cli): lazy resolver in serve, tighten skippable error matching
tonyxiao Apr 19, 2026
b41821d
refactor: reconcile script to TypeScript, run with bun, add --output
tonyxiao Apr 19, 2026
9b8e861
fix(source-stripe): exclude billing_credit_balance_transactions from …
tonyxiao Apr 19, 2026
097ed17
refactor(source-stripe): budget-aware subdivision with singlePage pag…
tonyxiao Apr 19, 2026
e5c57d7
feat(util-postgres): add upsertWithStats for created/updated/deleted/…
tonyxiao Apr 19, 2026
6cb4913
refactor(util-postgres): make returningWriteStats internal to buildUp…
tonyxiao Apr 19, 2026
dc99cf9
refactor(protocol): extract async-iterable and nary-search utils to u…
tonyxiao Apr 19, 2026
2366f7a
refactor(source-stripe): import nary-search and mergeAsync from protocol
tonyxiao Apr 19, 2026
84292ce
feat(engine): add --plain flag and right-align progress columns
tonyxiao Apr 19, 2026
80de9c7
fix: remove injectWorkspacePackages, use --legacy for pnpm deploy
tonyxiao Apr 19, 2026
a5e0a9d
docs: add debugging guide, dev gotchas, and gitignore for tmp output
tonyxiao Apr 19, 2026
4dfe606
fix(scripts): default reconcile output to tmp/ with auto-mkdir
tonyxiao Apr 19, 2026
681c877
fix(nary-search): use range identity for lastObserved map, fix split …
tonyxiao Apr 19, 2026
a041f0a
fix(progress): truncate long messages in Ink display, show skip reasons
tonyxiao Apr 19, 2026
60bf992
fix(build): add @types/react to engine, jsx setting to service tsconfig
tonyxiao Apr 19, 2026
7715bba
chore: regenerate OpenAPI specs
tonyxiao Apr 19, 2026
e83c597
fix(source-stripe): treat 403 as per-stream error, not global fatal
tonyxiao Apr 19, 2026
f641c54
fix(protocol): use fixed epoch timestamp in emptySyncState
tonyxiao Apr 19, 2026
9ecdce5
fix(destination-postgres): update check test for collectFirst throw b…
tonyxiao Apr 19, 2026
f1ed0f5
feat(source-stripe): resolve account_created alongside account_id
tonyxiao Apr 19, 2026
a8802fe
feat(source-stripe): respect Retry-After header on rate limits
tonyxiao Apr 19, 2026
145daa7
feat(cli): cache resolved source config across sync runs
tonyxiao Apr 19, 2026
d7d7436
feat(e2e): add STREAMS env var filter for test-server-all-api
tonyxiao Apr 19, 2026
483f10c
fix(progress): show inline messages for both skipped and errored streams
tonyxiao Apr 19, 2026
c42ddeb
fix(progress): anchor started_at to first message timestamp, regen Op…
tonyxiao Apr 19, 2026
4203794
test(progress): update elapsed_ms tests for first-message anchoring
tonyxiao Apr 19, 2026
f752b2e
fix(progress): only anchor started_at on data messages, not control/eof
tonyxiao Apr 19, 2026
d8e01d4
feat(e2e): make test-server-all-api tuning knobs configurable via env
tonyxiao Apr 19, 2026
6e0ff95
fix(engine): update eof tests for has_more schema (replaces reason fi…
tonyxiao Apr 19, 2026
e2d882d
fix(engine): update tests for trace removal, eof/SyncState schema cha…
tonyxiao Apr 19, 2026
4237830
Reduce sync progress churn and early range splitting
tonyxiao Apr 19, 2026
4f043a8
fix(source-stripe): remove redundant source_state after range_complete
tonyxiao Apr 19, 2026
1529856
fix(tests): update discriminated union test, skip supabase bundle tests
tonyxiao Apr 19, 2026
79a45e4
fix(engine): update engine.test.ts for schema and progress reset changes
tonyxiao Apr 19, 2026
a55b66b
test(engine): skip cancellation integration test (pipeline refactor r…
tonyxiao Apr 19, 2026
a17e537
test(service): skip workflow error transition test (pipeline refactor…
tonyxiao Apr 19, 2026
caffc00
fix(source-stripe): add Identity to skippable errors, prefetch next p…
tonyxiao Apr 19, 2026
025f3b0
fix(e2e): update disconnect tests for EofPayload schema change
tonyxiao Apr 19, 2026
1c4c5bc
fix(e2e): use run_progress.elapsed_ms in disconnect tests
tonyxiao Apr 19, 2026
8198484
fix(e2e): simplify disconnect time limit assertions
tonyxiao Apr 19, 2026
e30f154
docs: add binary subdivision algorithm doc and diagram
tonyxiao Apr 19, 2026
1bf5ffb
refactor(protocol): simplify subdivision algorithm from N-ary to binary
tonyxiao Apr 19, 2026
60c9231
refactor(source-stripe): remove maxSegments, let rate limiter control…
tonyxiao Apr 19, 2026
0d383f8
refactor(source-stripe): remove singlePage prop from paginateRange
tonyxiao Apr 19, 2026
32283af
feat(source-stripe): breadth-first priming pass for stream backfills
tonyxiao Apr 19, 2026
a13e979
fix(source-stripe): restore breadth-first startup progress
tonyxiao Apr 19, 2026
b2a6b7d
fix(reconcile): align Sigma comparison with actual API list behavior
tonyxiao Apr 19, 2026
e1830ca
docs: add known Stripe API / OAS spec gaps tracker
tonyxiao Apr 19, 2026
2291ba1
fix(reconcile): stop skipping treasury_financial_accounts
tonyxiao Apr 19, 2026
3cf8c75
refactor(protocol): rename nary-search to binary-subdivision, add str…
tonyxiao Apr 19, 2026
fffc3bb
feat(protocol): switch subdivision from binary to N-ary (N=10 default)
tonyxiao Apr 19, 2026
307c858
feat(protocol): add subdivision logging, make factor a required param
tonyxiao Apr 19, 2026
47cbf5c
refactor(protocol): default subdivision factor back to 2 (binary)
tonyxiao Apr 19, 2026
54d6aa5
docs: add plan for structured request logging with ALS context
tonyxiao Apr 19, 2026
bc69cb1
chore: add prod_shop account to test-all-accounts.sh
tonyxiao Apr 19, 2026
0f024d7
fix(tests): fix CI failures in httpConnectStream, source-stripe, and …
tonyxiao Apr 19, 2026
7439c46
fix(e2e): update test-sync-engine to match refactored error handling
tonyxiao Apr 19, 2026
7cab9ff
fix(test): capture collect() result to define messages variable
tonyxiao Apr 19, 2026
7edf45c
fix(e2e): wrap SourceState in SyncState envelope for engine.pipeline_…
tonyxiao Apr 19, 2026
4887c29
fix(e2e): unset proxy env vars in connector-loading test
tonyxiao Apr 19, 2026
3a4d975
fix(e2e): handle proxy env in connector-loading test more robustly
tonyxiao Apr 19, 2026
5540238
fix(engine): copy __generated__ dir to dist during build
tonyxiao Apr 19, 2026
5961cd3
fix(source-stripe): skip treasury_financial_accounts without hint var…
tonyxiao Apr 19, 2026
b9155f1
chore: move known-api-gaps to tx/sync-my-data repo
tonyxiao Apr 19, 2026
0d52aa5
style: run prettier to fix formatting
tonyxiao Apr 19, 2026
19a96ac
style: format source-stripe index.test.ts
tonyxiao Apr 19, 2026
78f817d
fix(engine): update progress format inline snapshots
tonyxiao Apr 19, 2026
39660e2
fix(cli): restore subprocess delegation for sync command
tonyxiao Apr 19, 2026
3401637
fix(test): pass explicit empty env instead of stubbing
tonyxiao Apr 19, 2026
45f9226
fix(e2e): exclude v2_core_events from all-api test
tonyxiao Apr 19, 2026
d532c8c
feat(cli): add --state-dir flag, move default to ~/.stripe-sync-engine
tonyxiao Apr 19, 2026
e652f2a
fix(service): increase backfill time_limit from 10s to 30s
tonyxiao Apr 19, 2026
eeedf69
fix(service): return 404 for soft-deleted pipelines on GET
tonyxiao Apr 19, 2026
759e56d
feat(hono-zod-openapi): add automatic response validation middleware
tonyxiao Apr 19, 2026
c8a35ec
fix(source-stripe): avoid pathological empty probes on sparse data
tonyxiao Apr 19, 2026
8b022a0
Read service CLI spec from generated artifact
tonyxiao Apr 19, 2026
385432f
feat(cli): add --sync-engine-url flag, structured logging, Docker script
tonyxiao Apr 19, 2026
1d5dc76
fix(ts-cli): format error responses in CLI output
tonyxiao Apr 19, 2026
03f0dc4
fix(source-stripe): only subdivide the initial range, not recursively
tonyxiao Apr 19, 2026
b1020db
fix(ts-cli): pretty-print JSON error responses in CLI output
tonyxiao Apr 19, 2026
d4a4838
refactor: remove DANGEROUSLY_VERBOSE_LOGGING everywhere
tonyxiao Apr 19, 2026
06df00c
Add connector shorthand support for service CLI
tonyxiao Apr 19, 2026
eebedba
Check connectors when creating pipelines
tonyxiao Apr 20, 2026
cf4f038
Make service temporal integration optional
tonyxiao Apr 20, 2026
e4d55dc
fix(service): retry Temporal connection on startup
tonyxiao Apr 20, 2026
a40685d
Add friendly pipeline IDs to service CLI
tonyxiao Apr 20, 2026
a429742
style: run prettier on all modified files
tonyxiao Apr 20, 2026
1fc5c9d
feat(service): add POST /pipelines/:id/sync with streaming progress
tonyxiao Apr 20, 2026
6704fda
fix(e2e): wait for both row count AND ready status in network test
tonyxiao Apr 20, 2026
34b3439
fix(service): pass sync_state from pipeline to engine on ad-hoc sync
tonyxiao Apr 20, 2026
ac0d25a
feat(service): persist sync_state from eof, save progress, add sync_r…
tonyxiao Apr 20, 2026
46649a5
fix(service): fix progress field name and regenerate openapi spec
tonyxiao Apr 20, 2026
73f0adf
refactor(service): extract backfill loop into temporal/lib, wire sync…
tonyxiao Apr 20, 2026
ae3ec88
feat(service): add /pipelines/:id/sync_workflow_test route
tonyxiao Apr 20, 2026
63a8e5d
Run service and engine sync in process by default
tonyxiao Apr 20, 2026
a77da85
feat(service): log sync runs to file at DATA_DIR/pipelines/$id/sync_r…
tonyxiao Apr 20, 2026
0f8a3e0
chore: regenerate openapi specs
tonyxiao Apr 20, 2026
58dfc8a
fix: apply linter changes and format
tonyxiao Apr 20, 2026
a121e4c
fix(source-stripe): make setup() resilient to GET /account failures
tonyxiao Apr 20, 2026
d94ba10
feat(service): pretty CLI output with Ink, remove last_progress
tonyxiao Apr 20, 2026
1c0950c
Redirect mitmweb logs to tmp file
tonyxiao Apr 20, 2026
129bc48
Refine CLI flags and local mitm helpers
tonyxiao Apr 20, 2026
5c357da
fix(source-stripe): downgrade missing webhook_secret to non-fatal err…
tonyxiao Apr 20, 2026
98fc358
Enforce no-console and use pino in packages
tonyxiao Apr 20, 2026
df9be7e
Remove test-all-accounts script references
tonyxiao Apr 20, 2026
b4b0fca
feat(util-postgres): add PG_NO_PROXY support to bypass proxy for loca…
tonyxiao Apr 20, 2026
cd029fc
fix: regenerate openapi specs, fix lint errors, apply formatting
tonyxiao Apr 20, 2026
9bce1f2
fix: update format snapshots, direct pino loggers to stderr
tonyxiao Apr 20, 2026
72c5357
fix: use explicit UTC timezone in progress format for consistent output
tonyxiao Apr 20, 2026
3075df0
fix: ensure tmp/ directory exists before writing mitmweb logs
tonyxiao Apr 20, 2026
ccad532
Track stock envrc and ignore envrc.local
tonyxiao Apr 20, 2026
26e764b
feat(engine): add 30s timeout + debug logging to pipeline_setup
tonyxiao Apr 20, 2026
c1c52f2
feat: add structured query logging to all Postgres subsystems
tonyxiao Apr 20, 2026
a6cf5c2
fix(source-stripe): no retries for getAccount outside of check()
tonyxiao Apr 20, 2026
1f4ed3a
Add shared logger package and request context plumbing
tonyxiao Apr 20, 2026
0ac05c3
Preserve structured log fields in protocol logs
tonyxiao Apr 20, 2026
8c3638d
Enable streaming in mitmweb helper scripts
tonyxiao Apr 20, 2026
506c23b
Add tests for logger routing and setup logs
tonyxiao Apr 20, 2026
8c915c7
refactor: rename `logger` to `log` consistently across all packages
tonyxiao Apr 20, 2026
03a0521
refactor: rename logger → log in logger package tests
tonyxiao Apr 20, 2026
402695f
Replace yielded protocol logs with pino logging
tonyxiao Apr 20, 2026
db4b990
Centralize protocol log message construction
tonyxiao Apr 20, 2026
6fe3281
fix: resolve build and test failures from logger refactoring
tonyxiao Apr 20, 2026
ca2c93f
fix: update pnpm-lock.yaml to match package.json changes
tonyxiao Apr 20, 2026
fdd2ff2
Centralize logger defaults and protocol output
tonyxiao Apr 20, 2026
909082c
chore: apply linter changes and consolidate logger
tonyxiao Apr 20, 2026
7756f04
Update lockfile for unified React versions
tonyxiao Apr 20, 2026
98f8771
fix: regenerate lockfile with react-dom@19.2.5 override
tonyxiao Apr 20, 2026
96630d0
fix: pin react versions and apply formatting
tonyxiao Apr 20, 2026
6e99977
fix(e2e): allow @stripe/sync-logger as standalone package dependency
tonyxiao Apr 20, 2026
aa81aa7
fix(source-stripe): use bundled API version in tests, remove protocol…
tonyxiao Apr 20, 2026
4dd3e7d
fix(destination-google-sheets): restore protocol log yields for seman…
tonyxiao Apr 20, 2026
dda4d04
fix(destination-postgres): remove protocol log assertion from test
tonyxiao Apr 20, 2026
54602cf
fix(service): silence logs in CLI tests to prevent JSON parse corruption
tonyxiao Apr 20, 2026
5354d00
fix: keep CreatePipeline/UpdatePipeline inline in OpenAPI spec
tonyxiao Apr 20, 2026
0a34993
fix(e2e): include @stripe/sync-logger in connector-loading test tarballs
tonyxiao Apr 20, 2026
7251d64
fix: apply formatting, add logger tarball to connector-loading test
tonyxiao Apr 20, 2026
ef56fbb
chore: regenerate openapi specs
tonyxiao Apr 20, 2026
af0c560
fix(ci): replace --version smoke test with /health check
tonyxiao Apr 20, 2026
214e211
refactor(engine): remove source config caching from engine CLI
tonyxiao Apr 20, 2026
04d4ed4
refactor(engine): remove file-based state store and stateHash from CLI
tonyxiao Apr 20, 2026
8bd8885
refactor(engine): remove supabase CLI subcommand to break cyclic dep
tonyxiao Apr 20, 2026
a8b1142
refactor(engine): remove StateStore interface and file-based state
tonyxiao Apr 20, 2026
33c87e5
refactor(engine): remove all state management from engine layer
tonyxiao Apr 20, 2026
d529cea
chore: apply prettier formatting
tonyxiao Apr 20, 2026
59a9885
fix(ci): use port 3000 and validate JSON body in Docker smoke test
tonyxiao Apr 20, 2026
0fe4033
revert: remove JSON body mode from engine API (reverts #294)
tonyxiao Apr 20, 2026
f8eaa73
fix(engine): default rows/rowCount in /internal/query response
tonyxiao Apr 20, 2026
7ad803f
chore: regenerate OpenAPI specs after JSON body mode removal
tonyxiao Apr 20, 2026
e7e2079
refactor(cli): use kebab-case flags, rename --no-state to --reset-state
tonyxiao Apr 20, 2026
da94458
chore: regenerate OpenAPI specs and apply formatting
tonyxiao Apr 20, 2026
e676fc3
refactor(source-stripe): switch to streamingSubdivide for parallel ra…
tonyxiao Apr 20, 2026
cbf717f
feat(protocol): add schema $ref IDs for ProgressPayload, EofPayload, …
tonyxiao Apr 20, 2026
4e4a6c6
fix(progress): widen range bar to 60 cols and use strict fill threshold
tonyxiao Apr 20, 2026
d2f7666
fix(progress): 100% threshold for range bar, remove nextStep/SearchState
tonyxiao Apr 20, 2026
c3747e6
refactor: rename sync_run_id to run_id
tonyxiao Apr 20, 2026
af38bed
feat(protocol): extract RunStatus enum as named $ref schema
tonyxiao Apr 20, 2026
b1d4c50
feat(protocol): add top-level status field to EofPayload
tonyxiao Apr 20, 2026
4c2fa88
fix: add status to eof mock in service CLI test + formatting
tonyxiao Apr 20, 2026
c0b69d5
fix(protocol): add meta id for DestinationOutput to fix broken $ref
tonyxiao Apr 20, 2026
9e6c287
feat(engine): populate time_ceiling on sync run initialization
tonyxiao Apr 20, 2026
57585fd
test(engine): add time_ceiling state reducer tests
tonyxiao Apr 20, 2026
fe0eb82
fix(service): make api_version optional, add --engine-url to sync CLI
tonyxiao Apr 20, 2026
3bd9b0a
fix(service): don't pass state to simulate_webhook_sync
tonyxiao Apr 20, 2026
498928d
docs: add known gaps section to stream state machine plan
tonyxiao Apr 20, 2026
9927b4a
refactor(protocol): remove legacy envelope helpers (logMessage, state…
tonyxiao Apr 20, 2026
656eb97
fix: remove tests for deleted legacy helpers (stateMsg, destinationCo…
tonyxiao Apr 20, 2026
f8b7240
refactor(service): replace engineMsg.log with pino, simplify webhook …
tonyxiao Apr 20, 2026
1b37153
fix(ci): don't fail early on mitmweb subprocess exit
tonyxiao Apr 20, 2026
7c231e8
fix(service): restore onError handler for sync ndjson response
tonyxiao Apr 20, 2026
4ec8fbb
fix(ci): revert mitmweb wait to single call with || true
tonyxiao Apr 21, 2026
19e4780
fix(ci): use safe arithmetic in mitmweb test to avoid set -e exit
tonyxiao Apr 21, 2026
4d85791
fix(progress): connection_status failure takes priority over active s…
tonyxiao Apr 21, 2026
794777d
Fix false setup timeout logging
tonyxiao Apr 21, 2026
0d0f640
fix(engine): show failed status in eof log formatting
tonyxiao Apr 21, 2026
1971f8f
fix(source-stripe): don't fail on GET /v1/account when account_id is …
tonyxiao Apr 21, 2026
1423ed2
fix(logger): narrow url redaction to postgres.url only
tonyxiao Apr 21, 2026
f4d1050
fix(util-postgres): stop logging query bind values
tonyxiao Apr 21, 2026
09529db
feat(cli): add --x-pipeline flag to pipelines create/update
tonyxiao Apr 21, 2026
86dad58
feat(service): add --skip-check flag to pipelines create/update
tonyxiao Apr 21, 2026
43e2dc0
fix(source-stripe): prevent NaN in created[gte] query param
tonyxiao Apr 21, 2026
47d5fc1
fix(source-stripe): fill empty gte from accountCreated
tonyxiao Apr 21, 2026
9b25032
feat(cli): support connector shorthand overrides on pipelines get and…
tonyxiao Apr 21, 2026
7a0eaad
feat(cli): add --reset-state to pipelines get, validate override keys
tonyxiao Apr 21, 2026
7120a16
Add query start logging for Postgres
tonyxiao Apr 21, 2026
082254d
feat(cli): validate connector overrides against OAS config schema
tonyxiao Apr 21, 2026
9f993e8
feat(protocol): make time_range bounds optional, add to PipelineConfig
tonyxiao Apr 21, 2026
fcd23ed
fix(cli): merge connector overrides with existing pipeline config
tonyxiao Apr 21, 2026
0bfa987
fix(cli): catch connector override validation errors cleanly
tonyxiao Apr 21, 2026
ff88287
feat(postgres): add connection and query debug logs
tonyxiao Apr 21, 2026
487008a
style: clean up formatting and whitespace
tonyxiao Apr 21, 2026
0562fcf
Preserve continuation progress in bounded syncs
tonyxiao Apr 21, 2026
48c2c9a
Simplify sync CLI chunking flags
tonyxiao Apr 21, 2026
eb208b3
chore(ci): upgrade dorny/paths-filter v3 → v4
tonyxiao Apr 21, 2026
62fea0a
Keep chunked sync running through errors
tonyxiao Apr 21, 2026
a096987
refactor(cli): rename --sync-run-id to --run-id
tonyxiao Apr 21, 2026
62d65db
feat(logger): add pretty log printer and move progress formatting
tonyxiao Apr 21, 2026
a52cae2
fix(logger): put data key-value pairs on separate indented lines
tonyxiao Apr 21, 2026
87b1a27
fix(logger): deeper data indent, full ISO in time ranges
tonyxiao Apr 21, 2026
386a90a
fix(logger): use half-open interval notation [gte, lt) for time ranges
tonyxiao Apr 21, 2026
f70f315
fix(logger): use exact protocol type names, no padding, second precision
tonyxiao Apr 21, 2026
b2fe845
fix(logger): consistent 4-space indent for data and progress blocks
tonyxiao Apr 21, 2026
7f918f3
feat(logger): eof in bordered box, progress on own line
tonyxiao Apr 21, 2026
8019c93
fix(logger): indent progress content by 4 spaces
tonyxiao Apr 21, 2026
334c008
Thread abort signal to HTTP retries in withRateLimit
tonyxiao Apr 21, 2026
3db9709
refactor(source-stripe): derive concurrent streams from rate_limit
tonyxiao Apr 21, 2026
1f34b6d
chore: regenerate OpenAPI specs after removing max_concurrent_streams
tonyxiao Apr 21, 2026
08cfe14
chore: regenerate OpenAPI specs after removing max_concurrent_streams
tonyxiao Apr 21, 2026
2d3f736
Use AbortError consistently for pipeline abort signals
tonyxiao Apr 21, 2026
28dd137
fix(util-postgres): strip SSL params from connection string in proxy …
tonyxiao Apr 21, 2026
2477364
revert(util-postgres): comment out SSL stripping from connection string
tonyxiao Apr 21, 2026
d4cb4ee
refactor(util-postgres): extract normalizePgSslConfig as standalone f…
tonyxiao Apr 21, 2026
5d31a42
feat(util-postgres): gate SSL normalization with PG_NORMALIZE_SSL env…
tonyxiao Apr 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions apps/engine/src/__generated__/openapi.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 29 additions & 11 deletions apps/engine/src/__generated__/openapi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 9 additions & 19 deletions apps/engine/src/api/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,9 @@ const REASON_EMOJI: Record<string, string> = {

const STATUS_EMOJI: Record<string, string> = {
complete: '✅',
started: '🔄',
start: '🔄',
running: '🔄',
transient_error: '⚠️',
system_error: '❌',
config_error: '❌',
auth_error: '🔒',
range_complete: '🔄',
}

function formatEof(eof: EofPayload): string {
Expand All @@ -165,6 +162,11 @@ function formatEof(eof: EofPayload): string {
const activeStreams: { name: string; rows: number; rps: string }[] = []

for (const [name, s] of Object.entries(sp)) {
if (s.errors?.length) {
errored++
const errMsg = s.errors[0]?.message ?? 'unknown error'
errorStreams.push(`❌ ${name}: ${errMsg}`)
}
if (s.status === 'complete') {
complete++
if (s.run_record_count > 0) {
Expand All @@ -174,7 +176,7 @@ function formatEof(eof: EofPayload): string {
rps: s.records_per_second?.toFixed(1) ?? '0',
})
}
} else if (s.status === 'started' || s.status === 'running') {
} else if (s.status === 'start' || s.status === 'running') {
inProgress++
if (s.run_record_count > 0) {
activeStreams.push({
Expand All @@ -183,15 +185,6 @@ function formatEof(eof: EofPayload): string {
rps: s.records_per_second?.toFixed(1) ?? '0',
})
}
} else if (
s.status === 'transient_error' ||
s.status === 'system_error' ||
s.status === 'config_error' ||
s.status === 'auth_error'
) {
errored++
const errMsg = s.errors?.[0]?.message ?? s.status
errorStreams.push(`${STATUS_EMOJI[s.status]} ${name}: ${errMsg}`)
} else {
pending++
}
Expand Down Expand Up @@ -475,10 +468,7 @@ export async function createApp(resolver: ConnectorResolver) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function getPipeline(c: any): z.infer<typeof TypedPipelineConfig> {
if (isJsonBody(c)) return c.req.valid('json').pipeline
return requireHeaderValue(
c.req.valid('header')['x-pipeline'],
'x-pipeline header is required'
)
return requireHeaderValue(c.req.valid('header')['x-pipeline'], 'x-pipeline header is required')
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down
17 changes: 11 additions & 6 deletions apps/engine/src/lib/backfill.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,14 @@ describe('pipelineSyncUntilComplete', () => {
])
expect(result.attempts).toBe(2)
expect(result.eof.reason).toBe('complete')
expect(onState).toHaveBeenLastCalledWith({
source: { streams: { customers: { cursor: 'cus_1' } }, global: {} },
destination: { streams: {}, global: {} },
engine: { streams: {}, global: {} },
}, 1)
expect(onState).toHaveBeenLastCalledWith(
{
source: { streams: { customers: { cursor: 'cus_1' } }, global: {} },
destination: { streams: {}, global: {} },
engine: { streams: {}, global: {} },
},
1
)
})

it('throws when pipeline_sync ends with an unexpected eof reason', async () => {
Expand All @@ -84,7 +87,9 @@ describe('pipelineSyncUntilComplete', () => {
pipeline_teardown: vi.fn(),
pipeline_read: vi.fn(),
pipeline_write: vi.fn(),
pipeline_sync: vi.fn(() => toAsync<SyncOutput>([{ type: 'eof', eof: { reason: 'aborted' } }])),
pipeline_sync: vi.fn(() =>
toAsync<SyncOutput>([{ type: 'eof', eof: { reason: 'aborted' } }])
),
} as unknown as Engine

await expect(pipelineSyncUntilComplete(engine, pipeline)).rejects.toThrow(
Expand Down
7 changes: 4 additions & 3 deletions apps/engine/src/lib/backfill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import type { EofPayload, PipelineConfig, SourceStateMessage } from '@stripe/syn
import { emptySyncState, type SyncOutput, type SyncState } from '@stripe/sync-protocol'
import type { Engine, SourceReadOptions } from './engine.js'

export interface PipelineSyncUntilCompleteOptions
extends Omit<SourceReadOptions, 'state'> {
export interface PipelineSyncUntilCompleteOptions extends Omit<SourceReadOptions, 'state'> {
state?: SyncState
onAttempt?: (attempt: number, state: SyncState | undefined) => void | Promise<void>
onMessage?: (message: SyncOutput, attempt: number) => void | Promise<void>
Expand Down Expand Up @@ -66,7 +65,9 @@ export async function pipelineSyncUntilComplete(
}

if (eof.reason !== 'state_limit' && eof.reason !== 'time_limit') {
throw new Error(`pipeline_sync attempt ${attempts} ended with unexpected eof reason: ${eof.reason}`)
throw new Error(
`pipeline_sync attempt ${attempts} ended with unexpected eof reason: ${eof.reason}`
)
}
}
}
Loading
Loading