Skip to content

fix: set PRAGMA busy_timeout before schema init - #8

Closed
sara-lolatte wants to merge 2 commits into
dzhng:mainfrom
sara-lolatte:fix/busy-timeout-before-schema
Closed

sara-lolatte wants to merge 2 commits into
dzhng:mainfrom
sara-lolatte:fix/busy-timeout-before-schema

Conversation

@sara-lolatte

Copy link
Copy Markdown

Real bug fix found while baselining the fork: test/db-busy-timeout.test.ts failed 1-4/40 on macOS because the busy timeout was set after the CREATE TABLE IF NOT EXISTS writes.

Expected path: src/db.ts is a protected path → risk:high → Risk Gate fails until a human with write access approves. Left open deliberately as the live demonstration of the blocked route.

sara-lolatte and others added 2 commits September 19, 2026 11:19
- scripts/risk-gate.ts classifies PRs low/medium/high by protected paths,
  size, deleted tests and secret patterns; unit-tested in test/risk-gate.test.ts
- risk-gate.yml labels the PR, posts a sticky verdict, enables auto-merge for
  low (and medium with ai-review:pass), and fails the check for high until a
  human approves
- claude-review.yml runs claude-code-action against .github/review/RUBRIC.md
  and docs/agent-learnings.md; posts a visible skip notice when no API key
- CODEOWNERS mirrors the protected paths as a GitHub-native backstop

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CREATE TABLE IF NOT EXISTS is a write; on a fresh DB, parallel first-run CLI
invocations raced it before the busy timeout was applied, producing
SQLITE_BUSY (1-4 of 40 runs locally). Reproduced via
test/db-busy-timeout.test.ts, which now passes consistently.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sara-lolatte

Copy link
Copy Markdown
Author

Apologies — opened against upstream by mistake from a fork used for an exercise. Closing; not intended for this repo.

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