chore(typedb): migrate typedb-driver 3.8 → 3.11.5#98
Conversation
The 3.11 driver changed two call shapes: - DriverOptions::new(bool, Option<_>) → DriverOptions::new(DriverTlsConfig) and is no longer fallible. - TypeDBDriver::new(&str, ..) now takes Addresses, built via Addresses::try_from_address_str. Migrated both call sites: src-tauri's connect() and the bert-typedb Transpiler. Also adds the ProcessPrimitive::Amplifying match arm in insert.rs so the tool stays exhaustive against the current bert-core enum (the "Amplifying" string already exists in schema.tql). Verified: cargo check --workspace clean; the bert-typedb integration smoke test (connect + schema roundtrip) passes against a live TypeDB 3.11.5 server. Closes #96 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Code Review: chore(typedb): migrate typedb-driver 3.8 → 3.11.5Summary: Clean, focused migration that unblocks the workspace build. The changes are minimal and correct — this is a nice example of a well-scoped chore PR. What the PR does
Strengths
Minor Issues1. Inconsistent error paths for In Addresses::try_from_address_str(DEFAULT_HOST).map_err(|e| format!("Addresses: {e}"))?;In 2. Hardcoded credentials in const DEFAULT_PASSWORD: &str = "password";Not a regression from this PR, but since you're touching this file it might be worth a 3. Consider whether Pinning to No issues found in
Checklist per CLAUDE.md quality gates
Verdict: Approve. The migration is correct, the error handling improvement in 🤖 Generated with Claude Code |
cargo fmt reflow of the Addresses/TypeDBDriver error-mapping added in the previous commit — no behavior change. Closes the fmt quality gate the migration commit missed.
Code ReviewOverall: Approve with minor suggestions. This is a clean, necessary migration that unblocks the build. Changes are minimal, correct, and consistent across both call sites. What the PR doesMigrates
Also adds the missing Correctness ✅
Minor concerns
Addresses::try_from_address_str(host).map_err(|e| TranspilerError::Connection {
host: host.to_string(),
source: Box::new(e),
})?;A bad host string (e.g.
const DEFAULT_USERNAME: &str = "admin";
const DEFAULT_PASSWORD: &str = "password";These are pre-existing (not introduced by this PR) and the PR description notes they match TypeDB CE out-of-box defaults. Still worth flagging: if this path is ever exposed beyond localhost dev use, these should come from config or environment variables rather than constants.
The What's not a concern
VerdictThe migration is correct and the diff is tight. The two minor concerns above ( 🤖 Generated with Claude Code |
Unblocks the workspace build / release path (#96). The 3.8 → 3.11.5 driver bump is an API break; this migrates both call sites.
Changes
DriverOptions::new(bool, Option<_>)→DriverOptions::new(DriverTlsConfig::disabled())(no longer fallible).TypeDBDriver::new(&str, …)→ takesAddressesviaAddresses::try_from_address_str(host).src-tauri/src/typedb_reader.rs::connect()andtools/bert-typedb/src/driver.rs::Transpiler::connect().insert.rs: adds theProcessPrimitive::Amplifyingmatch arm so the tool stays exhaustive against the current bert-core enum (the"Amplifying"string already exists inschema.tql— three-way consistent).Why this was parked
It was finished-but-uncommitted local WIP, set aside during bert#88 so the kernel diff stayed clean (the TypeDB path isn't on the critical path — sims run without it). Now landed on its own so it's reviewed/CI'd independently.
Verification
cargo check --workspaceclean (previously red onmain— this is the fix).cargo test -p bert-typedb --features integration --test driver_smoke→connect_and_roundtrip_schema(connect → create db → roundtrip schema → drop) +schema_constant_is_nonempty, 2/2.Closes #96
🤖 Generated with Claude Code