mirror of
https://relay.ngit.dev/npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/ngit-grasp.git
synced 2026-10-05 15:08:24 +00:00
Update issue 194d: Implementation complete
This commit is contained in:
@@ -24,22 +24,22 @@ When `archive_all=true` is enabled, the relay should accept ALL repository annou
|
||||
|
||||
## Plan
|
||||
|
||||
- [ ] Phase 1: Pass `archive_all` config to `SelfSubscriber`
|
||||
- [x] Phase 1: Pass `archive_all` config to `SelfSubscriber`
|
||||
- Add `archive_all: bool` field to `SelfSubscriber` struct
|
||||
- Update `SelfSubscriber::new()` signature to accept archive_all parameter
|
||||
- Pass config value from `SyncManager::start()` when creating SelfSubscriber
|
||||
|
||||
- [ ] Phase 2: Skip filtering in archive_all mode
|
||||
- [x] Phase 2: Skip filtering in archive_all mode
|
||||
- Modify `process_notification()` to check archive_all flag
|
||||
- Skip `lists_our_relay()` check when archive_all is true
|
||||
- Update logging to indicate archive-all mode bypass
|
||||
|
||||
- [ ] Phase 3: Add test coverage
|
||||
- [x] Phase 3: Add test coverage
|
||||
- Test that archive_all=false still filters correctly
|
||||
- Test that archive_all=true processes all announcements
|
||||
- Test relay discovery from announcements that don't list our domain
|
||||
|
||||
- [ ] Phase 4: Update documentation
|
||||
- [x] Phase 4: Update documentation
|
||||
- Document archive-all behavior in architecture docs
|
||||
- Add note about relay discovery to GRASP-05 docs
|
||||
|
||||
@@ -55,6 +55,37 @@ When `archive_all=true` is enabled, the relay should accept ALL repository annou
|
||||
- Started: Created issue 194d and worktree
|
||||
- Next: Implement Phase 1 - pass archive_all config to SelfSubscriber
|
||||
|
||||
### 2026-01-13 [Session 12:15]
|
||||
- Completed: All code changes implemented (Phases 1-3)
|
||||
- Implementation:
|
||||
- Added `archive_all: bool` field to `SelfSubscriber` struct (src/sync/self_subscriber.rs:95)
|
||||
- Updated `SelfSubscriber::new()` to accept `archive_all` parameter (src/sync/self_subscriber.rs:111-125)
|
||||
- Modified call site in `SyncManager::start()` to pass `self.config.archive_all` (src/sync/mod.rs:1297)
|
||||
- Updated `process_notification()` to skip filtering when `archive_all=true` (src/sync/self_subscriber.rs:153)
|
||||
- Added logging field `archive_all` to diagnostic messages (src/sync/self_subscriber.rs:172)
|
||||
- Testing:
|
||||
- Added 10 unit tests for helper functions (clone URL conversion, relay URL extraction, etc.)
|
||||
- Created new integration test file `tests/sync/archive_all.rs` with 3 comprehensive tests:
|
||||
1. `test_archive_all_false_filters_announcements` - Verifies filtering still works in regular mode
|
||||
2. `test_archive_all_true_accepts_all_announcements` - Verifies archive_all accepts all repos
|
||||
3. `test_archive_all_discovers_relays` - Verifies relay discovery works in archive_all mode
|
||||
- Added `TestRelay::start_with_archive_all()` helper for testing archive mode
|
||||
- All tests pass successfully
|
||||
- Next: Update documentation
|
||||
|
||||
### 2026-01-13 [Session 12:30]
|
||||
- Completed: Documentation updated (Phase 4)
|
||||
- Documentation changes:
|
||||
- Updated `docs/explanation/grasp-05-archive.md` with new "Relay Discovery in Archive Mode" section
|
||||
- Explained cascading discovery: announcements → relays → more announcements → more relays
|
||||
- Documented implementation detail: `lists_our_relay()` filter skipped in archive-all mode
|
||||
- Updated `docs/explanation/grasp-02-proactive-sync.md` SelfSubscriber section
|
||||
- Added note about filtering behavior difference between regular and archive-all modes
|
||||
- Verification:
|
||||
- All library tests pass (342 passed)
|
||||
- All integration tests pass (3 new archive_all tests)
|
||||
- Status: Implementation complete and ready for testing
|
||||
|
||||
## Notes
|
||||
|
||||
**Context:**
|
||||
|
||||
Reference in New Issue
Block a user