Stabilize integrate-sqlite by handling transient SQLITE_BUSY in Dredd hooks#3930
Open
Copilot wants to merge 4 commits into
Open
Stabilize integrate-sqlite by handling transient SQLITE_BUSY in Dredd hooks#3930Copilot wants to merge 4 commits into
Copilot wants to merge 4 commits into
Conversation
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job integrate-sqlite
Stabilize integrate-sqlite by handling transient SQLITE_BUSY in Dredd hooks
Jun 8, 2026
There was a problem hiding this comment.
Security review — no findings
Reviewed PR #3930 (.dredd/hooks/capabilities.go retry/mutex changes and go.mod/go.sum dependency cleanup).
Scope: Changes are confined to Dredd API-test hooks (CI-only; explicitly not for production) and indirect dependency tidying. No production API, auth, or request-handling code is modified.
Checked:
- Injection / unsafe deserialization — no new user-controlled input paths;
capsand DB operations are driven by hardcoded test hooks. - Authn/authz bypass — not applicable; test harness uses fixed admin tokens and local test DB setup.
- Error-string retry matching (
isSQLiteBusyError) — only affects SQLite lock retries in CI; errors originate from the test DB layer, not remote attackers. - Mutex + exponential backoff — serializes test DB setup under lock contention; no production DoS surface.
- Panic-to-error recovery — scoped to
resolveCapabilityin test hooks; non-busy errors still panic immediately. - Dependency changes (
bboltremoval,golang.org/x/syncindirect version inpro/) — housekeeping only; no new runtime dependency with known CVE exposure introduced by this PR.
Prior threads: None from earlier automation runs.
Outcome: No medium, high, or critical vulnerabilities identified in added or modified code.
Sent by Cursor Automation: Find vulnerabilities
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


integrate-sqlitewas failing intermittently due toSQLITE_BUSYlock contention while Dredd hooks were creating prerequisite capability data. The hook process treated these transient lock errors as fatal, causing the job to exit.Root cause in hook capability setup
.dredd/hooks/capabilities.goperformed capability writes without retry behavior for SQLite lock contention.Concurrency + retry hardening
addCapabilities()execution with a package-level mutex to reduce concurrent write contention in hooks.maxAttempts = 5) around capability resolution.const sqliteBusyRetryBaseDelay = 100 * time.Millisecond1<<attempt * baseDelayRetry classification
isSQLiteBusyError(err)and retried only for lock-contention signatures:SQLITE_BUSYdatabase is lockeddatabase table is locked