Tracker mapping first party wrong attributions
Merged
CO
6mo ago+1548+1548+0123456789012345678901234567890123456789-65-65-01234567890123456789
- too many update methods in coredata?
- comments in sql queries?
Summary by cubic
Adds a FIRST_PARTY verdict to the tracker‑pattern catalog and hardens mapping to stop wrong vendor attributions from spreading. Trusts only high‑confidence rows, requires concrete evidence, and adds proboctl tools to curate, audit, upsert, and mark verdicts; tests and seeds updated.
Coredata +241 -33
- Added
CommonTrackerPatternAttributionenum andattributioncolumn with migration/backfill. - Upsert preserves
FIRST_PARTY(rows stay vendor‑free), skips enrichment requeue forFIRST_PARTY, and keeps verdicts in sync with vendor links; removed inline SQL comments. - New helpers:
RelinkCommonThirdPartyByIDssetsTHIRD_PARTY/UNDETERMINED;SetAttributionByIDsmarks rows; filter adds.WithAttribution.
Service +259 -26
- Deterministic adoption only when confidence ≥0.9;
FIRST_PARTYshort‑circuits and clears any stale org link; skip agent forPRE_EXISTINGpatterns. - Agent adds
evidence_sourceandis_first_party; rejects attributions without concrete evidence; corroborating a prior low‑confidence vendor promotes it to trusted. - Prompt updated with evidence rules and first‑party guidance.
proboctl +417 -3
- New
commontrackerpattern upsertkeyed by natural key; honorsFIRST_PARTY; normalizes verdicts on link/unlink (THIRD_PARTYon link,UNDETERMINEDon unlink); optional--enrich. - New
commontrackerpattern mark-first-partyto record the verdict and remap uncategorised org patterns;listadds--attributionand shows “Verdict”;showdisplays verdict; seeder setsTHIRD_PARTYwhen a vendor exists.
Tests +595 -3
- Coverage for terminal first‑party behavior, trust‑gated adoption, evidence gating, and helper logic; e2e seed inserts
UNDETERMINEDattribution.
Agents +36 -0
- Cursor rule documenting migration timestamp naming and SQL SQL‑header requirements.