Type: architecture / consistency · Difficulty: medium
@bb/db (packages/db/src/index.ts) and @bb/graph-db (packages/graph-db/src/index.ts) implement the same provider-registry as @bb/queue (packages/queue/src/registry.ts) but more crudely: they throw new Error("… not initialized") instead of a typed @bb/errors class, and they lack the in-flight connecting promise that @bb/queue uses to dedupe concurrent connect callers.
Do: add DbNotConnectedError / GraphNotConnectedError to @bb/errors and throw those from getDb()/getGraph(); port the concurrent-connect dedupe from connectQueue to connectDb/connectGraph.
Done when: all three registries report not-connected via typed errors and guard against double-connect identically.
Type: architecture / consistency · Difficulty: medium
@bb/db(packages/db/src/index.ts) and@bb/graph-db(packages/graph-db/src/index.ts) implement the same provider-registry as@bb/queue(packages/queue/src/registry.ts) but more crudely: theythrow new Error("… not initialized")instead of a typed@bb/errorsclass, and they lack the in-flightconnectingpromise that@bb/queueuses to dedupe concurrentconnectcallers.Do: add
DbNotConnectedError/GraphNotConnectedErrorto@bb/errorsand throw those fromgetDb()/getGraph(); port the concurrent-connect dedupe fromconnectQueuetoconnectDb/connectGraph.Done when: all three registries report not-connected via typed errors and guard against double-connect identically.