OverviewFilesCommitsIssuesDocsReleasesPeers

pear-git commits / b251eda

Fire onRepoRegistered for all registrations, not just new ones
A repo can exist in the registry (Hyperbee) but not be announced on the DHT — e.g. imported before P2P init, or registered while offline. announceRepo() is idempotent so double-announcing is safe. The callback is set after startup registration completes, so it only fires for runtime registrations — no performance impact at boot. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
b251eda0fa6b1852dbc04e32a370f4758c8d46b8
by plankatron <fleeky@gmail.com> · 2026-04-07T02:23:51.000Z

Changed files (1) +2 -3

lib/repo-registry.js +2 -3
……@@ -482,7 +482,6 @@ echo "[post-receive] Auto-deploy triggered for $REPO_NAME"
482482
483483 // Merge with existing entry to preserve user-configured fields
484484 const existing = await this.registry.get(`repo:${repoInfo.name}`).catch(() => null)
485 const isNew = !existing || !existing.value
486485 if (existing && existing.value) {
487486 const prev = existing.value
488487 // Preserve fields that are set via separate APIs (not from scan).
……@@ -526,8 +525,8 @@ echo "[post-receive] Auto-deploy triggered for $REPO_NAME"
526525
527526 console.log(` ✓ Registered ${repoInfo.name}${repoInfo.namespace ? ` (${repoInfo.namespace})` : ''}`)
528527
529 // Notify listener on NEW registrations (not re-registrations)
530 if (isNew && this.onRepoRegistered) {
528 // Notify listener — announceRepo is idempotent so safe for re-registrations
529 if (this.onRepoRegistered) {
531530 try {
532531 await this.onRepoRegistered(repoInfo.name)
533532 } catch (err) {