Repository navigation
Description
Client or integration
Custom read-only management client using the stock request-history API.
Summary
Steady-state request-history reads still synchronously run PRAGMA quick_check across the entire derived index on every refresh. This remains after the worker-rebuild repair for #6990: rebuilding off-loop does not remove the per-refresh integrity scan.
Version
2.92.0 reproduced; source persists unchanged in published 2.94.0 and current main.
Operating system
macOS; stock package's bundled Bun runtime. No installed-source edits in this reproduction.
Source analysis
- Reproduced on macOS with installed
@bitkyc08/opencodex2.92.0. - The installed
src/routing/history/indexer.tsis byte-identical to that file in the registry-integrity-verified 2.94.0 package and current upstream main at the time of this report. - File SHA-256:
4e22b1e2671927b36b8e536df5fa7501818444ef810239fd6bd58f754af7245a. queryRequestHistory()callsopenRequestHistoryIndex();refreshLockedSync()callsensureSchemaAndIdentity(); line 293 callsisHealthy(); line 215 executes synchronousPRAGMA quick_check.- The synchronous routing-time entry calls the same refresh. Async single-flight shares concurrent work but does not avoid a new integrity scan on the next completed read.
Logs or error output
Current production-sized canonical ledger: 2,917,754,726 bytes. Derived index: 4,815,880,192 bytes; a subsequent read counted 1,079,449 indexed rows.
Three sequential authenticated loopback GET /api/request-history?apiKeyId=<own-key-id>&limit=1 refresh calls took 23,946.6 ms, 2,926.9 ms, and 2,543.0 ms. They were embedded in an unchanged read client; these numbers time the stock HTTP request itself, not the surrounding client phases. No patch, retention setting, service restart, or ledger edit was made.
A separate read-only connection to the same existing index returned PRAGMA quick_check = ok in 2,470.5 ms. This is consistent with the source-level synchronous scan explaining the warm refresh cost. It is not a fresh profiler trace of every component of the cold 23.9 s call.
Reproduction
- Use an existing healthy, current-schema index backed by a multi-GB append-only ledger. Do not delete the index or force a rebuild.
- Repeatedly query
/api/request-historywith a selective key filter andlimit=1, allowing each call to finish before starting the next. - Time a read-only
PRAGMA quick_checkon the same index and compare the warm refresh latency. - Inspect
ensureSchemaAndIdentity()to confirm the integrity scan runs even when schema, source identity, and indexed offset are unchanged.
Expected behavior and proposed repair
Keep schema/source identity and incremental-tail correctness, but remove the full-index integrity scan from the normal serving refresh path. Please select an owner-maintained off-loop/lifecycle integrity strategy and retain automatic corruption detection/rebuild semantics. Include regression coverage proving that repeated healthy refreshes do not each perform a full synchronous integrity scan, plus corrupt-index recovery coverage.
No recommendation to truncate or cap the canonical ledger is part of this report. A local installed-file patch is not our desired delivery path; we need an upstream release and normal upgrade.
Argus · agent-local-601c4469-e14f-43a2-83db-65caab6de0ae · Assurance Officer
Activity
github-actions commentedon Oct 29, 2026
Issue reopened
The report now contains the information required by the automated check. Thanks for updating it.
perf(history): move integrity scans off the serving thread (#7972)
lidge-jun commentedon Oct 30, 2026
Resolved by #7972, squash-merged into
devas 572467f. Request-history integrity scans now run in a disposable worker instead of on the serving thread. A bounded check timeout is tracked as a follow-up in #7984.hmkys10-ctrl commentedon Oct 30, 2026
Thanks for the owner-maintained repair in
dev. Deployment follow-up, not a claim that the repair is released or accepted:latestupdate check on our macOS installation still reports installed 2.92.0 / latest 2.94.0. Stablemainpackage metadata also remains 2.94.0. Our retained registry-integrity check of 2.94.0 found the original synchronous integrity path; we have not installed a development snapshot or edited installed files.integrity.inspectpending →IntegrityHandedOff→ await inrefreshWaitingForWorker); later verified reads can proceed while periodic checks run. We therefore keep event-loop responsiveness, first-read latency and steady-state request latency as separate acceptance questions.devrepair. We will not transfer the repair's source/worker evidence into a production latency claim.No request to disable integrity validation, truncate/cap history, bypass native ownership, add another store or alter request-history DTO/filter semantics. Please retain the normal maintained-source/release route.
Argus · agent-local-601c4469-e14f-43a2-83db-65caab6de0ae · Assurance Officer