Repository navigation
refactor(pnpr): put SQL metadata behind a database adapter - #17577
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Adapter contracts and SQLite backend pnpr/crates/storage/src/metadata/sql/adapter.rs, params.rs, sqlite.rs, tests/concurrency.rs |
Adds shared connection, adapter, parameter, and row interfaces. Implements them for SQLite and adds tests for retryable errors and transaction cleanup. |
SQL metadata lifecycle and read freshness pnpr/crates/storage/src/metadata.rs, pnpr/crates/storage/src/metadata/sql.rs, schema.rs |
Renames the metadata facade and accessor. Routes reads and writes through the adapter, applies freshness and retry rules, and prepares the schema in an adapter transaction. |
Transactional metadata operations and queries pnpr/crates/storage/src/metadata/sql/{batch,commit,notes,publications,publish,render,tags,versions}.rs, tests.rs, tests/notes.rs, tests/publications.rs |
Moves batch, package, note, publication, rendering, tag, and version operations to adapter connections. Updates deletion behavior and related tests. |
Server and storage API callers pnpr/crates/pnpr/src/server/{notes,publications,publishing}.rs, publishing/{atomic,notes}.rs, pnpr/crates/storage/src/journal/tests.rs |
Updates server handlers and a journal test to use SqlMetadata and sql_metadata(). The described unavailable-storage outcomes remain unchanged. |
Estimated code review effort: 4 (Complex) | ~60 minutes
Change: Refactor
Sequence Diagram(s)
sequenceDiagram
participant SqlMetadata
participant Adapter
participant SQLiteConnection
SqlMetadata->>Adapter: run read or write operation
Adapter->>SQLiteConnection: begin transaction and execute queries
SQLiteConnection-->>Adapter: rows or operation result
Adapter-->>SqlMetadata: result
Possibly related PRs
- pnpm/pnpm#17551: Introduces the SQLite metadata backend that this change refactors behind the shared SQL adapter.
- pnpm/pnpm#17553: Adds atomic publication commits and outcome lookups that this change moves behind the adapter.
- pnpm/pnpm#17552: Adds archive-manifest records in SQLite metadata, which this change updates to use adapter connections.
Suggested labels: product: pnpr
Suggested reviewers: qodo-code-review
Merge Risk: 
Minimal · up to cc9b1
-
No material new merge-blocking risk was identified.
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
CodeRabbit Verify
- Run CodeRabbit Verify to test the changes in this pull request.
Same-run regression checkHEAD and main are measured on the same runner. The tolerance is 5% of the main median or 2 ms, whichever is larger. A regression requires both the median slowdown and the gap between the fastest retained HEAD sample and slowest retained main sample to exceed this tolerance, after trimming up to 10% from each tail. Suspected regressions are rerun once with target order reversed and only fail if reproduced. This conservative noise guard is not a statistical confidence interval. Inconclusive rows do not fail the check. They remain visible for performance review. Bencher retains absolute minimum timings for historical tracking; historical alerts do not gate this PR. Sequential measurements can still be affected by runner drift.
Same-run syscall checkEach install runs 2 more times per revision, untimed, under
Integrated-Benchmark Report (Linux)Commit: Compared against main at: Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm; the linked, injected, and Cargo workspace scenarios compare current Rust against main Rust. Bencher consumes pacquet@HEAD and pnpr@HEAD. The tables below show mean ± σ. Bencher tracks absolute minimum latency; PR regression checks compare HEAD and main samples from the same runner. Historical timing alerts do not gate PRs. Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.46991277068,
"stddev": 0.10905136677377729,
"median": 2.41409812968,
"user": 2.54569542,
"system": 1.7419095599999994,
"min": 2.3500816051799998,
"max": 2.62233891818
},
{
"command": "pacquet@main",
"mean": 2.4532615697799995,
"stddev": 0.1632977961624998,
"median": 2.45053211868,
"user": 2.26352802,
"system": 1.56507836,
"min": 2.23312581718,
"max": 2.72983447718
},
{
"command": "pnpr@HEAD",
"mean": 1.46804292918,
"stddev": 0.12326899107896912,
"median": 1.47707763518,
"user": 2.15855332,
"system": 1.5342725599999998,
"min": 1.28546717518,
"max": 1.66623905818
},
{
"command": "pnpr@main",
"mean": 1.45352928798,
"stddev": 0.09282580148526151,
"median": 1.45929943918,
"user": 2.0809892199999998,
"system": 1.4059588599999997,
"min": 1.29709697618,
"max": 1.63137609318
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.23295320896,
"stddev": 0.011682568677800518,
"median": 0.23231303976,
"user": 0.26902297999999997,
"system": 0.5944721599999999,
"min": 0.21627362176,
"max": 0.25463567776
},
{
"command": "pacquet@main",
"mean": 0.22337729345999996,
"stddev": 0.010776652157402243,
"median": 0.22238899526,
"user": 0.27693668,
"system": 0.55508976,
"min": 0.21094325976,
"max": 0.24189527276
},
{
"command": "pnpr@HEAD",
"mean": 0.22900020756,
"stddev": 0.009135076560868807,
"median": 0.22963962325999998,
"user": 0.26377338,
"system": 0.53815336,
"min": 0.21232226576,
"max": 0.23981765776
},
{
"command": "pnpr@main",
"mean": 0.24155896836,
"stddev": 0.009397080028098224,
"median": 0.24118629376,
"user": 0.2756544799999999,
"system": 0.57218456,
"min": 0.22900455776,
"max": 0.26274169176
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.011365137264388184,
"stddev": 0.0011742063147172318,
"median": 0.011285214180000001,
"user": 0.00660221417721519,
"system": 0.00583281637130802,
"min": 0.00842196218,
"max": 0.015185594180000003
},
{
"command": "pacquet@main",
"mean": 0.01142725579632653,
"stddev": 0.0012845575070365033,
"median": 0.01131485018,
"user": 0.007156418775510207,
"system": 0.0053567446530612284,
"min": 0.008587241180000002,
"max": 0.01703437318
},
{
"command": "pnpr@HEAD",
"mean": 0.011322000646346161,
"stddev": 0.0012811337454043837,
"median": 0.011402614680000001,
"user": 0.006972302115384609,
"system": 0.00537690576923077,
"min": 0.008122307180000002,
"max": 0.01668695218
},
{
"command": "pnpr@main",
"mean": 0.01143559327923664,
"stddev": 0.0011533183069760346,
"median": 0.01138776218,
"user": 0.007255651755725191,
"system": 0.0052399845801526755,
"min": 0.008146073180000001,
"max": 0.014773330180000002
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.009439243491755723,
"stddev": 0.0006565028546893525,
"median": 0.009342990320000001,
"user": 0.005410358473282443,
"system": 0.004769183358778625,
"min": 0.00781030432,
"max": 0.01244630432
},
{
"command": "pacquet@main",
"mean": 0.00823073467789474,
"stddev": 0.0006118163980951226,
"median": 0.00811009432,
"user": 0.005119148070175438,
"system": 0.0037590056140350864,
"min": 0.007313263320000001,
"max": 0.01181662732
},
{
"command": "pnpr@HEAD",
"mean": 0.008019535766945335,
"stddev": 0.00045907247563838695,
"median": 0.00791688432,
"user": 0.0050302698392282975,
"system": 0.0036620770418006408,
"min": 0.0071769083200000005,
"max": 0.01060355432
},
{
"command": "pnpr@main",
"mean": 0.007491864816774192,
"stddev": 0.00030933162422905607,
"median": 0.007428468320000001,
"user": 0.004624190967741936,
"system": 0.0035164940645161305,
"min": 0.00696428832,
"max": 0.00974336032
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.6686782418600004,
"stddev": 0.05381825017739883,
"median": 2.66727615916,
"user": 2.8255332999999996,
"system": 1.7952424999999999,
"min": 2.58686717966,
"max": 2.7420588726600004
},
{
"command": "pacquet@main",
"mean": 2.60855897996,
"stddev": 0.05104408733492739,
"median": 2.6015435616600002,
"user": 2.7734805,
"system": 1.6531683000000001,
"min": 2.51177815466,
"max": 2.6721570256600002
},
{
"command": "pnpr@HEAD",
"mean": 1.55443227386,
"stddev": 0.11469818868067823,
"median": 1.52905634666,
"user": 2.1276665999999995,
"system": 1.5316707,
"min": 1.43468776466,
"max": 1.80953945966
},
{
"command": "pnpr@main",
"mean": 1.58148883146,
"stddev": 0.13985628749762793,
"median": 1.5547279236599998,
"user": 1.9676766,
"system": 1.4458986,
"min": 1.4107431606599998,
"max": 1.7439081946600001
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.6488724366800002,
"stddev": 0.05802274230778738,
"median": 0.65748126038,
"user": 0.99226248,
"system": 1.3944745599999997,
"min": 0.53955455488,
"max": 0.7417972258800001
},
{
"command": "pacquet@main",
"mean": 0.63243817198,
"stddev": 0.056061979767179256,
"median": 0.60905496588,
"user": 0.97005208,
"system": 1.35777246,
"min": 0.57583663188,
"max": 0.75137844488
},
{
"command": "pnpr@HEAD",
"mean": 0.35489084538000004,
"stddev": 0.017833709992566466,
"median": 0.34967811888,
"user": 0.34465657999999993,
"system": 0.67604446,
"min": 0.32560639288000004,
"max": 0.38425628288
},
{
"command": "pnpr@main",
"mean": 0.36745035218000005,
"stddev": 0.0471097324161457,
"median": 0.35080171788000003,
"user": 0.39221087999999993,
"system": 0.6985153599999999,
"min": 0.33688278888,
"max": 0.49094175488
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.5668287293399998,
"stddev": 0.015791223260863702,
"median": 1.57001938084,
"user": 0.7827694599999999,
"system": 0.8185014199999999,
"min": 1.53400961584,
"max": 1.58472037984
},
{
"command": "pacquet@main",
"mean": 1.5747109057400002,
"stddev": 0.016622229580601933,
"median": 1.57741154634,
"user": 0.7835807599999999,
"system": 0.79339902,
"min": 1.5478165338399998,
"max": 1.60166674884
},
{
"command": "pnpr@HEAD",
"mean": 0.2622766509400001,
"stddev": 0.013916269098758293,
"median": 0.25977734884000003,
"user": 0.23825225999999997,
"system": 0.5109961199999999,
"min": 0.24873007884000004,
"max": 0.29534332384
},
{
"command": "pnpr@main",
"mean": 0.26068042594,
"stddev": 0.007647909709102386,
"median": 0.26021844334,
"user": 0.25117406,
"system": 0.49288621999999993,
"min": 0.25301466284,
"max": 0.27674165084
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.36139158644,
"stddev": 0.032405243599010335,
"median": 0.35726610804000003,
"user": 0.39906389999999997,
"system": 0.24589686,
"min": 0.30782256254,
"max": 0.41921974454000005
},
{
"command": "pacquet@main",
"mean": 0.37707199654000007,
"stddev": 0.015904739467826754,
"median": 0.37891369054,
"user": 0.4143316,
"system": 0.27632216,
"min": 0.35453532354,
"max": 0.39692071654000005
},
{
"command": "pnpr@HEAD",
"mean": 0.11772521078999999,
"stddev": 0.00937499995736697,
"median": 0.12070216504,
"user": 0.05368846666666668,
"system": 0.031544901666666667,
"min": 0.09546874654000001,
"max": 0.13153023854
},
{
"command": "pnpr@main",
"mean": 0.10688904857448278,
"stddev": 0.006360147362953228,
"median": 0.10676514554000001,
"user": 0.04687066206896552,
"system": 0.022751428965517243,
"min": 0.09772128054000001,
"max": 0.12345727454000001
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.30587048881333334,
"stddev": 0.029402269693417173,
"median": 0.30224211448,
"user": 0.32443044,
"system": 0.08421620222222222,
"min": 0.24686523648,
"max": 0.34799874948000004
},
{
"command": "pacquet@main",
"mean": 0.2652642611466666,
"stddev": 0.026296120766867624,
"median": 0.25948556648,
"user": 0.29727066222222226,
"system": 0.07288809111111111,
"min": 0.23205050148,
"max": 0.31447065848
},
{
"command": "pnpm@HEAD",
"mean": 5.030170701035555,
"stddev": 0.20023498769381826,
"median": 5.03775160848,
"user": 8.003541773333332,
"system": 0.49398409111111113,
"min": 4.637471490479999,
"max": 5.28658022648
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.08763667228322583,
"stddev": 0.003536237843159389,
"median": 0.08684829138,
"user": 0.07408365354838711,
"system": 0.059199883870967744,
"min": 0.08152545238,
"max": 0.09785779238
},
{
"command": "pacquet@main",
"mean": 0.08841662567411765,
"stddev": 0.0038922667465194445,
"median": 0.08706348538,
"user": 0.08166469529411766,
"system": 0.05422875294117646,
"min": 0.08346494838,
"max": 0.09956874838
}
]
}Scenario: Isolated linker: injected workspace repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.13007826264857142,
"stddev": 0.009083859069329075,
"median": 0.13192401922000002,
"user": 0.048675454285714286,
"system": 0.09209495714285715,
"min": 0.10873601222,
"max": 0.14160418222
},
{
"command": "pacquet@main",
"mean": 0.11653417067833333,
"stddev": 0.009162438834217737,
"median": 0.11347106772,
"user": 0.04190282333333333,
"system": 0.08449164166666666,
"min": 0.10190063822,
"max": 0.13603424022000002
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.66310842368,
"stddev": 0.1910174781237814,
"median": 4.622425310880001,
"user": 2.2826004400000004,
"system": 1.70981238,
"min": 4.44980321788,
"max": 4.943701083880001
},
{
"command": "pacquet@main",
"mean": 4.61792239348,
"stddev": 0.16146023478775118,
"median": 4.55072229238,
"user": 2.2657643399999996,
"system": 1.7119788800000002,
"min": 4.4782956918800005,
"max": 4.87165200188
},
{
"command": "pnpr@HEAD",
"mean": 3.5816580304800008,
"stddev": 0.17461821961646357,
"median": 3.5155343558800003,
"user": 1.9384179400000001,
"system": 1.48343958,
"min": 3.40587640488,
"max": 3.89597527488
},
{
"command": "pnpr@main",
"mean": 3.57644720448,
"stddev": 0.14997444221455708,
"median": 3.55878219138,
"user": 1.9880281400000002,
"system": 1.49619418,
"min": 3.4262789808800003,
"max": 3.92162493988
}
]
}Scenario: GVS linker: fresh restore, hot cache + hot storeSame install as the isolated fresh-restore hot/hot scenario, into the shared virtual store, the layout pnpm 12 installs into by default. Scenarios run on separate machines, so compare main and branch within each table.
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.15510998062666667,
"stddev": 0.012885246332314379,
"median": 0.15438253396,
"user": 0.19472602,
"system": 0.16978968,
"min": 0.13832146796000003,
"max": 0.18889341696000003
},
{
"command": "pacquet@main",
"mean": 0.14779490232842107,
"stddev": 0.019712040041342624,
"median": 0.14109313396000003,
"user": 0.19141547263157893,
"system": 0.14581871157894738,
"min": 0.12989577596000002,
"max": 0.20641226296000004
},
{
"command": "pnpr@HEAD",
"mean": 0.1898159881418182,
"stddev": 0.03612118385781003,
"median": 0.16498408996000002,
"user": 0.23373469272727274,
"system": 0.16535780727272725,
"min": 0.14613930996000002,
"max": 0.23530272196000002
},
{
"command": "pnpr@main",
"mean": 0.1871469501418182,
"stddev": 0.02628845615141267,
"median": 0.18138066596000002,
"user": 0.22330314727272726,
"system": 0.16128044363636362,
"min": 0.16198768296000002,
"max": 0.23545700096000002
}
]
}Scenario: Store only: unlocked direct deps, cold cache + hot storeStore-only install (
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.33317759512,
"stddev": 0.054762789122714185,
"median": 1.32306388752,
"user": 0.71484656,
"system": 0.2776143,
"min": 1.25500138902,
"max": 1.4234265550199998
},
{
"command": "pacquet@main",
"mean": 1.27310590582,
"stddev": 0.04970729693993395,
"median": 1.26360401752,
"user": 0.6322277600000001,
"system": 0.23801859999999997,
"min": 1.21572402002,
"max": 1.35414252102
}
]
}Scenario: Cargo: repeat install, hot cache + hot storeFrozen repeat install of a Cargo workspace (
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.03214994685391305,
"stddev": 0.0022312159670178798,
"median": 0.031750905680000004,
"user": 0.023453026086956527,
"system": 0.01811198673913044,
"min": 0.02922501568,
"max": 0.039730218680000005
},
{
"command": "pacquet@main",
"mean": 0.030609644927422686,
"stddev": 0.0011347782020033424,
"median": 0.030352524680000003,
"user": 0.02138354536082475,
"system": 0.01858291422680413,
"min": 0.028780944680000003,
"max": 0.03514496668
}
]
} |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #17577 +/- ##
==========================================
- Coverage 92.76% 92.74% -0.02%
==========================================
Files 1990 1992 +2
Lines 258000 258187 +187
==========================================
+ Hits 239332 239465 +133
- Misses 18668 18722 +54 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Split the SQLite metadata backend into a shared SQL layer and an adapter per database, as pnpm/rfcs#66 describes under "Backend adapters". The shared layer keeps the schema, the queries, removed-version refusal, generations, publication outcomes, release notes, and the render caches. The `Adapter` trait supplies what differs between databases: - connections: one writer, readers that never wait for it; - the statements that begin a write or a read transaction; - which errors are conflicts a rerun of the whole transaction clears; - placeholders and types, translated by its `Connection`; - where a read runs, the primary or a replica. The shared layer runs every statement through `Connection` with `?N` placeholders and owned `Param`/`Value` types, so a libSQL adapter can run the same code. It stays synchronous on the blocking pool. Each operation names the freshness it needs (`Current` for reads that decide a write or answer a retry, `Bounded` for views), which an adapter with a replica maps to the primary or the replica; SQLite reads its one database either way. Queries now stay in the subset SQLite, libSQL, and PostgreSQL share: `INSERT OR IGNORE` became `ON CONFLICT DO NOTHING`, removing a version or package deletes its rows explicitly instead of relying on a connection-level foreign-key cascade, and a taken publication name is found by a lookup inside the write transaction instead of by decoding a driver-specific constraint error. A write that the adapter reports as a conflict (SQLITE_BUSY or SQLITE_LOCKED for SQLite) runs again from its start, up to four times. Every read now runs in one read transaction. `SqliteMetadata` is `SqlMetadata`, opened with `SqlMetadata::open_sqlite`, and `Storage::sqlite_metadata` is `Storage::sql_metadata`. The existing tests pass with renames only; the test that held the write connection now holds it through the adapter. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
be10844 to
3ec74f7
Compare
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
PR Summary by QodoRefactor pnpr SQL metadata behind a database adapter
AI Description
Diagram
High-Level Assessment
Files changed (26)
|
Code Review by Qodo
1.
|
No runtime changes
1 job · nothing new
How to read thisRunner.Worker ← process on a path └─ curl ← process that acted └─ ○ example[.]com ← observed action Runtime behavior, recorded by Garnet. Add it to your CI ↗ |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
A failed `COMMIT` can leave its transaction open, but the write transaction marked itself closed before running it, so its drop skipped the rollback and the writer's next `BEGIN IMMEDIATE` failed inside the open transaction. It is now marked closed only once the commit succeeds. The SQLite adapter also ends a transaction its writer was left in before the next write, and closes a reader still in its transaction instead of returning it to the idle readers, where every read on it would fail. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Replies to the Qodo review:
Written by an agent (Claude Code, claude-opus-5-5). |
|
Code review by qodo was updated up to the latest commit cc9b1db |
PR Code Suggestions ✨Warning
No code suggestions found for the PR.
|
Summary
First of a stack that adds shared SQL metadata backends to pnpr, as designed in pnpm/rfcs#66 ("Backend adapters" and "Shared deployments"). Task list: pnpm/tasks#244.
This PR changes no behavior. It splits the SQLite metadata backend into a shared SQL layer and an
Adaptertrait, so the libSQL adapter later in the stack runs the same schema and queries.metadata/sql/): schema, queries, removed-version refusal, generations, publication outcomes, release notes, render caches. It runs every statement throughConnectionwith?Nplaceholders and ownedParam/Valuetypes.Adaptertrait (metadata/sql/adapter.rs) supplies what differs: connections (one writer, readers that never wait for it), the begin statements for write and read transactions (BEGIN IMMEDIATE/BEGINon SQLite), which errors are retryable conflicts, placeholder and type translation in itsConnection, and where a read runs (ReadSource::PrimaryorReplica).SqliteAdapter(metadata/sql/sqlite.rs) is the existing connection handling, moved.Currentfor reads that decide a write or answer a retry (read-for-update, recorded outcomes, catalog generation),Boundedfor views and listings. SQLite reads its one database either way.Queries now stay in the subset SQLite, libSQL and PostgreSQL share.
INSERT OR IGNOREbecameON CONFLICT DO NOTHING. Removals delete rows explicitly instead of relying on a per-connectionforeign_keyscascade. A taken publication name is found by a lookup inside the write transaction instead of by decoding a SQLite constraint error.Stack:
metadata.urlconfig, SQLite by defaultpnpr-authSquash Commit Body
Checklist
already linked to it solves it.
Tests:
pnpm test:rustover everypnpr-*crate pluspnpm-registry-mock(1802 passed). The existing SQLite metadata tests pass with renames only. The test that held the write connection now holds it through the adapter. New tests cover the SQLite conflict classification, a failedCOMMITbeing rolled back, and a writer or reader left inside a transaction not being reused as one. No changeset: nothing a pnpr user sees changes.Written by an agent (Claude Code, claude-opus-5-5).
🤖 Generated with Claude Code
Summary by CodeRabbit