99% of Queries in Zero Milliseconds
This report summarizes scanner evidence for rocicorp/mono, a TypeScript project with 3,431 GitHub stars. SynthScan examined 346,212 lines of code across 1363 source files, recording 438 pattern matches distributed across 9 syntactic categories. The legacy adjusted pattern signal is 1.5 (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? 426 finding(s).
Are imports declared and package/API names verified? 9 finding(s).
Are wrappers, guards, and repeated structures necessary? 303 finding(s).
Which changes need focused human review? 438 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 438 distinct pattern matches across 9 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 | tools/verify-package-deps/src/verify-package-deps.ts | 158 | async function analyzePackageDependencies(): Promise<AnalyzeResult> { | CODE |
| LOW | tools/verify-package-deps/src/verify-package-deps.ts | 447 | async function verifyPackageJsonDependencies(fix: boolean) { | CODE |
| LOW | scripts/src/shared.ts | 197 | export function assertNpmZeroVersionExists( | CODE |
| LOW | scripts/src/release/create-tag.ts | 85 | export function validateCreateReleaseTagArgs({ | CODE |
| LOW | scripts/src/release/create-tag.ts | 103 | function createCanaryVersionCommit({ | CODE |
| LOW | packages/zero-cache/src/types/lite.ts | 116 | export function mapLiteDataTypeToZqlSchemaValue( | CODE |
| LOW | packages/zero-cache/src/types/lite.ts | 125 | function mapLiteDataTypeToZqlValueType(dataType: LiteTypeString): ValueType { | CODE |
| LOW | packages/zero-cache/src/types/lite.ts | 231 | export function assertValidLiteColumnSpec(spec: ColumnSpec) { | CODE |
| LOW | packages/zero-cache/src/types/pg.ts | 127 | export function millisecondsToPostgresTime(milliseconds: number): string { | CODE |
| LOW | packages/zero-cache/src/types/pg.ts | 154 | export function postgresTimeToMilliseconds(timeString: string): number { | CODE |
| LOW | packages/zero-cache/src/types/pg.ts | 593 | function isPostgresStartupConnectionError(e: unknown) { | CODE |
| LOW | packages/zero-cache/src/test/replica-state.ts | 101 | function canonicalPhysicalDataType(dataType: string) { | CODE |
| LOW | packages/zero-cache/src/test/lite.ts | 78 | export function expectMatchingObjectsInTables( | CODE |
| LOW | packages/zero-cache/src/config/normalize.ts | 49 | function defaultMultipartConcurrency(multipartSize: number): number { | CODE |
| LOW | packages/zero-cache/src/auth/load-permissions.ts | 64 | export function reloadPermissionsIfChanged( | CODE |
| LOW | packages/zero-cache/src/server/otel-diag-logger.ts | 39 | export function setupOtelDiagnosticLogger( | CODE |
| LOW | packages/zero-cache/src/server/otel-diag-logger.ts | 78 | export function resetOtelDiagnosticLogger(): void { | CODE |
| LOW | packages/zero-cache/src/server/replicator.ts | 328 | function observeWalUncheckpointedBytes( | CODE |
| LOW⚡ | packages/zero-cache/src/observability/metrics.ts | 54 | export function getOrCreateUpDownCounter( | CODE |
| LOW⚡ | packages/zero-cache/src/observability/metrics.ts | 59 | export function getOrCreateUpDownCounter( | CODE |
| LOW⚡ | packages/zero-cache/src/observability/metrics.ts | 64 | export function getOrCreateUpDownCounter( | CODE |
| LOW | packages/zero-cache/src/observability/metrics.ts | 120 | export function getOrCreateValueHistogram( | CODE |
| LOW | packages/zero-cache/src/observability/metrics.ts | 120 | export function getOrCreateValueHistogram( | CODE |
| LOW | packages/zero-cache/src/observability/metrics.ts | 137 | export function getOrCreateHistogram( | CODE |
| LOW | packages/zero-cache/src/observability/metrics.ts | 161 | export function getOrCreateNativeHistogram( | CODE |
| LOW | packages/zero-cache/src/observability/metrics.ts | 161 | export function getOrCreateNativeHistogram( | CODE |
| LOW | packages/zero-cache/src/observability/metrics.ts | 193 | export function getOrCreateLatencyHistogram( | CODE |
| LOW | packages/zero-cache/src/observability/metrics.ts | 193 | export function getOrCreateLatencyHistogram( | CODE |
| LOW⚡ | packages/zero-cache/src/observability/metrics.ts | 207 | export function getOrCreateCounter( | CODE |
| LOW⚡ | packages/zero-cache/src/observability/metrics.ts | 212 | export function getOrCreateCounter( | CODE |
| LOW⚡ | packages/zero-cache/src/observability/metrics.ts | 217 | export function getOrCreateCounter( | CODE |
| LOW⚡ | packages/zero-cache/src/observability/metrics.ts | 232 | export function getOrCreateGauge( | CODE |
| LOW⚡ | packages/zero-cache/src/observability/metrics.ts | 237 | export function getOrCreateGauge( | CODE |
| LOW⚡ | packages/zero-cache/src/observability/metrics.ts | 242 | export function getOrCreateGauge( | CODE |
| LOW | packages/zero-cache/src/db/lite-tables.ts | 259 | export function computeZqlSpecsFromLiteSpecs( | CODE |
| LOW | packages/zero-cache/src/db/migration.ts | 198 | export async function createVersionHistoryTable( | CODE |
| LOW | packages/zero-cache/src/db/sqlite-corruption.ts | 56 | export function registerSQLiteCorruptionDiagnosticTarget( | CODE |
| LOW | packages/zero-cache/src/db/sqlite-corruption.ts | 65 | export function logLastChanceSQLiteCorruptionDiagnostics( | CODE |
| LOW | packages/zero-cache/src/db/sqlite-corruption.ts | 88 | export function logSQLiteCorruptionDiagnostics( | CODE |
| LOW | packages/zero-cache/src/workers/rehome.ts | 15 | export function expiredAffinityCookieHeader({ | CODE |
| LOW | packages/zero-cache/src/workers/connection.ts | 684 | function webSocketSendTimeoutError(): ProtocolErrorWithLevel { | CODE |
| LOW | packages/zero-cache/src/workers/replicator.ts | 56 | export function replicatorDeletesStaleChangeLog( | CODE |
| LOW | packages/zero-cache/src/workers/syncer.ts | 92 | export function computePipelineDedupStats( | CODE |
| LOW | packages/zero-cache/src/workers/syncer.ts | 175 | function lowerBoundReplicaReadyTimeMs( | CODE |
| LOW | packages/zero-cache/src/workers/syncer.ts | 245 | function computeServingLagDistributionMs( | CODE |
| LOW | packages/zero-cache/src/workers/syncer.ts | 326 | function getWebSocketServerOptions(config: ZeroConfig): ServerOptions { | CODE |
| LOW | packages/zero-cache/src/custom/fetch.ts | 528 | function apiResponseErrorMetricAttrs( | CODE |
| LOW | packages/zero-cache/src/services/plannerz.ts | 263 | export function buildPlannerzBundleFromDB( | CODE |
| LOW | …che/src/services/change-source/pg/replication-slots.ts | 608 | export function dropInactiveSlotsAndReplicas( | CODE |
| LOW | …che/src/services/change-source/pg/replication-slots.ts | 738 | function replicationSlotManagementLock(shard: ShardID) { | CODE |
| LOW | …ro-cache/src/services/change-source/pg/initial-sync.ts | 1031 | function initialSyncCopyOtherDuration() { | CODE |
| LOW | …ro-cache/src/services/change-source/pg/initial-sync.ts | 1068 | function initialSyncCompletedCopyStream() { | CODE |
| LOW | …ro-cache/src/services/change-source/pg/initial-sync.ts | 1125 | function initialSyncDurationHistogram(name: string, description: string) { | CODE |
| LOW | …ro-cache/src/services/change-source/pg/initial-sync.ts | 1140 | function initialSyncRunMetricAttrs(attrs: InitialSyncRunMetricAttrs) { | CODE |
| LOW | …ro-cache/src/services/change-source/pg/initial-sync.ts | 1147 | function recordInitialSyncRunMetrics( | CODE |
| LOW | …cache/src/services/change-source/pg/backfill-stream.ts | 526 | async function createSnapshotTransaction( | CODE |
| LOW | …c/services/change-source/pg/replication-slot-health.ts | 43 | export function registerReplicationSlotHealthMetrics( | CODE |
| LOW | …c/services/change-source/pg/replication-slot-health.ts | 108 | export async function queryReplicationSlotHealth( | CODE |
| LOW | …o-cache/src/services/change-source/pg/change-source.ts | 1762 | export function isIndexStructurallyChanged( | CODE |
| LOW | …o-cache/src/services/change-source/pg/change-source.ts | 1905 | function summarizeReplicationEventForLog(event: ReplicationEvent): JSONObject { | CODE |
| 240 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | vitest.config.ts | 1 | import {readdirSync} from 'node:fs'; | COMMENT |
| LOW | pnpm-workspace.yaml | 21 | ignoreGhsas: | COMMENT |
| LOW | packages/zero-cache/src/server/anonymous-otel-start.ts | 41 | #totalCrudMutations = 0; | COMMENT |
| LOW | packages/zero-cache/src/server/change-streamer.ts | 381 | // also necessary to avoid a self-deadlock when CHANGE_DB == | COMMENT |
| LOW | packages/zero-cache/src/server/replicator.ts | 361 | COMMENT | |
| LOW | packages/zero-cache/src/db/pg-to-lite.ts | 81 | // Maps to '[]' (JSON empty array) in SQLite. | COMMENT |
| LOW | packages/zero-cache/src/db/migration-lite.ts | 161 | // | COMMENT |
| LOW | packages/zero-cache/src/workers/connection.ts | 101 | ); | COMMENT |
| LOW | packages/zero-cache/src/workers/connection.ts | 121 | value: unknown, | COMMENT |
| LOW | packages/zero-cache/src/services/life-cycle.ts | 801 | COMMENT | |
| LOW | …/zero-cache/src/services/change-source/protocol/mod.ts | 1 | // Types are externally exported under stable versions. Code within | COMMENT |
| LOW | …he/src/services/change-source/protocol/current/data.ts | 21 | // - 'p' is for parsed JSON, which may include JSON values or JSON objects. | COMMENT |
| LOW | …he/src/services/change-source/protocol/current/data.ts | 161 | // and column names of a requested backfill still match the original | COMMENT |
| LOW | …he/src/services/change-source/protocol/current/data.ts | 201 | COMMENT | |
| LOW | …he/src/services/change-source/protocol/current/data.ts | 301 | COMMENT | |
| LOW | …he/src/services/change-source/protocol/current/data.ts | 321 | // within the stream, for resumption / continuity enforcement. | COMMENT |
| LOW | …he/src/services/change-source/protocol/current/data.ts | 341 | // and is contiguous with or earlier than its own progressMark. | COMMENT |
| LOW | …he/src/services/change-source/protocol/current/data.ts | 381 | // enclosing transaction. | COMMENT |
| LOW | …che/src/services/change-source/pg/replication-slots.ts | 81 | COMMENT | |
| LOW | …o-cache/src/services/change-source/pg/change-source.ts | 1201 | // The DDL event that provides command-tag context for a subsequent | COMMENT |
| LOW | …o-cache/src/services/change-source/pg/change-source.ts | 1301 | }); | COMMENT |
| LOW | …he/src/services/change-source/pg/change-source-init.ts | 361 | restoreFrom.id === replicateTo.id && restoreFrom.pgChangeLog; | COMMENT |
| LOW | …he/src/services/change-source/pg/change-source-init.ts | 381 | // `waitForStoredTxPastSlot` in getSourceAndDestinationReplicas()). | COMMENT |
| LOW | …ache/src/services/change-source/pg/schema/published.ts | 121 | // To address this, the pg_attribute rows are looked up for the index's | COMMENT |
| LOW | …zero-cache/src/services/change-source/pg/schema/ddl.ts | 1 | import {literal as lit} from 'pg-format'; | COMMENT |
| LOW | …zero-cache/src/services/change-source/pg/schema/ddl.ts | 21 | // by REFRESH MATERIALIZED VIEW CONCURRENTLY. | COMMENT |
| LOW | …he/src/services/change-source/common/replica-schema.ts | 321 | // (`${replicaFile}-change-log`), so the replica's copy is dead weight in | COMMENT |
| LOW | …ges/zero-cache/src/services/view-syncer/view-syncer.ts | 2321 | ); | COMMENT |
| LOW | …ges/zero-cache/src/services/view-syncer/view-syncer.ts | 4441 | // A global Lock acts as a queue to run a single IVM time slice per iteration | COMMENT |
| LOW | …ges/zero-cache/src/services/view-syncer/snapshotter.ts | 1201 | COMMENT | |
| LOW | …ges/zero-cache/src/services/view-syncer/schema/init.ts | 241 | // V13 adds instances."ttlClock" | COMMENT |
| LOW | packages/zero-cache/src/services/mutagen/mutagen.ts | 201 | lc = lc.withContext('processMutation'); | COMMENT |
| LOW | packages/zero-cache/src/services/mutagen/mutagen.ts | 221 | // lastMutationID. Then return the error to the app. | COMMENT |
| LOW | packages/zero-cache/src/services/mutagen/mutagen.ts | 241 | // | COMMENT |
| LOW | …c/services/change-streamer/sqlite-change-log-reader.ts | 201 | const last = rows.at(-1); | COMMENT |
| LOW | …rc/services/change-streamer/change-streamer-service.ts | 541 | // Resolves, once the lag reporter has been started (or failed to start) in | COMMENT |
| LOW | …rc/services/change-streamer/change-streamer-service.ts | 1001 | // assertable form of invariant 1: a synchronous SQLite commit in the | COMMENT |
| LOW | …ages/zero-cache/src/services/change-streamer/storer.ts | 1321 | // forwarded to subscribers (the backup replica and view-syncers) | COMMENT |
| LOW | …/zero-cache/src/services/change-streamer/subscriber.ts | 121 | readonly #wsBatched: boolean; | COMMENT |
| LOW | …/zero-cache/src/services/change-streamer/subscriber.ts | 461 | } finally { | COMMENT |
| LOW | …s/zero-cache/src/services/change-streamer/forwarder.ts | 41 | ); | COMMENT |
| LOW | …-cache/src/services/change-streamer/change-streamer.ts | 81 | COMMENT | |
| LOW | …-cache/src/services/change-streamer/change-streamer.ts | 101 | // v6: v0.26 | COMMENT |
| LOW | …ro-cache/src/services/change-streamer/schema/tables.ts | 301 | const stmts: PendingQuery<Row[]>[] = []; | COMMENT |
| LOW | …zero-cache/src/services/replicator/change-processor.ts | 501 | Object.values(row), | COMMENT |
| LOW | …zero-cache/src/services/replicator/change-processor.ts | 721 | // representation for existing and future values. | COMMENT |
| LOW | …zero-cache/src/services/replicator/change-processor.ts | 921 | // Only columns that are still being backfilled on _this_ replica are | COMMENT |
| LOW | …ero-cache/src/services/replicator/schema/change-log.ts | 41 | * earlier reduces wasted work. | COMMENT |
| LOW | …ero-cache/src/services/replicator/schema/change-log.ts | 61 | // : 'd' for delete | COMMENT |
| LOW | …he/src/services/replicator/schema/replication-state.ts | 41 | // replica is reset or if there are ever multiple replicas). | COMMENT |
| LOW | packages/z2s/src/sql.ts | 301 | // For comparison cast to an unbounded type, not the specific column | COMMENT |
| LOW | packages/zero-protocol/src/ast.ts | 501 | readonly schema?: string | undefined; | COMMENT |
| LOW | packages/zero-protocol/src/protocol-version.ts | 21 | // -- Version 7 introduces the initConnection.clientSchema field. (0.17) | COMMENT |
| LOW | packages/zero-protocol/src/protocol-version.ts | 41 | // -- version 30 adds an optional primaryKey to the ClientSchema (0.24) | COMMENT |
| LOW | packages/zero-protocol/src/protocol-version.ts | 61 | // -- version 50 adds OTEL headers to push and query messages | COMMENT |
| LOW | packages/zero-solid/src/solid-view.ts | 81 | readonly #retry: () => void; | COMMENT |
| LOW | packages/zero-client/src/util/nanoid.ts | 1 | // This is taken from https://github.com/ai/nanoid/blob/main/index.browser.js We | COMMENT |
| LOW | packages/zero-client/src/client/zero.test.ts | 3001 | } | COMMENT |
| LOW | …kages/zero-client/src/client/zero-poke-handler.test.ts | 581 | }, | COMMENT |
| LOW | packages/zero-client/src/client/zero.ts | 441 | // on disconnect. | COMMENT |
| 56 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH⚡ | packages/shared/src/bench-format.ts | 247 | print(ansi.bold + header + ansi.reset); | CODE |
| HIGH⚡ | packages/shared/src/bench-format.ts | 248 | print(ansi.gray + sep + ansi.reset); | CODE |
| HIGH⚡ | packages/shared/src/bench-format.ts | 250 | print(header); | CODE |
| HIGH⚡ | packages/shared/src/bench-format.ts | 251 | print(sep); | CODE |
| HIGH | packages/shared/src/bench-format.ts | 288 | print(l); | CODE |
| HIGH | packages/shared/src/bench-format.ts | 319 | print(l); | CODE |
| HIGH | packages/shared/src/bench-format.ts | 351 | print(l); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | packages/zero-client/src/client/custom.test.ts | 211 | await z.mutate.level1.level2.level3.createIssue({ | CODE |
| CRITICAL | packages/zero-client/src/client/custom.test.ts | 227 | await z.mutate.level1.level2.level3.updateTitle({ | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | packages/zql/src/ivm/view-apply-change.ts | 294 | // label.creator ──────────► [User:rc=2] (one row, two refs) | COMMENT |
| MEDIUM | packages/zero-react/src/navigation-race.test.tsx | 8 | // ────────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/zero-react/src/navigation-race.test.tsx | 26 | // ────────────────────────────────────────────────────────────────────────────── | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | …ro-cache/src/services/change-streamer/schema/tables.ts | 558 | // Step 1: Find backends that are blocked waiting for a lock, | COMMENT |
| LOW | …ro-cache/src/services/change-streamer/schema/tables.ts | 574 | // Step 2: For each blocked backend, find and terminate its blockers | COMMENT |
| LOW | packages/replicache/src/sync/patch-putmany-diff.test.ts | 52 | // Step 1: Simulate poke 1-3 building base via apply (putMany) | COMMENT |
| LOW | packages/replicache/src/sync/patch-putmany-diff.test.ts | 80 | // Step 2: Simulate poke 4 with 4913 puts, overlapping base | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | …ro-cache/src/services/change-streamer/schema/tables.ts | 558 | // Step 1: Find backends that are blocked waiting for a lock, | COMMENT |
| LOW | …ro-cache/src/services/change-streamer/schema/tables.ts | 574 | // Step 2: For each blocked backend, find and terminate its blockers | COMMENT |
| LOW | packages/replicache/src/sync/patch-putmany-diff.test.ts | 52 | // Step 1: Simulate poke 1-3 building base via apply (putMany) | COMMENT |
| LOW | packages/replicache/src/sync/patch-putmany-diff.test.ts | 80 | // Step 2: Simulate poke 4 with 4913 puts, overlapping base | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | packages/zqlite/src/sqlite-stat-fanout.ts | 272 | // Use median of non-NULL fanouts (more robust than average) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | apps/zbugs/playwright/reset_issue.sql | 33 | 'Let me know if you need any help with this!', | CODE |