fix(deps): pin surrealdb==2.0.0 — close wire-format drift surface (#252 Layer 1)#255
Merged
Merged
Conversation
… Layer 1) Closes #252 Issue 2 Layer 1 per docs/research-brief-252-privacy-preserving-ledger-remediation.md. Root cause class: "Invalid revision N for type Value" deserialization errors from SurrealDB are wire-format version mismatches between the surrealdb-py client and the on-disk SurrealKV record headers. With `surrealdb>=2.0.0` (floor only), a routine `pip install --upgrade` can swap the lib under an existing ledger and silently introduce incompatibility — the failure mode that hit `jaune24` (#252). Patch-level pin to ==2.0.0 is unambiguous (surrealdb 2.x has only one patch published; future patches must verify the wire format and ship with a deliberate migration path). Future surrealdb bumps require: - Schema-revision sentinel persisted in the ledger (#252 Layer 2) - Operator-driven export/import (#252 Layer 4) for migration - Explicit pin update in this file with rationale This is privacy-preserving by construction — no customer data needed to ship the fix. Plan: docs/research-brief-252-privacy-preserving-ledger-remediation.md
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
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.
Summary
#252 Layer 1 of the privacy-preserving ledger-remediation strategy (`docs/research-brief-252-privacy-preserving-ledger-remediation.md`). One-line patch-level pin closes the wire-format drift surface that produced `jaune24`'s `Invalid revision 116 for type Value` deserialization error.
Root cause class
"Invalid revision N for type Value" from SurrealDB's deserializer is a wire-format version mismatch between the surrealdb-py client and the on-disk SurrealKV record header. With `surrealdb>=2.0.0` (floor only), a routine `pip install --upgrade` can swap the lib under an existing ledger and silently introduce incompatibility — the failure mode that hit `jaune24`.
What ships
One file changed: `pyproject.toml` — `surrealdb>=2.0.0` → `surrealdb==2.0.0` with inline rationale comment.
Why `==2.0.0` is unambiguous
`pip index versions surrealdb` confirms `2.0.0` is the only published patch in the 2.x range:
```
Available versions: 2.0.0, 1.0.8, 1.0.7, ..., 0.0.1
```
The pin is a no-op for current installs (everyone is already on 2.0.0); the value is at install-time for future users — no upgrade can swap the wire format under an existing ledger.
Privacy posture
This fix is privacy-preserving by construction:
This satisfies the operator directive on #252 ("keep customer's private data private and fulfill security compliance concerns while still providing resolution").
Test plan
Future bump discipline
Bumping the pin requires (per the strategy brief):
Closes
Related
🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com