From b3031800cd95601c2d9cd2d24034364d1496b073 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Tue, 4 Nov 2025 08:50:29 +0000 Subject: Migrate to standard NIP-01 't' tags for audit events - Changed from custom single-letter tags (g, r, c) to standard 't' tags - Tag values now use descriptive prefixes: - 'grasp-audit-test-event' (marker tag) - 'audit-{run-id}' (run identification) - 'audit-cleanup-after-{timestamp}' (cleanup time) - Updated audit_tags() in src/audit.rs - Updated query filtering in src/client.rs - Updated all tests to verify 't' tag usage - All tests passing: 12/12 unit tests, 1/1 integration test - CLI verified working with new tag scheme This follows standard Nostr conventions and avoids potential conflicts with other uses of single-letter tags. The 't' tag is specifically designed for categorization/topics per NIP-01. --- grasp-audit/src/client.rs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'grasp-audit/src/client.rs') diff --git a/grasp-audit/src/client.rs b/grasp-audit/src/client.rs index d78b33c..4831d3f 100644 --- a/grasp-audit/src/client.rs +++ b/grasp-audit/src/client.rs @@ -95,16 +95,11 @@ impl AuditClient { if self.config.mode == AuditMode::CI { // In CI mode, only see our own audit events - // Filter by "g" tag (grasp-audit marker) and "r" tag (run ID) + // Filter by "t" tags (hashtags) + let t_tag = SingleLetterTag::lowercase(Alphabet::T); filter = filter - .custom_tag( - SingleLetterTag::lowercase(Alphabet::G), - "grasp-audit" - ) - .custom_tag( - SingleLetterTag::lowercase(Alphabet::R), - &self.config.run_id - ); + .custom_tag(t_tag, "grasp-audit-test-event") + .custom_tag(t_tag, format!("audit-{}", self.config.run_id)); } // In Production mode, see all events (no filter modification) -- cgit v1.2.3