issue: update 4bc5 - root cause analysis for 315 missing repos

This commit is contained in:
DanConwayDev
2026-01-23 15:37:03 +00:00
parent 1a0b506144
commit 857e95054e
+48
View File
@@ -191,6 +191,54 @@ relay.ngit.dev currently runs ngit-relay (reference implementation). We want to
- Easy rollback: remove `?ref=...` from flake input, rebuild (~5 min)
- Timeline: ~2 hours for complete validation
### 2026-01-23 [Session 15:30]
- **Investigated why 315 repos didn't sync to archive**
**Root Cause Analysis:**
1. **Event sync statistics:**
- Announcements (30617): 674/720 synced (94%) - working correctly
- State events (30618): 230/671 synced (34%) - **major gap**
- The 315 missing repos have announcements in archive but NO state events
2. **Key finding - GRASP relay correlation:**
- Repos using only `git.shakespeare.diy` (not `gitnostr.com`): 3x more likely to be missing
- Synced repos using only `git.shakespeare.diy`: 60
- Missing repos using only `git.shakespeare.diy`: 180
- Repos using `gitnostr.com`: roughly evenly split (142 synced, 117 missing)
3. **Hypothesis - Archive domain configuration:**
- Archive relay likely configured with `domain = "relay.ngit.dev"`
- SelfSubscriber skips syncing from relays containing `relay_domain`
- This causes archive to skip syncing state events from `wss://relay.ngit.dev`
- Archive tries to sync from other GRASP relays (`git.shakespeare.diy`, `gitnostr.com`)
- `gitnostr.com` has some state events, so those repos sync
- `git.shakespeare.diy` may not have state events or has connection issues
4. **Code evidence (src/sync/self_subscriber.rs:497-500):**
```rust
// Skip our own relay URL (we're subscribed to ourselves via self-subscription)
if relay_url.contains(&self.relay_domain) {
continue;
}
```
**Recommended Fix Options:**
1. **Configure archive with different domain** (e.g., `archive.relay.ngit.dev`)
- Allows syncing from `wss://relay.ngit.dev`
- Requires nixos-config change
2. **Modify SelfSubscriber to not skip bootstrap relay**
- Code change in ngit-grasp
- More complex, affects all deployments
3. **Accept the gap and migrate anyway**
- Missing repos will re-sync when users push or when prod becomes archive's upstream
- Simplest approach if gap is acceptable
**Decision needed:** Which approach to take for migration?
### 2026-01-23 [Session 14:00]
- **Deployed branch to VPS** - Successfully updated nixos-config to use branch
- **Ran full migration analysis** - All 5 phases completed successfully