huskies: merge 927

This commit is contained in:
dave
2026-05-12 17:49:44 +00:00
parent b8945654bf
commit 03a99b3cf1
33 changed files with 119 additions and 25 deletions
+1
View File
@@ -34,6 +34,7 @@ use crate::slog;
/// Opens the SQLite database, loads or creates a node keypair, replays any
/// persisted ops to reconstruct state, and spawns a background persistence
/// task. Safe to call only once; subsequent calls are no-ops.
#[allow(clippy::string_slice)] // op_id is hex::encode output (ASCII-only), &op_id[..12] is always valid
pub async fn init(db_path: &Path) -> Result<(), sqlx::Error> {
if CRDT_STATE.get().is_some() {
return Ok(());
@@ -49,6 +49,7 @@ pub fn name_from_story_id(story_id: &str) -> String {
///
/// Returns `Some("664")` for `"664_story_my_feature"`, and `None` for IDs
/// that are already numeric-only (`"664"`) or have no valid numeric prefix.
#[allow(clippy::string_slice)] // idx comes from find('_') → always a char boundary
pub(super) fn numeric_id_from_slug(story_id: &str) -> Option<String> {
// Already numeric-only — no migration needed.
if story_id.chars().all(|c: char| c.is_ascii_digit()) {