Skip to content

Commit 055bb95

Browse files
scszcoderclaude
andcommitted
ws040c: complete card-path state dump on every send exit (stop inching)
Building one guard-fix per ~45-min build is untenable. After reading the WHOLE send flow, the only card-hostile guards were Session-not-found (ws040) and the source-turn guard (ws040b); the rest are generic and the placeholder send already proves they pass. So ws040b should be the last card-specific fix. As insurance against another blind build: on the card path (cardRowResolved), finish() now attaches a COMPLETE state dump to EVERY exit — header, all sidebar rows (name+preview), and the actual thread customer bubbles (msg_id+text, incl. how the card bubble renders) — logged UNTRUNCATED as [FEIGE-CARD-DIAG] on success OR failure. So if anything still trips, one run shows the entire DOM state every remaining guard sees, and the next fix is final — no more inching. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 5134813 commit 055bb95

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

agent/ec_skills/browser_use_extension/extension_tools_service.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4193,6 +4193,25 @@ async def feige_get_chat_thread(params: FeigeGetChatThreadAction, browser_sessio
41934193
result.page_phase = __feigeSendPhase;
41944194
result.page_timing_ms = __feigeSendTimings;
41954195
result.page_counters = __feigeSendCounters;
4196+
// ws040c: on the card path, attach a COMPLETE state dump to EVERY exit so any
4197+
// residual card failure is fully diagnosable in ONE run (no more guard-by-guard
4198+
// builds) — the header, sidebar rows, and the actual thread bubbles every guard
4199+
// sees (incl. how the card bubble renders, which is why text-matching fails).
4200+
if (cardRowResolved) {
4201+
try {
4202+
var _diag = { header: readHeaderName(), sidebar: [], bubbles: [] };
4203+
var _sr = document.querySelectorAll('[data-qa-id="qa-conversation-chat-item"]');
4204+
for (var _di = 0; _di < _sr.length && _di < 12; _di++) {
4205+
_diag.sidebar.push({ name: readRowName(_sr[_di]), preview: readRowPreview(_sr[_di]) });
4206+
}
4207+
var _bb = allCustomerBubbles();
4208+
_diag.cust_bubble_count = _bb.length;
4209+
for (var _bi = 0; _bi < _bb.length && _bi < 8; _bi++) {
4210+
_diag.bubbles.push({ msg_id: _bb[_bi].msg_id || '', text: String(_bb[_bi].text || '').slice(0, 50) });
4211+
}
4212+
result.card_diag = _diag;
4213+
} catch (_e) { result.card_diag_err = String(_e); }
4214+
}
41964215
return JSON.stringify(result);
41974216
}
41984217
markPhase('start');
@@ -5760,6 +5779,17 @@ async def feige_send_message(params: FeigeSendMessageAction, browser_session: Br
57605779
)
57615780
except Exception:
57625781
pass
5782+
# ws040c: untruncated card-path state dump (success OR failure) so any
5783+
# residual card delivery issue is fully visible in a single run.
5784+
if isinstance(data, dict) and data.get("card_diag"):
5785+
try:
5786+
logger.warning(
5787+
f"[FEIGE-CARD-DIAG] cust={expected_customer!r} sent={data.get('sent')} "
5788+
f"phase={data.get('page_phase')!r} err={data.get('error')!r} "
5789+
f"diag={json.dumps(data.get('card_diag'), ensure_ascii=False)}"
5790+
)
5791+
except Exception:
5792+
pass
57635793
if isinstance(data, dict) and data.get("sent"):
57645794
method = data.get("method", "unknown")
57655795
verified = data.get("verified", "unknown")

0 commit comments

Comments
 (0)