From e5f77a0454c28d7956e2c5754d972851ad0ef048 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Mon, 26 Jan 2026 08:54:23 +0000 Subject: [PATCH] issue: update 4bc5 - classification system redesign completed --- 4bc5-relay-ngit-dev-migration-v2.md | 52 +++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/4bc5-relay-ngit-dev-migration-v2.md b/4bc5-relay-ngit-dev-migration-v2.md index ec4286e..f31c4a4 100644 --- a/4bc5-relay-ngit-dev-migration-v2.md +++ b/4bc5-relay-ngit-dev-migration-v2.md @@ -318,6 +318,58 @@ relay.ngit.dev currently runs ngit-relay (reference implementation). We want to - Users can identify which repos have format issues - No need to manually look up event IDs +### 2026-01-26 [Session 21:00 - Classification System Redesign] + +**Redesigned classification system to eliminate overlap and confusion:** + +1. **Root cause of confusion:** + - Purgatory expiry was treated as a terminal category (no-action) + - But purgatory is orthogonal to git sync status (it's context, not classification) + - This caused 285 repos with complete data in prod to be marked "no action required" + +2. **Design principles for new system:** + - Primary dimension: prod status (what data exists in source of truth) + - Secondary dimension: archive status (what data exists in destination) + - Tertiary: context flags (purgatory-expired, parse-failure, deleted) + - Classification based on action needed, not technical state + +3. **User feedback incorporated:** + - prod=cat2 (empty) is ALWAYS no action required + - archive-only and not-in-prod moved to no-action (nothing to migrate) + - needs-investigation moved to manual-review (requires human judgment) + - Include purgatory context in needs-resync entries + +4. **New category structure (Option B):** + - **Tier 1: ready-for-migration.txt** (352 repos, 50.8%) + - Complete in both (199) + - Deleted by user (15) + - Empty in prod - any archive status (115) + - Archive-only, not in prod (3) + - Purgatory-only, not in prod (20) + - **Tier 2: needs-resync.txt** (295 repos, 42.6%) + - Complete in prod, missing from archive (294, 283 with purgatory-expired) + - Complete in prod, incomplete in archive (1) + - **Tier 3: manual-review.txt** (46 repos, 6.6%) + - Partial in prod (24) + - No-match in prod (5) + - Parse failures (17) + +5. **Key improvements:** + - 285 repos correctly moved from no-action to needs-resync + - Purgatory context visible in needs-resync entries + - No overlap between categories + - Organized by action type, not technical state + - Each repo appears in exactly one file + +6. **Bug fixes during implementation:** + - Fixed bash arithmetic with `set -e` (changed `((count++))` to `$((count + 1))`) + - Fixed NDJSON deletion processing (jq handling) + - Optimized batch hex-to-npub conversion + +7. **Output format:** + - `repo | npub | prod_status | archive_status | context | action` + - Example: `myrepo | npub1abc... | complete | missing | purgatory-expired | trigger re-sync to archive` + 2. **Parse failure investigation:** - Initial count: 446 invalid announcements (WRONG - double-counting bug) - Root cause: Same event logged with hex ID and note1 (bech32) ID