Streaming replication for SQLite.
This report summarizes scanner evidence for benbjohnson/litestream, a Go project with 14,554 GitHub stars. SynthScan examined 120,090 lines of code across 284 source files, recording 155 pattern matches distributed across 11 syntactic categories. The legacy adjusted pattern signal is 1.9 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 153 finding(s).
Are imports declared and package/API names verified? 1 finding(s).
Are wrappers, guards, and repeated structures necessary? 4 finding(s).
Which changes need focused human review? 155 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 155 distinct pattern matches across 11 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | compactor_test.go | 121 | } | COMMENT |
| LOW | compactor.go | 21 | client ReplicaClient | COMMENT |
| LOW | db.go | 41 | COMMENT | |
| LOW | db.go | 121 | checkpointSecondsCounterVec *prometheus.CounterVec | COMMENT |
| LOW | db.go | 141 | // Time between automatic checkpoints in the WAL. This is done to allow | COMMENT |
| LOW | db.go | 161 | // Minimum time to retain L0 files after they have been compacted into L1. | COMMENT |
| LOW | db.go | 221 | return nil | COMMENT |
| LOW | replica_test.go | 101 | // a higher TXID, causing new writes to not be replicated. | COMMENT |
| LOW | replica_client.go | 21 | Type() string | COMMENT |
| LOW | db_internal_test.go | 2481 | } | COMMENT |
| LOW | db_internal_test.go | 3281 | // Root cause: checkpoint() does a pre-checkpoint sync to capture WAL state, | COMMENT |
| LOW | .goreleaser.yml | 181 | # signature: "${artifact}.zip" | COMMENT |
| LOW | vfs.go | 1821 | COMMENT | |
| LOW | cmd/litestream-test/scripts/reproduce-critical-bug.sh | 1 | #!/bin/bash | COMMENT |
| LOW | s3/replica_client.go | 421 | COMMENT | |
| LOW | tests/integration/profile_test.go | 21 | _ "modernc.org/sqlite" | COMMENT |
| LOW | tests/integration/overnight_s3_soak_test.go | 21 | // Requirements: | COMMENT |
| LOW | tests/integration/minio_soak_test.go | 21 | // Can be shortened with: go test -test.short (runs for 30 minutes) | COMMENT |
| LOW | tests/integration/shutdown_retry_test.go | 21 | "syscall" | COMMENT |
| LOW | tests/integration/soak_replicate_restore_test.go | 21 | COMMENT | |
| LOW | etc/litestream.yml | 1 | # AWS credentials | COMMENT |
| LOW | etc/litestream.yml | 21 | # # sign-accept-encoding: false | COMMENT |
| LOW | etc/litestream.yml | 41 | # Global options (defaults shown). All values below are commented out; they take | COMMENT |
| LOW | etc/litestream.yml | 61 | # l0-retention: 5m # default: 5m | COMMENT |
| LOW | internal/resumable_reader.go | 21 | // resumableReader wraps an io.ReadCloser from a remote storage backend with | COMMENT |
| LOW | .github/workflows/release.yml | 221 | # - name: Checkout | COMMENT |
| LOW | .github/workflows/release.yml | 241 | # security create-keychain -p actions temp.keychain | COMMENT |
| LOW | .github/workflows/release.yml | 261 | COMMENT | |
| LOW | .github/workflows/release.yml | 281 | # WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }} | COMMENT |
| LOW | webdav/replica_client.go | 221 | return ctx.Err() | COMMENT |
| LOW | webdav/replica_client.go | 241 | // Research shows HTTP chunked transfer encoding with WebDAV is unreliable: | COMMENT |
| LOW | webdav/replica_client.go | 261 | // 3. Seek back to start of temp file (now seekable + known size) | COMMENT |
| LOW | _examples/library/s3/main.go | 1 | // Example: Litestream Library Usage with S3 and Restore-on-Startup | COMMENT |
| LOW | src/sqlite3.h | 81 | # define SQLITE_APICALL | COMMENT |
| LOW | src/sqlite3.h | 441 | ** | COMMENT |
| LOW | src/sqlite3.h | 461 | #define SQLITE_CANTOPEN 14 /* Unable to open the database file */ | COMMENT |
| LOW | src/sqlite3.h | 501 | #define SQLITE_IOERR_SHORT_READ (SQLITE_IOERR | (2<<8)) | COMMENT |
| LOW | src/sqlite3.h | 521 | #define SQLITE_IOERR_SEEK (SQLITE_IOERR | (22<<8)) | COMMENT |
| LOW | src/sqlite3.h | 541 | #define SQLITE_CANTOPEN_FULLPATH (SQLITE_CANTOPEN | (3<<8)) | COMMENT |
| LOW | src/sqlite3.h | 561 | #define SQLITE_CONSTRAINT_TRIGGER (SQLITE_CONSTRAINT | (7<<8)) | COMMENT |
| LOW | src/sqlite3.h | 601 | #define SQLITE_OPEN_URI 0x00000040 /* Ok for sqlite3_open_v2() */ | COMMENT |
| LOW | src/sqlite3.h | 661 | ** read of the first page to access the database header. | COMMENT |
| LOW | src/sqlite3.h | 1221 | ** database is not a temp db, then the [SQLITE_FCNTL_RESET_CACHE] file-control | COMMENT |
| LOW | src/sqlite3.h | 1241 | #define SQLITE_FCNTL_TEMPFILENAME 16 | COMMENT |
| LOW | src/sqlite3.h | 1261 | #define SQLITE_FCNTL_CKPT_DONE 37 | COMMENT |
| LOW | src/sqlite3.h | 2181 | ** ability is deactivated. Any other initial value for the integer leaves the | COMMENT |
| LOW | src/sqlite3.h | 2201 | #define SQLITE_CONFIG_LOOKASIDE 13 /* int int */ | COMMENT |
| LOW | src/sqlite3.h | 2641 | ** the first argument. | COMMENT |
| LOW | src/sqlite3.h | 2661 | #define SQLITE_DBCONFIG_DQS_DML 1013 /* int int* */ | COMMENT |
| LOW | src/sqlite3.h | 3461 | #define SQLITE_DROP_INDEX 10 /* Index Name Table Name */ | COMMENT |
| LOW | src/sqlite3.h | 4321 | */ | COMMENT |
| LOW | src/sqlite3.h | 7741 | ** The collating sequence to be used for comparison can be found using | COMMENT |
| LOW | src/sqlite3.h | 8421 | ** prepared to accommodate additional static mutexes. | COMMENT |
| LOW | src/sqlite3.h | 8521 | ** These constants are the valid operation code parameters used | COMMENT |
| LOW | src/sqlite3.h | 8541 | #define SQLITE_TESTCTRL_JSON_SELFCHECK 14 | COMMENT |
| LOW | src/sqlite3.h | 9001 | #define SQLITE_DBSTATUS_LOOKASIDE_USED 0 | COMMENT |
| LOW | src/sqlite3.h | 11061 | #ifdef SQLITE_OMIT_FLOATING_POINT | COMMENT |
| LOW | src/sqlite3ext.h | 401 | #define sqlite3_bind_int sqlite3_api->bind_int | COMMENT |
| LOW | src/sqlite3ext.h | 421 | #define sqlite3_column_database_name16 sqlite3_api->column_database_name16 | COMMENT |
| LOW | src/sqlite3ext.h | 441 | #define sqlite3_create_collation16 sqlite3_api->create_collation16 | COMMENT |
| 13 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | replica_test.go | 123 | // Step 1: Create initial data and replicate | COMMENT |
| LOW | replica_test.go | 155 | // Step 2: Simulate hard recovery - remove database and .litestream directory, then restore | COMMENT |
| LOW | replica_test.go | 179 | // Step 3: Start replication and insert new data | COMMENT |
| LOW | replica_test.go | 210 | // Step 4: Simulate second hard recovery and restore again | COMMENT |
| LOW | replica_test.go | 232 | // Step 5: Verify the new data (value=2) exists in restored database | COMMENT |
| LOW⚡ | db_internal_test.go | 3332 | // Step 1: Initial sync — creates snapshot L0 with all current pages | COMMENT |
| LOW⚡ | db_internal_test.go | 3337 | // Step 2: Write data to grow the database significantly | COMMENT |
| LOW⚡ | db_internal_test.go | 3345 | // Step 3: Sync to capture the growth — creates incremental L0 | COMMENT |
| LOW⚡ | db_internal_test.go | 3353 | // Step 4: Run checkpoint CONCURRENTLY with more writes. | COMMENT |
| LOW | db_internal_test.go | 3472 | // Step 6: Verify all pages are covered across L0 files. | COMMENT |
| LOW⚡ | cmd/litestream-test/scripts/reproduce-critical-bug.sh | 63 | # Step 1: Create and populate initial database | COMMENT |
| LOW⚡ | cmd/litestream-test/scripts/reproduce-critical-bug.sh | 70 | # Step 2: Start Litestream replication | COMMENT |
| LOW⚡ | cmd/litestream-test/scripts/reproduce-critical-bug.sh | 84 | # Step 3: Start continuous writes | COMMENT |
| LOW⚡ | cmd/litestream-test/scripts/reproduce-critical-bug.sh | 91 | # Step 4: Let it run normally for 20 seconds | COMMENT |
| LOW⚡ | cmd/litestream-test/scripts/reproduce-critical-bug.sh | 100 | # Step 5: Kill Litestream (simulate crash) | COMMENT |
| LOW⚡ | cmd/litestream-test/scripts/reproduce-critical-bug.sh | 106 | # Step 6: Let writes continue for 15 seconds without Litestream | COMMENT |
| LOW⚡ | cmd/litestream-test/scripts/reproduce-critical-bug.sh | 111 | # Step 7: Execute non-PASSIVE checkpoint | COMMENT |
| LOW⚡ | cmd/litestream-test/scripts/reproduce-critical-bug.sh | 120 | # Step 8: Resume Litestream | COMMENT |
| LOW | cmd/litestream-test/scripts/reproduce-critical-bug.sh | 132 | # Step 9: Let Litestream catch up | COMMENT |
| LOW | cmd/litestream-test/scripts/reproduce-critical-bug.sh | 151 | # Step 10: Attempt to restore (THIS IS WHERE THE BUG OCCURS) | COMMENT |
| LOW | tests/integration/directory_watcher_test.go | 39 | // Step 1: Create 2 databases in separate tenant directories | COMMENT |
| LOW | tests/integration/directory_watcher_test.go | 53 | // Step 2: Add data to both databases | COMMENT |
| LOW | tests/integration/directory_watcher_test.go | 65 | // Step 3: Create 3 more databases at intervals | COMMENT |
| LOW | tests/integration/directory_watcher_test.go | 87 | // Step 4: Delete one database and verify cleanup | COMMENT |
| LOW | tests/integration/directory_watcher_test.go | 98 | // Step 5: Verify no critical errors in log | COMMENT |
| LOW⚡ | tests/integration/supabase-s3/test.sh | 29 | # Step 1: Build litestream | COMMENT |
| LOW⚡ | tests/integration/supabase-s3/test.sh | 36 | # Step 2: Start Supabase stack | COMMENT |
| LOW⚡ | tests/integration/supabase-s3/test.sh | 43 | # Step 3: Create bucket via Supabase REST API | COMMENT |
| LOW | tests/integration/supabase-s3/test.sh | 61 | # Step 4: Create and populate test database | COMMENT |
| LOW | tests/integration/supabase-s3/test.sh | 75 | # Step 5: Replicate to Supabase S3 | COMMENT |
| LOW | tests/integration/supabase-s3/test.sh | 101 | # Step 6: Restore and verify | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | replica_test.go | 123 | // Step 1: Create initial data and replicate | COMMENT |
| LOW | replica_test.go | 155 | // Step 2: Simulate hard recovery - remove database and .litestream directory, then restore | COMMENT |
| LOW | replica_test.go | 179 | // Step 3: Start replication and insert new data | COMMENT |
| LOW | replica_test.go | 210 | // Step 4: Simulate second hard recovery and restore again | COMMENT |
| LOW | replica_test.go | 232 | // Step 5: Verify the new data (value=2) exists in restored database | COMMENT |
| LOW⚡ | db_internal_test.go | 3332 | // Step 1: Initial sync — creates snapshot L0 with all current pages | COMMENT |
| LOW⚡ | db_internal_test.go | 3337 | // Step 2: Write data to grow the database significantly | COMMENT |
| LOW⚡ | db_internal_test.go | 3345 | // Step 3: Sync to capture the growth — creates incremental L0 | COMMENT |
| LOW⚡ | db_internal_test.go | 3353 | // Step 4: Run checkpoint CONCURRENTLY with more writes. | COMMENT |
| LOW | db_internal_test.go | 3472 | // Step 6: Verify all pages are covered across L0 files. | COMMENT |
| LOW⚡ | cmd/litestream-test/scripts/reproduce-critical-bug.sh | 63 | # Step 1: Create and populate initial database | COMMENT |
| LOW⚡ | cmd/litestream-test/scripts/reproduce-critical-bug.sh | 70 | # Step 2: Start Litestream replication | COMMENT |
| LOW⚡ | cmd/litestream-test/scripts/reproduce-critical-bug.sh | 84 | # Step 3: Start continuous writes | COMMENT |
| LOW⚡ | cmd/litestream-test/scripts/reproduce-critical-bug.sh | 91 | # Step 4: Let it run normally for 20 seconds | COMMENT |
| LOW⚡ | cmd/litestream-test/scripts/reproduce-critical-bug.sh | 100 | # Step 5: Kill Litestream (simulate crash) | COMMENT |
| LOW⚡ | cmd/litestream-test/scripts/reproduce-critical-bug.sh | 106 | # Step 6: Let writes continue for 15 seconds without Litestream | COMMENT |
| LOW⚡ | cmd/litestream-test/scripts/reproduce-critical-bug.sh | 111 | # Step 7: Execute non-PASSIVE checkpoint | COMMENT |
| LOW⚡ | cmd/litestream-test/scripts/reproduce-critical-bug.sh | 120 | # Step 8: Resume Litestream | COMMENT |
| LOW | cmd/litestream-test/scripts/reproduce-critical-bug.sh | 132 | # Step 9: Let Litestream catch up | COMMENT |
| LOW | cmd/litestream-test/scripts/reproduce-critical-bug.sh | 151 | # Step 10: Attempt to restore (THIS IS WHERE THE BUG OCCURS) | COMMENT |
| LOW | tests/integration/directory_watcher_test.go | 39 | // Step 1: Create 2 databases in separate tenant directories | COMMENT |
| LOW | tests/integration/directory_watcher_test.go | 53 | // Step 2: Add data to both databases | COMMENT |
| LOW | tests/integration/directory_watcher_test.go | 65 | // Step 3: Create 3 more databases at intervals | COMMENT |
| LOW | tests/integration/directory_watcher_test.go | 87 | // Step 4: Delete one database and verify cleanup | COMMENT |
| LOW | tests/integration/directory_watcher_test.go | 98 | // Step 5: Verify no critical errors in log | COMMENT |
| LOW⚡ | tests/integration/supabase-s3/test.sh | 29 | # Step 1: Build litestream | COMMENT |
| LOW⚡ | tests/integration/supabase-s3/test.sh | 36 | # Step 2: Start Supabase stack | COMMENT |
| LOW⚡ | tests/integration/supabase-s3/test.sh | 43 | # Step 3: Create bucket via Supabase REST API | COMMENT |
| LOW | tests/integration/supabase-s3/test.sh | 61 | # Step 4: Create and populate test database | COMMENT |
| LOW | tests/integration/supabase-s3/test.sh | 75 | # Step 5: Replicate to Supabase S3 | COMMENT |
| LOW | tests/integration/supabase-s3/test.sh | 101 | # Step 6: Restore and verify | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | cmd/litestream-test/populate.go | 262 | # Create a 1GB database with default settings | COMMENT |
| MEDIUM | cmd/litestream-test/populate.go | 265 | # Create a 2GB database with larger rows | COMMENT |
| MEDIUM | cmd/litestream-test/scripts/test-754-s3-scenarios.sh | 254 | # Create a short retention test with file replication for comparison | COMMENT |
| MEDIUM | .github/workflows/commit.yml | 388 | # Create the object store bucket | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | cmd/litestream-test/scripts/test-754-s3-scenarios.sh | 15 | # Check if we have S3 environment setup | COMMENT |
| LOW | cmd/litestream-test/scripts/test-754-s3-scenarios.sh | 293 | # Check if old files are cleaned up | COMMENT |
| LOW | cmd/litestream-test/scripts/test-s3-access-point.sh | 146 | # Check if Litestream is still running | COMMENT |
| LOW | …/litestream-test/scripts/test-s3-retention-large-db.sh | 389 | # Check if both databases cross the lock page boundary | COMMENT |
| LOW | …stream-test/scripts/test-s3-retention-comprehensive.sh | 397 | # Check if large database test crossed lock page boundary | COMMENT |
| LOW | cmd/litestream-test/scripts/test-upgrade-large-db.sh | 100 | # Check if replication is working | COMMENT |
| LOW | …itestream-test/scripts/test-simple-754-reproduction.sh | 39 | # Check if it's still running | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | .github/workflows/pr-metrics.yml | 268 | | Base (\`${context.payload.pull_request.base.sha.substring(0, 7)}\`) | ${fmt(baseSize)} | | | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | cmd/litestream-test/scripts/test-upgrade-large-db.sh | 50 | # Use our test harness to create large database quickly | COMMENT |
| MEDIUM | internal/resumable_reader.go | 38 | // of OpenLTXFile). Callers like io.ReadFull see a seamless byte stream because | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | etc/litestream.yml | 40 | # ------------------------------------------------------------------------------ | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | packages/python/scripts/test_wheel.py | 71 | def test_empty_wheel_directory(self): | CODE |
| LOW | .github/scripts/integration-test-paths.js | 3 | function hasRelevantIntegrationTestChanges(files, totalChangedFiles) { | CODE |
| LOW | .github/scripts/integration-test-paths.js | 44 | function isRelevantIntegrationTestPath(filename) { | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/local-soak.sh | 5 | # Usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | packages/python/scripts/test_wheel.py | 25 | CODE |