Skip to content
This repository was archived by the owner on Oct 23, 2026. It is now read-only.

fix(db): add transaction method to Node SQLite polyfill - #140

Merged
BYK merged 1 commit into
mainfrom
fix/node-sqlite-transaction-polyfill
Jan 31, 2026
Merged

BYK merged 1 commit into
mainfrom
fix/node-sqlite-transaction-polyfill

Conversation

@BYK

@BYK BYK commented Jan 31, 2026

Copy link
Copy Markdown
Member

The NodeDatabasePolyfill class was missing the transaction() method that
Bun's SQLite provides. This caused 'e.transaction is not a function'
errors when running via npx/Node.js (e.g., during 'sentry auth status'
credential verification which calls setOrgRegions()).

Add transaction() method that wraps functions in BEGIN/COMMIT with
ROLLBACK on error, matching Bun's db.transaction() API.

The NodeDatabasePolyfill class was missing the transaction() method that
Bun's SQLite provides. This caused 'e.transaction is not a function'
errors when running via npx/Node.js (e.g., during 'sentry auth status'
credential verification which calls setOrgRegions()).

Add transaction() method that wraps functions in BEGIN/COMMIT with
ROLLBACK on error, matching Bun's db.transaction() API.
@github-actions

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Bug Fixes 🐛

  • (db) Add transaction method to Node SQLite polyfill by BYK in #140

🤖 This preview updates automatically when you update the PR.

@github-actions

Copy link
Copy Markdown
Contributor

Codecov Results 📊

✅ Patch coverage is 100.00%. Project has 1802 uncovered lines.
✅ Project coverage is 69.48%. Comparing base (base) to head (head).

Files with missing lines (25)
File Patch % Lines
human.ts 30.90% ⚠️ 682 Missing
resolve-target.ts 20.82% ⚠️ 251 Missing
oauth.ts 25.39% ⚠️ 191 Missing
api-client.ts 71.60% ⚠️ 146 Missing
resolver.ts 3.23% ⚠️ 120 Missing
errors.ts 5.94% ⚠️ 95 Missing
migration.ts 47.44% ⚠️ 82 Missing
api.ts 89.80% ⚠️ 47 Missing
seer.ts 75.54% ⚠️ 45 Missing
errors.ts 78.71% ⚠️ 33 Missing
seer.ts 79.87% ⚠️ 30 Missing
preload.ts 39.02% ⚠️ 25 Missing
detector.ts 87.79% ⚠️ 16 Missing
auth.ts 94.78% ⚠️ 7 Missing
utils.ts 97.59% ⚠️ 4 Missing
schema.ts 85.19% ⚠️ 4 Missing
index.ts 95.06% ⚠️ 4 Missing
colors.ts 91.84% ⚠️ 4 Missing
telemetry.ts 97.28% ⚠️ 4 Missing
env-file.ts 97.17% ⚠️ 3 Missing
sentry-urls.ts 82.35% ⚠️ 3 Missing
alias.ts 98.56% ⚠️ 2 Missing
project-aliases.ts 97.40% ⚠️ 2 Missing
java.ts 97.22% ⚠️ 1 Missing
parser.ts 98.63% ⚠️ 1 Missing
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    69.48%    69.48%        —%
==========================================
  Files           51        51         —
  Lines         5905      5905         —
  Branches         0         0         —
==========================================
+ Hits          4103      4103         —
- Misses        1802      1802         —
- Partials         0         0         —

Generated by Codecov Action

@BYK
BYK marked this pull request as ready for review January 31, 2026 01:43
@BYK
BYK merged commit 6b9be52 into main Jan 31, 2026
24 checks passed
@BYK
BYK deleted the fix/node-sqlite-transaction-polyfill branch January 31, 2026 01:54
betegon added a commit that referenced this pull request Jul 16, 2026
## Summary

The Ink sidebar was only updating tasks when a workflow step suspended.
Steps that completed entirely inside start/resume, such as Analyze
project when its inputs were already cached, were therefore shown as
skipped or left incomplete even though Mastra had finished them.

This reconciles the checklist from the step statuses Mastra already
returns on every response. Tasks that never suspend now become green,
failures are reflected even before a client-tool round trip, and the
final synchronous steps can reach the completed count.

The separate Installing dependencies row was also stale:
cli-init-api#140 merged installation into apply-codemods. The checklist
now mirrors the real eight-step user-facing workflow and labels that
phase Applying changes + deps instead of keeping a task that can never
receive a server transition.

Tasks now render above the rotating tips, so different tip heights no
longer move the progress list around.

## Test plan

- pnpm run lint — 920 files pass
- pnpm run typecheck — passes
- pnpm vitest run test/lib/init/ui/ink-app.snapshot.test.tsx
test/lib/init/ui/wizard-store.test.ts
test/lib/init/wizard-runner.test.ts — 123 tests pass
- pnpm vitest run test/lib/init test/lib/telemetry.test.ts — 538 tests
pass
- TZ=UTC pnpm vitest run test/lib/time-range.test.ts — 51 tests pass
- pnpm run test:unit — 8,479 pass, 14 skipped, with eight pre-existing
local-environment failures: six timezone-sensitive time-range assertions
under Europe/Madrid and two bash completion shell simulations. The
time-range failures pass under TZ=UTC; none of the eight touch init.
- git diff --check — passes
- Local patch coverage for executable lines — 100%
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant