Dashboard › opencode-lore › tracedDatabase query seam
01a0a6e1-92f6-7e31-9713-948c416cbdf6Trap: monkeypatching db().query or tracing prepare() appears to observe all SQL, but Lore’s tracedDatabase() Proxy hides query replacement and traces only .query() statement operations (get, run, and all); raw prepare, exec, migrations, and transaction control intentionally bypass tracing. Fix: SQL-count tests must use log.registerSink({ withDbSpan }), count spans at the actual tracing boundary, and execute through .query(). The wrapper must invoke each operation exactly once without changing arguments or return values, and core must remain free of Sentry dependencies.