upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/grasp-audit/src/specs/grasp01_nostr_relay.rs
AgeCommit message (Collapse)Author
2025-11-05restructure grasp01 audit tests and add event acceptanceDanConwayDev
2025-11-05test: consolidate state announcement tests with GRASP-01 spec formatDanConwayDev
Refactor repository state announcement testing to better match GRASP-01 specification requirements: - Consolidate multiple refs testing into accept_valid_repo_state_announcement - Remove separate accept_state_announcement_multiple_refs test (redundant) - Update tag format to match spec: use git reference as tag kind Example: ["refs/heads/main", "<commit-sha>"] instead of ["r", "refs/heads/main", "<commit-sha>"] - Ensure repo announcement (kind 30617) is sent before state announcement - Test multiple branch refs (main, develop), tag refs (v1.0.0), and HEAD - Simplify test validation by removing redundant assertions This approach provides better spec compliance and reduces test redundancy while maintaining comprehensive coverage of multiple reference scenarios.
2025-11-05feat(grasp-audit): implement tests #3 and #4 for GRASP-01 complianceDanConwayDev
- Add test_reject_repo_announcement_missing_relays_tag (test #3) Verifies that repo announcements without required 'relays' tag are rejected - Add test_accept_valid_repo_state_announcement (test #4) Verifies that valid repo state announcements with all required tags are accepted Both tests verified passing with test-ngit-relay.sh
2025-11-05Refactor: abstract announcement event creation into AuditClient helperDanConwayDev
- Add create_repo_announcement() method to AuditClient - Remove duplicate code from nip01_smoke.rs - Update grasp01_nostr_relay.rs to use centralized helper - All tests passing (GRASP-01: 4/18, NIP-01: 6/6)
2025-11-05feat(grasp-audit): improve test infrastructure and error handlingDanConwayDev
- Fix compilation error in test setup (use .expect() instead of ?) - Add comprehensive error messages with troubleshooting guidance - Implement connection verification in AuditClient with retry logic - Update AGENTS.md with testing troubleshooting section - Verify all changes: 4/18 tests passing as expected Error messages now include: - Specific context about failures (event IDs, repo IDs, URLs) - Example commands for resolution (docker, nak verification) - References to helper scripts (test-ngit-relay.sh) Tests compile cleanly and run successfully against ngit-relay.
2025-11-05docs: fixed desired grasp-audit behaviour in README.mdDanConwayDev
2025-11-05fix: hardcoded portDanConwayDev
2025-11-05feat(grasp-audit): implement test_reject_repo_announcement_missing_clone_tagDanConwayDev
- Tests that relay rejects repo announcements without service in clone tag - Validates GRASP-01 line 5 requirement - Tested against ngit-relay on port 18081 - Test passes (4/18 GRASP-01 Nostr relay tests now passing)
2025-11-05feat(grasp-audit): implement test_accept_valid_repo_announcementDanConwayDev
- Fix Tags iteration error (use .iter() method) - Test validates GRASP-01 requirement: accept repo announcements listing service - Verifies clone and relays tags contain service URL - Tested against ngit-relay on port 18081 - Test passes successfully
2025-11-05preparing to build grasp-audit against git-relayDanConwayDev