fix(posthog): compare symbol-set release as a nested object, not a string - #8629
Conversation
…ring
PostHog's error_tracking/symbol_sets API returns each symbol set's release
as {id, hash_id, created_at, metadata, version, project} (per PostHog's own
ErrorTrackingRelease/ErrorTrackingSymbolSet dataclasses), never a flat
string. Both validate-posthog-release.mjs copies compared
nonBlank(set.release) -- which only accepts strings, so it always resolved
to undefined for the real object shape -- against our combined release
string, so the match could never succeed regardless of retries or timing.
Reconstructs "{project}@{version}" from the real shape instead.
Test fixtures in both twin test suites, plus posthog-upload.test.ts's fake
PostHog API server, previously mocked the wrong (flat-string) shape, which
is why this went undetected.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8629 +/- ##
==========================================
- Coverage 92.77% 92.21% -0.57%
==========================================
Files 798 798
Lines 79464 79464
Branches 24078 24078
==========================================
- Hits 73725 73280 -445
- Misses 4592 5100 +508
+ Partials 1147 1084 -63
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-25 23:36:41 UTC
Review summary Nits — 5 non-blocking
Concerns raised — review before merging
📋 Copy for AI agents — paste into your coding agentDecision drivers
Context & advisory signals — never blocks the verdict
Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
error_tracking/symbol_setsAPI returns each symbol set'sreleaseas a nested object ({id, hash_id, created_at, metadata, version, project}, per PostHog's ownErrorTrackingRelease/ErrorTrackingSymbolSetdataclasses), never a flat string.validate-posthog-release.mjscopies (review-enrichment, discovery-index) comparednonBlank(set.release)— which only accepts strings, so it always resolved toundefinedfor the real object — against our combined release string. The match could never succeed, regardless of retries or timing: this is why "Validate PostHog release" kept failing even after fix(posthog): pass release-name and release-version as separate CLI flags #8624 fixed the release-name/version split."{project}@{version}"from the real object shape.posthog-upload.test.ts's fake PostHog API server) mocked the wrong flat-string shape, which is exactly why this went undetected — updated them to the real nested shape and added coverage forrelease: nulland a release object missingproject/version.Test plan
npx vitest run test/unit/discovery-index/validate-posthog-release.test.ts— 16/16 passnpm --prefix review-enrichment test— 1379/1379 pass