Repository navigation
Preserve client metadata (supersedes #29) - #30
Conversation
…ection hivemind-plugin-manager 0.5.0 ships Client.metadata, so the CLIENT_SUPPORTS_METADATA runtime detection and dual code paths are dead code. Bump the dependency floor and always read/write metadata. The schema migration (ALTER TABLE ... ADD COLUMN metadata) is kept for backwards compatibility with DB files created by older versions. Tests: drop feature-detection skips, add nested-dict and non-ASCII metadata round-trip coverage.
- empty-dict default when no metadata kwarg
- INSERT OR REPLACE overwrites metadata on same client_id
- _metadata_to_json returns '{}' for non-dict inputs
- _metadata_from_row coerces NULL / malformed JSON / non-object JSON to {}
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (10)
✨ 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 |
Beep! Your PR results are served. 🍽️I've aggregated the results of the automated checks for this PR below. 📋 Repo HealthEnsuring the repo's joints are well-oiled (aka CI/CD). ⚙️ ✅ All required files present. Latest Version: ✅ 🔍 LintThe automated gnomes have finished their shift. 🍄 ✅ ruff: no issues ⚖️ License CheckEvaluating the impact of these changes on our licensing. 📈 ✅ No license violations found (45 packages). License distribution: 12× MIT License, 7× Apache-2.0, 6× MIT, 5× Apache Software License, 3× BSD-3-Clause, 2× ISC License (ISCL), 2× PSF-2.0, 1× Apache Software License; BSD License, +7 more Full breakdown — 45 packages
Copyright (c) 2022 Phil Ewels Permission is hereby granted, free of charge, to any person obtaining a copy The above copyright notice and this permission notice shall be included in all THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR Policy: Apache 2.0 (universal donor). StrongCopyleft / NetworkCopyleft / WeakCopyleft / Other / Error categories fail. MPL allowed. 🔨 Build TestsVerifying the structural soundness of your build. 🏗️ ✅ All versions pass
🏷️ Release PreviewThe release preview is now complete. 🏁 Current:
🚀 Release Channel Compatibility Predicted next version:
📊 CoverageChecking the structural integrity of our tests. 🏗️ ✅ 84.1% total coverage Per-file coverage (2 files)
Full report: download the 🔒 Security (pip-audit)The security scan is now complete. 🏁 ✅ No known vulnerabilities found (63 packages scanned). Your friendly neighborhood bot 🕷️ |
- _metadata_to_json: document that default=str makes datetime/UUID insertable but they come back as strings (column is opaque JSON, not a typed map) - _metadata_from_row: document the swallow-garbage rationale (one bad row mustn't break iteration) No behavior change.
Supersedes #29 by @goldyfruit — same
Client.metadatapersistence work, simplified for the releasedhivemind-plugin-manager>=0.5.0, with expanded tests.Changes vs #29
hivemind-plugin-manager>=0.5.0,<1.0.0— 0.5.0 shipsClient.metadata, so runtime feature detection is no longer needed.CLIENT_SUPPORTS_METADATAruntime check and dual codepaths in_row_to_client/add_item.metadatais now a normal field.ALTER TABLE clients ADD COLUMN metadatamigration for backwards-compatible DB files._metadata_to_json/_metadata_from_rowhelpers (real safety against garbage in the column).@skipif(not CLIENT_SUPPORTS_METADATA, ...)markers.Tests
45 passing (was 39). Metadata coverage now includes:
add_item/search_by_value/__iter__"🚀","Привет") round-tripsclientstablemetadatakwarg passedINSERT OR REPLACEoverwrites metadata on sameclient_id_metadata_to_jsonreturns"{}"for non-dict (None,int,str)_metadata_from_rowcoerces NULL / malformed JSON / non-object JSON to{}Safety
metadatacolumn added viaALTER TABLEon first open.metadatawould just ignore the column.Closes #29.