issue: update 4bc5 - parse failure format fix completed

This commit is contained in:
DanConwayDev
2026-01-26 07:20:45 +00:00
parent f23e1c48ae
commit dcf188a5b4
+30
View File
@@ -288,6 +288,36 @@ relay.ngit.dev currently runs ngit-relay (reference implementation). We want to
- Added `--analysis-root` filter to scope parse failures to missing announcements only
- Commits: `b90c4a6`, `a968168`, `1715e3c`, `4dabb2b`, `093f5ed`
### 2026-01-26 [Session 20:00 - Parse Failure Format Fix]
**Fixed critical usability bug in parse failure output:**
1. **Root cause identified:**
- Phase 4 output: `event_id | kind | reason | (empty repo) | (empty npub)`
- Phase 5 expected: `repo | npub | kind | event_id | reason`
- Phase 5 was extracting columns 1-2 (event_id, kind) instead of columns 4-5 (repo, npub)
- Result: action-required.txt showed unusable event IDs instead of repo names
2. **Fix implemented (commit `2e233b6`):**
- Enhanced Phase 4 (`30-extract-parse-failures.sh`) with `enrich_with_repo_npub()` function
- Builds lookup table from `announcements.json` mapping event_id → repo|npub
- Uses jq to extract d-tag (repo) and pubkey from announcements
- Optionally converts hex pubkeys to npub format using nak
- Enriches parse failures by looking up event_id and populating repo/npub columns
- Fixed Phase 5 column extraction from `{print $1 "|" $2}` to `{print $4 "|" $5}`
3. **Verification:**
- Reran Phases 4-5 on existing analysis data
- 119 of 223 parse failures enriched with repo/npub (53%)
- Remaining 104 have empty repo/npub (event_ids not in announcements.json)
- Output now shows: `bit2factor | npub13kkpy... | parse failure logged | fix event format`
- Instead of: `000014b2... | 30617 | parse failure logged | fix event format`
4. **Impact:**
- Parse failure results now immediately actionable
- Users can identify which repos have format issues
- No need to manually look up event IDs
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