Skip to content

fix: preserve numeric latency bucket comparisons on SQLite - #688

Merged
rmcdaniel merged 3 commits into
mainfrom
fix/683-sqlite-latency-buckets
Oct 23, 2026
Merged

rmcdaniel merged 3 commits into
mainfrom
fix/683-sqlite-latency-buckets

Conversation

@rmcdaniel

@rmcdaniel rmcdaniel commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Changes

Current source: d7cc197e523f6bae7f4946aff620b9915c064a04, whole tree
23742b117a8e8acf8cfa1e92ebb30111996c2192.

Normally merged as b4192a3472aae80e646e863c45840e52cd73e70f, preserving that
qualified tree. Sixteen candidate checks pass with one explicit skip; Sonar has
zero OPEN/CONFIRMED findings. The remote branch is deleted and verified absent.
Independent main feature 39892778540 and all other applicable main checks pass.
Publication remains pending.

Addresses #683. On SQLite, cast the bound parameter to REAL before comparing
it with a computed duration. PDO sends floating-point bindings as text, and
SQLite's expression has no column affinity to convert them. MySQL/PostgreSQL
retain the exact original comparison SQL. Histogram names, bounds, cumulative
counts, namespace filters and missing-duration handling stay unchanged.

Add an actual metrics-route regression: a two-second workflow and 1.5-second
activity must not appear in the 0.1, 0.5 or one-second buckets, and must appear
in every bucket from 2.5 seconds upward.

Evidence and remaining checks

The preceding production selector, invoked against real in-memory PDO SQLite
with Laravel-style string bindings and a thin query-capture adapter, reports
[2,2,2,2,2,2,2,2,2,2] for two durations and a null row. The same component
after this correction reports the expected [0,0,0,2,2,2,2,2,2,2]. The original
failed result is retained here. This is a SQL/production-method component,
not a completed Laravel HTTP or published-image cohort.

Actual metrics-route qualification

Using PHP 8.3.36, normal Composer 2.10.3 locked installation and Core 2.11.1
at 30974a3c, all seven metrics-route cases pass with 111 assertions on each
of SQLite, PostgreSQL 17.11 and MySQL 8.0.46. Driver and server-version probes
confirm both real network databases. No skips occur in these selections.
The corrected fractional fixture on the preceding selector fails the new
SQLite case (one failure, four assertions), while that same preceding selector
passes the focused PostgreSQL and MySQL cases (one test/five assertions each).

Retained fixture failure

Original 050688c2 / feature run 39888653299 remains failed: 3,039 tests,
68,266 assertions, one failure, six PHPUnit deprecations and 37 skips. The new
activity fixture bound a Carbon DateTime through the query builder, which
stored one second instead of the intended 1.5 seconds. The one-second bucket
therefore correctly counted it. The fixture now serializes its original
fractional closing timestamp explicitly. Assertions and production correction
are unchanged. The production file is byte-identical to 050688c2.

Every prior job was terminal before advancing the source. Final feature run
39891035128 passes 3,039 cases / 68,266 assertions, with six deprecations and
37 skips, plus nine immutability cases / 27 assertions and one release-audit
case / 12 assertions. These are seeded source-route tests, not
genuine workflow or published-image acceptance. Publication follows the existing
security hold. No native/shared/frozen files, dependency, schema, API or version
changes. All 243 MiB of new dependencies/scratch, both local DBs and the network
were retired at 02:42:27 UTC. Both DB exits are zero without OOM; borrowed images
and other owners' resources remain.

@sonarqubecloud

Copy link
Copy Markdown

@rmcdaniel
rmcdaniel marked this pull request as ready for review October 23, 2026 03:01
@rmcdaniel
rmcdaniel merged commit b4192a3 into main Oct 23, 2026
17 checks passed
@rmcdaniel
rmcdaniel deleted the fix/683-sqlite-latency-buckets branch October 23, 2026 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant