probo icon indicating copy to clipboard operation
probo copied to clipboard

Tracker mapping first party wrong attributions

Open codenem opened this issue 5 months ago • 0 comments

Summary by cubic

Adds a FIRST_PARTY verdict to the tracker‑pattern catalog and tightens mapping to stop wrong vendor attributions from spreading. Keeps verdicts and vendor links consistent (clears stale org links on first‑party, no enrichment requeue), requires concrete evidence, and adds proboctl tools to curate, audit, upsert, and mark verdicts; e2e seeds set attribution to avoid NOT NULL failures.

Coredata +252 -24

  • Added CommonTrackerPatternAttribution and attribution column; migration backfills vendors and drops DEFAULT.
  • Upsert preserves FIRST_PARTY (rows stay vendor‑free) and skips enrichment requeue for FIRST_PARTY.
  • RelinkCommonThirdPartyByIDs sets verdicts on link/unlink; added SetAttributionByIDs; filter gains .WithAttribution.

Service +259 -26

  • Deterministic adoption trusts only confidence ≥0.9; FIRST_PARTY short‑circuits; skip agent for PRE_EXISTING patterns.
  • On a FIRST_PARTY verdict, clear any stale org ThirdParty link.
  • Agent returns evidence_source and is_first_party; rejects attributions with no concrete evidence; corroborating a prior low‑confidence vendor promotes it to trusted.

proboctl +417 -3

  • New commontrackerpattern upsert keyed by natural key; honors FIRST_PARTY; normalizes verdicts when linking/unlinking (THIRD_PARTY on link, UNDETERMINED on unlink); optional --enrich.
  • New commontrackerpattern mark-first-party to record the verdict and remap uncategorised org patterns.
  • list adds --attribution and shows “Verdict”; show displays the verdict; seeder sets THIRD_PARTY when a vendor exists.

Tests +595 -3

  • Coverage for terminal first‑party behavior, clearing stale org links, non‑adoption of low‑confidence vendors, evidence gating, and helper logic.
  • e2e seed helper inserts UNDETERMINED attribution.

Agents +36 -0

  • Cursor rule documenting migration timestamp naming and SQL headers.

Written for commit 0b1c755471cf71020b0fa29fff5dd2cad81e9199. Summary will update on new commits.

Review in cubic

codenem avatar Jun 16 '26 16:06 codenem