Skip to content

Roll back nested transaction scopes with savepoints - #17

Merged
tp-li-dev merged 1 commit into
mainfrom
fix/nested-transaction-savepoints
Nov 18, 2026
Merged

tp-li-dev merged 1 commit into
mainfrom
fix/nested-transaction-savepoints

Conversation

@tp-li-dev

Copy link
Copy Markdown
Contributor

Carries over the SAVEPOINT fix from #7 onto current main.

  • Roll back failed nested atomic blocks and bulk inserts independently when the caller catches an exception inside the outer block.
  • Keep model registration aligned with nested commits and rollbacks, including async cancellation during savepoint creation.
  • Document the nested rollback semantics in Japanese and English.

Validation: 116 tests passed with APSW and 116 with sqlite3, including new regression coverage. Ruff and mypy passed.

github-actions Bot added a commit that referenced this pull request Nov 18, 2026
db.insert(inner_model(id=3))
db.insert(Record(id=3))
raise ValueError("rollback nested scope")
assert db.registered_models() == ["Record"]
db.insert(Record(id=4))
assert db.query(inner_model) == [inner_model(id=4)]

assert db.query(Record, order_by="id") == [Record(id=1), Record(id=4)]
await db.insert(inner_model(id=3))
await db.insert(Record(id=3))
raise ValueError("rollback nested scope")
assert db.registered_models() == ["Record"]
await db.insert(Record(id=4))
assert await db.query(inner_model) == [inner_model(id=4)]

assert await db.query(Record, order_by="id") == [Record(id=1), Record(id=4)]
@github-actions

Copy link
Copy Markdown
Contributor

🔍 CI Results — ✅ All CI checks passed

Stage Status
🧹 Lint (ruff) ✅ success
🔍 Type (mypy) ✅ success
🧪 Tests ✅ success

Commit: 463ad70859c6e3a488a61d1991a77f33f20ac8a4

@tp-li-dev
tp-li-dev merged commit 847df9c into main Nov 18, 2026
40 of 50 checks passed
github-actions Bot added a commit that referenced this pull request Nov 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🛡️ Security Scan Results

スキャナ 役割 結果 Findings
CodeQL Python深層データフロー解析 ✅ success Security Tab参照
Bandit Python静的解析 ✅ success 5件
Semgrep Pythonセマンティック解析 ✅ success 0件
Trivy 依存関係 / IaC / シークレット ❌ failure 25件
Bun Audit Node.js依存関係 ❌ failure (ログ参照)
Grype 深堀り脆弱性スキャン ❌ failure 31件
🐍 Bandit Findings(5件)― クリックして展開
[MEDIUM] Possible SQL injection vector through string-based query construction.
  File: src/nyansqlite/_insert.py:24

[MEDIUM] Possible SQL injection vector through string-based query construction.
  File: src/nyansqlite/core.py:416

[MEDIUM] Possible SQL injection vector through string-based query construction.
  File: src/nyansqlite/core.py:568

[MEDIUM] Possible SQL injection vector through string-based query construction.
  File: src/nyansqlite/core_aio.py:456

[MEDIUM] Possible SQL injection vector through string-based query construction.
  File: src/nyansqlite/core_aio.py:622
📦 Trivy Findings(25件)― クリックして展開
[MEDIUM] CVE-2026-112909 filelock@3.19.1
  filelock: filelock: arbitrary file truncation via lock path replacement

[MEDIUM] CVE-2026-112910 filelock@3.19.1
  filelock: filelock: Denial of Service via improper lock file permissions on Windows

[HIGH] CVE-2026-112940 filelock@3.29.4
  filelock: filelock: Arbitrary file overwrite via insecure database file reopening

[MEDIUM] CVE-2026-112909 filelock@3.29.4
  filelock: filelock: arbitrary file truncation via lock path replacement

[MEDIUM] CVE-2026-112910 filelock@3.29.4
  filelock: filelock: Denial of Service via improper lock file permissions on Windows

[MEDIUM] CVE-2026-112915 filelock@3.29.4
  filelock: filelock: Denial of Service via crafted SQLite lock database

[MEDIUM] CVE-2026-112935 filelock@3.29.4
  filelock: filelock: Unauthorized concurrent access via stale lock cleanup race condition

[MEDIUM] CVE-2026-112936 filelock@3.29.4
  filelock: filelock: Lock redirection and mutual exclusion bypass via symbolic links

[MEDIUM] CVE-2026-112939 filelock@3.29.4
  filelock: filelock: Unauthorized lock acquisition via forged process identifier in SoftFileLock

[HIGH] CVE-2026-102925 virtualenv@21.5.1
  virtualenv: virtualenv: Arbitrary code execution via crafted paths in activation scripts

[HIGH] CVE-2026-102930 virtualenv@21.5.1
  virtualenv: virtualenv: Arbitrary code execution via unverified downloaded seed wheels

[HIGH] CVE-2026-102937 virtualenv@21.5.1
  virtualenv: virtualenv: Arbitrary code execution via unescaped prompt in Windows activation script

[HIGH] CVE-2026-113718 virtualenv@21.5.1
  virtualenv: virtualenv: arbitrary code execution via improper quoting in xonsh activation scripts

[HIGH] CVE-2026-113722 virtualenv@21.5.1
  virtualenv: virtualenv: arbitrary code execution via improperly quoted interpreter paths in script launchers

[HIGH] CVE-2026-113723 virtualenv@21.5.1
  virtualenv: virtualenv: Arbitrary code execution via malicious prompt text

[HIGH] CVE-2026-113725 virtualenv@21.5.1
  virtualenv: virtualenv: arbitrary code execution via crafted environment name

[HIGH] CVE-2026-113726 virtualenv@21.5.1
  virtualenv: virtualenv: Arbitrary command execution via unescaped prompt variables in zsh

[HIGH] CVE-2026-113732 virtualenv@21.5.1
  virtualenv: virtualenv: Arbitrary code execution via improperly quoted Fish activation scripts

[HIGH] CVE-2026-113776 virtualenv@21.5.1
  virtualenv: virtualenv: Arbitrary command execution via sequential placeholder substitution in activation templates

[MEDIUM] CVE-2026-102938 virtualenv@21.5.1
  virtualenv: virtualenv: Arbitrary code execution via configuration injection in prompt values

[MEDIUM] CVE-2026-113716 virtualenv@21.5.1
  virtualenv: virtualenv: Unauthorized file write via symlink following

[MEDIUM] CVE-2026-113719 virtualenv@21.5.1
  virtualenv: virtualenv: Arbitrary file deletion via path traversal in package metadata

[MEDIUM] CVE-2026-113720 virtualenv@21.5.1
  virtualenv: virtualenv: Arbitrary code execution via insecure cached file permissions

[MEDIUM] CVE-2026-113721 virtualenv@21.5.1
  virtualenv: virtualenv: Arbitrary file overwrite via insecure symlink handling

[MEDIUM] CVE-2026-113724 virtualenv@21.5.1
  virtualenv: virtualenv: Insecure file permission modification via symlink following
🔍 Grype Findings(31件)― クリックして展開
[High] GHSA-5vjq-rrrf-7h2q virtualenv@21.5.1

[High] GHSA-c978-59m8-c77v virtualenv@21.5.1

[High] GHSA-8rjx-v5ww-45pp virtualenv@21.5.1

[High] GHSA-vxj4-q4g9-crj7 virtualenv@21.5.1

[High] GHSA-c947-3pg5-gm8q virtualenv@21.5.1

[High] GHSA-6w3r-xr62-4xcp virtualenv@21.5.1

[High] GHSA-394h-qwmc-48pf virtualenv@21.5.1

[High] GHSA-x78j-v8h9-3j2q virtualenv@21.5.1

[High] GHSA-94p9-xgh2-xp45 virtualenv@21.5.1

[High] GHSA-v4x8-3wr5-3wq8 filelock@3.29.4

[Medium] GHSA-j8f7-rjxc-mr56 filelock@3.29.4

[High] GHSA-p58f-9548-mpm2 virtualenv@21.5.1

[Medium] GHSA-69hj-f68j-2879 filelock@3.19.1

[Medium] GHSA-69hj-f68j-2879 filelock@3.29.4

[Medium] GHSA-cwqr-hh33-gh44 filelock@3.29.4

[Medium] GHSA-43mp-35q3-x3fq virtualenv@21.5.1

[Medium] GHSA-hhxq-47xx-j5xx virtualenv@21.5.1

[Medium] GHSA-8mx5-7m5m-r77g filelock@3.19.1

[Medium] GHSA-8mx5-7m5m-r77g filelock@3.29.4

[Medium] GHSA-9h9j-4vrj-gf7g virtualenv@21.5.1

[Low] GHSA-cx28-75q4-x26q virtualenv@21.5.1

[Medium] GHSA-558c-9hv2-4prj virtualenv@21.5.1

[Medium] GHSA-cw65-gx24-rc82 virtualenv@21.5.1

[Medium] GHSA-rfpc-qcw5-3pc4 filelock@3.29.4

[Low] GHSA-494p-63j8-28p3 virtualenv@21.5.1

[Medium] GHSA-fq56-3cx3-fjxp filelock@3.29.4

[Medium] GHSA-fc2g-4w5p-6whm virtualenv@21.5.1

[Low] GHSA-qmx5-4p3x-wvqf virtualenv@21.5.1

[Low] GHSA-9vhv-jxww-xfm5 filelock@3.29.4

[Low] GHSA-567q-5qvw-pf92 filelock@3.29.4

[Critical] GHSA-5xjx-3w67-w9x9 pypa/gh-action-pypi-publish@release/v1.14

❌ 1つ以上のセキュリティチェックが失敗しています。マージ前に修正してください。

🔍 詳細・行ハイライトはリポジトリの Security → Code scanning タブで確認できます。

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.

2 participants