Skip to content

Open-source AI browser agent for Chrome and Firefox (monorepo) 🧠

Accept settled empty X conversations

Emre Sokullu030071a8825e
diff --git a/docs/social-publication-contract.md b/docs/social-publication-contract.md
index 9284e5bce..24c912ef2 100644
--- a/docs/social-publication-contract.md
+++ b/docs/social-publication-contract.md
@@ -59,6 +59,6 @@ The config accepts the existing provider fields (`providerName`, `baseUrl`, `mod
Calls run sequentially. Reports distinguish first-response validity, repairs, semantic contract errors, audit false accepts/rejects, token usage, and median/p95 latency. First-call latency is reported separately without assuming a cold server. Default results are ignored local artifacts under `test/llm/results-social-publication/`, with a Markdown report, per-case JSONL, and prompt/fixture hashes. The runner never invokes a browser action or publishes a post.
-For X direct messages, a mounted but empty log is treated as loading rather than as a proven first-message conversation. Dispatch and completion require a settled, nonempty conversation tail before a later matching sent row can be accepted.
+For X direct messages, a mounted empty log is treated as loading until the same non-loading log remains empty across repeated observations. That establishes a first-message baseline; completion accepts exactly one resulting matching row and rejects history that appears after dispatch.
X direct messages use their own message workflow, not the public publication contract. On `/i/chat/<conversation>`, the conversation header binds the recipient. An exact display-name or bare-username match resolves to that header's canonical handle during planning or before dispatch; subsequent verification requires the same handle, never a replacement account with the same display name. A send binds the exact body and the identities of all mounted message rows, including hidden and pending ones. An explicitly supplied body is required by the message-field classifier and is recovered from the approved task when a classifier response omits it, including route-local commands such as `Send Alex: Hello there`. Completion requires a new matching outgoing row after the prior conversation tail with `data-send-status="sent"`, an empty composer, and the same conversation. The open X chat composer does not override that delivery evidence; other adapters retain their dialog checks. Workflow field requirements are loaded even when repeated-item tracking is disabled. Incoming, pending, failed, or pre-existing messages cannot satisfy it.
diff --git a/src/chrome/src/agent/agent.js b/src/chrome/src/agent/agent.js
index 2b9aa6e86..d8255ef42 100644
--- a/src/chrome/src/agent/agent.js
+++ b/src/chrome/src/agent/agent.js
@@ -2157,7 +2157,13 @@ export class Agent extends LoopDetector {
messageBodyBaselineCount,
...(siteWorkflow.adapterName === 'twitter'
&& Array.isArray(executionContext.messageRecipientExistingMessageIds)
- ? { preDispatchMessageIds: [...executionContext.messageRecipientExistingMessageIds] }
+ ? {
+ preDispatchMessageIds: [...executionContext.messageRecipientExistingMessageIds],
+ ...(executionContext.messageRecipientTwitterEmptyConversationBaseline === true
+ && executionContext.messageRecipientExistingMessageIds.length === 0
+ ? { preDispatchEmptyConversationBaseline: true }
+ : {}),
+ }
: {}),
...(siteWorkflow.adapterName === 'gmail'
&& executionContext?.messageRecipientGmailComposeFlow === true
@@ -5520,14 +5526,16 @@ export class Agent extends LoopDetector {
const sentIds = messageProbe?.matchingOutgoingMessageIds;
const anchorIndex = Array.isArray(priorIds) && priorIds.length > 0 && Array.isArray(currentIds)
? currentIds.indexOf(priorIds[priorIds.length - 1]) : -1;
+ const settledEmptyBaseline = binding.preDispatchEmptyConversationBaseline === true
+ && Array.isArray(priorIds) && priorIds.length === 0;
+ const baselineStillValid = Array.isArray(priorIds) && Array.isArray(currentIds)
+ && ((priorIds.length > 0 && anchorIndex >= 0)
+ || (settledEmptyBaseline && currentIds.length === 1));
exactOutgoingBodyObserved = !!this._workflowMessageBody(binding.messageBody)
&& Array.isArray(priorIds) && Array.isArray(currentIds) && Array.isArray(sentIds)
- // The content-side guard records only a settled X log with a
- // concrete tail. Retain that invariant here as well so a malformed
- // or older binding cannot turn a late-loaded historic row into
- // evidence for this dispatch.
- && priorIds.length > 0 && anchorIndex >= 0
- && sentIds.some(id => !priorIds.includes(id) && currentIds.indexOf(id) > anchorIndex);
+ && baselineStillValid
+ && sentIds.some(id => !priorIds.includes(id)
+ && currentIds.indexOf(id) > (settledEmptyBaseline ? -1 : anchorIndex));
sentStatusObserved = exactOutgoingBodyObserved
&& recipientObserved
&& this._normalizeUrl(pageUrl) === this._normalizeUrl(submit?.originatingUrl || '');
@@ -23274,6 +23282,9 @@ Rules: no prose intro, no conclusion, no "this screenshot shows...", no layout d
executionContext.messageRecipientBodyBaselineCount = messageBodyBaselineCount;
if (policy.adapterName === 'twitter' && Array.isArray(probe.existingMessageIds)) {
executionContext.messageRecipientExistingMessageIds = [...probe.existingMessageIds];
+ if (probe.twitterEmptyConversationBaseline === true) {
+ executionContext.messageRecipientTwitterEmptyConversationBaseline = true;
+ }
}
if (probe.composerSubjectAvailable === true) {
executionContext.messageRecipientSubject = this._workflowMetadataValue(probe.composerSubject);
diff --git a/src/chrome/src/content/content.js b/src/chrome/src/content/content.js
index dbc561971..bf35a805c 100644
--- a/src/chrome/src/content/content.js
+++ b/src/chrome/src/content/content.js
@@ -456,6 +456,9 @@
function _hasVisibleBox(el, minWidth = 1, minHeight = 1) {
if (!el || typeof el.getBoundingClientRect !== 'function') return false;
try {
+ for (let ancestor = el; ancestor; ancestor = ancestor.parentElement) {
+ if (ancestor.getAttribute?.('aria-hidden') === 'true') return false;
+ }
const r = el.getBoundingClientRect();
if (r.width < minWidth || r.height < minHeight) return false;
const s = getComputedStyle(el);
@@ -4413,6 +4416,30 @@
}
const _messageRecipientDispatchBindings = new Map();
+ const _twitterEmptyLogObservations = new WeakMap();
+
+ function _settledEmptyTwitterLog(log) {
+ if (!log?.isConnected) return false;
+ let loading = false;
+ try {
+ loading = log.getAttribute('aria-busy') === 'true'
+ || !!log.querySelector('[aria-busy="true"],[role="progressbar"]');
+ } catch {}
+ if (loading) {
+ _twitterEmptyLogObservations.delete(log);
+ return false;
+ }
+ const now = Date.now();
+ const prior = _twitterEmptyLogObservations.get(log);
+ const observation = prior
+ ? { firstSeenAt: prior.firstSeenAt, count: prior.count + 1 }
+ : { firstSeenAt: now, count: 1 };
+ _twitterEmptyLogObservations.set(log, observation);
+ // A first-message conversation has no historic tail to pin. Require the
+ // same empty log to survive two non-loading reads before treating that
+ // exceptional baseline as settled.
+ return observation.count >= 2 && now - observation.firstSeenAt >= 300;
+ }
function _messageRecipientIdentityKey(values = []) {
return JSON.stringify(Array.from(new Set((Array.isArray(values) ? values : [])
@@ -4467,6 +4494,7 @@
messageBody: String(dispatch.messageBody || ''),
messageBodyBaselineCount: Number(dispatch.messageBodyBaselineCount || 0),
...(Array.isArray(dispatch.existingMessageIds) ? { existingMessageIds: [...dispatch.existingMessageIds] } : {}),
+ twitterEmptyConversationBaseline: dispatch.twitterEmptyConversationBaseline === true,
gmailComposeFlow: dispatch.gmailComposeFlow === true,
composerSubject: String(dispatch.composerSubject || ''),
composerSubjectAvailable: dispatch.composerSubjectAvailable === true,
@@ -4537,6 +4565,8 @@
|| live?.messageBody !== expected.messageBody
|| (expected.existingMessageIds
&& JSON.stringify(live?.existingMessageIds) !== JSON.stringify(expected.existingMessageIds))
+ || (expected.twitterEmptyConversationBaseline === true
+ && live?.twitterEmptyConversationBaseline !== true)
|| (expected.gmailComposeFlow === true && live?.gmailComposeFlow !== true)
|| (expected.composerSubjectAvailable === true
&& (live?.composerSubjectAvailable !== true || live?.composerSubject !== expected.composerSubject))) {
@@ -4943,6 +4973,9 @@
const visible = (el) => {
if (!el || el.nodeType !== 1 || !el.isConnected) return false;
try {
+ for (let ancestor = el; ancestor; ancestor = ancestor.parentElement) {
+ if (ancestor.getAttribute?.('aria-hidden') === 'true') return false;
+ }
const style = getComputedStyle(el);
const rect = el.getBoundingClientRect();
return style.display !== 'none'
@@ -5048,12 +5081,15 @@
.filter(row => /^message-(?!text-)[a-zA-Z0-9_-]{1,128}$/.test(row.getAttribute('data-testid') || ''))
: [];
const twitterMessageIds = twitterRows.map(row => row.getAttribute('data-testid'));
- // An empty mounted log can mean X is still loading older history. Do
- // not treat it as a proven first-message conversation: without a prior
- // tail, an old matching row that appears after dispatch is
- // indistinguishable from the message this run attempted to send.
- const twitterBaselineComplete = twitterLogs.length === 1 && twitterRows.length > 0
- && twitterRows.length <= 2000 && new Set(twitterMessageIds).size === twitterMessageIds.length;
+ const twitterEmptyConversationBaseline = twitterLogs.length === 1 && twitterRows.length === 0
+ && _settledEmptyTwitterLog(twitterLogs[0]);
+ if (twitterRows.length > 0 && twitterLogs[0]) _twitterEmptyLogObservations.delete(twitterLogs[0]);
+ // An empty mounted log can mean X is still loading older history. A
+ // first-message conversation is eligible only after the same non-loading
+ // empty log has settled across repeated observations.
+ const twitterBaselineComplete = twitterLogs.length === 1 && twitterRows.length <= 2000
+ && new Set(twitterMessageIds).size === twitterMessageIds.length
+ && (twitterRows.length > 0 || twitterEmptyConversationBaseline);
const matchingTwitterMessageIds = expectedBody => {
const expected = normalizedMessageBody(expectedBody);
if (!expected || !twitterBaselineComplete) return [];
@@ -5840,7 +5876,10 @@
supportsRecipientSets: params.supportsRecipientSets,
messageBody,
messageBodyBaselineCount,
- ...(twitterConversation ? { existingMessageIds: twitterMessageIds } : {}),
+ ...(twitterConversation ? {
+ existingMessageIds: twitterMessageIds,
+ ...(twitterEmptyConversationBaseline ? { twitterEmptyConversationBaseline: true } : {}),
+ } : {}),
gmailComposeFlow,
composerSubject,
composerSubjectAvailable,
@@ -5867,6 +5906,7 @@
...(twitterConversation && twitterBaselineComplete ? {
existingMessageIds: twitterMessageIds,
matchingOutgoingMessageIds: matchingTwitterMessageIds(params.expectedMessageBody),
+ ...(twitterEmptyConversationBaseline ? { twitterEmptyConversationBaseline: true } : {}),
} : {}),
// Only recipient-specific header evidence is authoritative. Ordinary
// message text, test-id containers, and other leaf content are never
diff --git a/src/firefox/src/agent/agent.js b/src/firefox/src/agent/agent.js
index 037402210..ed75da39d 100644
--- a/src/firefox/src/agent/agent.js
+++ b/src/firefox/src/agent/agent.js
@@ -1875,7 +1875,13 @@ export class Agent extends LoopDetector {
messageBodyBaselineCount,
...(siteWorkflow.adapterName === 'twitter'
&& Array.isArray(executionContext.messageRecipientExistingMessageIds)
- ? { preDispatchMessageIds: [...executionContext.messageRecipientExistingMessageIds] }
+ ? {
+ preDispatchMessageIds: [...executionContext.messageRecipientExistingMessageIds],
+ ...(executionContext.messageRecipientTwitterEmptyConversationBaseline === true
+ && executionContext.messageRecipientExistingMessageIds.length === 0
+ ? { preDispatchEmptyConversationBaseline: true }
+ : {}),
+ }
: {}),
...(siteWorkflow.adapterName === 'gmail'
&& executionContext?.messageRecipientGmailComposeFlow === true
@@ -5238,14 +5244,16 @@ export class Agent extends LoopDetector {
const sentIds = messageProbe?.matchingOutgoingMessageIds;
const anchorIndex = Array.isArray(priorIds) && priorIds.length > 0 && Array.isArray(currentIds)
? currentIds.indexOf(priorIds[priorIds.length - 1]) : -1;
+ const settledEmptyBaseline = binding.preDispatchEmptyConversationBaseline === true
+ && Array.isArray(priorIds) && priorIds.length === 0;
+ const baselineStillValid = Array.isArray(priorIds) && Array.isArray(currentIds)
+ && ((priorIds.length > 0 && anchorIndex >= 0)
+ || (settledEmptyBaseline && currentIds.length === 1));
exactOutgoingBodyObserved = !!this._workflowMessageBody(binding.messageBody)
&& Array.isArray(priorIds) && Array.isArray(currentIds) && Array.isArray(sentIds)
- // The content-side guard records only a settled X log with a
- // concrete tail. Retain that invariant here as well so a malformed
- // or older binding cannot turn a late-loaded historic row into
- // evidence for this dispatch.
- && priorIds.length > 0 && anchorIndex >= 0
- && sentIds.some(id => !priorIds.includes(id) && currentIds.indexOf(id) > anchorIndex);
+ && baselineStillValid
+ && sentIds.some(id => !priorIds.includes(id)
+ && currentIds.indexOf(id) > (settledEmptyBaseline ? -1 : anchorIndex));
sentStatusObserved = exactOutgoingBodyObserved
&& recipientObserved
&& this._normalizeUrl(pageUrl) === this._normalizeUrl(submit?.originatingUrl || '');
@@ -21033,6 +21041,9 @@ Rules: no prose intro, no conclusion, no "this screenshot shows...", no layout d
executionContext.messageRecipientBodyBaselineCount = messageBodyBaselineCount;
if (policy.adapterName === 'twitter' && Array.isArray(probe.existingMessageIds)) {
executionContext.messageRecipientExistingMessageIds = [...probe.existingMessageIds];
+ if (probe.twitterEmptyConversationBaseline === true) {
+ executionContext.messageRecipientTwitterEmptyConversationBaseline = true;
+ }
}
if (probe.composerSubjectAvailable === true) {
executionContext.messageRecipientSubject = this._workflowMetadataValue(probe.composerSubject);
diff --git a/src/firefox/src/content/content.js b/src/firefox/src/content/content.js
index 7809d2a47..e8c01829c 100644
--- a/src/firefox/src/content/content.js
+++ b/src/firefox/src/content/content.js
@@ -667,6 +667,9 @@
function _hasVisibleBox(el, minWidth = 1, minHeight = 1) {
if (!el || typeof el.getBoundingClientRect !== 'function') return false;
try {
+ for (let ancestor = el; ancestor; ancestor = ancestor.parentElement) {
+ if (ancestor.getAttribute?.('aria-hidden') === 'true') return false;
+ }
const r = el.getBoundingClientRect();
if (r.width < minWidth || r.height < minHeight) return false;
const s = getComputedStyle(el);
@@ -3725,6 +3728,30 @@
}
const _messageRecipientDispatchBindings = new Map();
+ const _twitterEmptyLogObservations = new WeakMap();
+
+ function _settledEmptyTwitterLog(log) {
+ if (!log?.isConnected) return false;
+ let loading = false;
+ try {
+ loading = log.getAttribute('aria-busy') === 'true'
+ || !!log.querySelector('[aria-busy="true"],[role="progressbar"]');
+ } catch {}
+ if (loading) {
+ _twitterEmptyLogObservations.delete(log);
+ return false;
+ }
+ const now = Date.now();
+ const prior = _twitterEmptyLogObservations.get(log);
+ const observation = prior
+ ? { firstSeenAt: prior.firstSeenAt, count: prior.count + 1 }
+ : { firstSeenAt: now, count: 1 };
+ _twitterEmptyLogObservations.set(log, observation);
+ // A first-message conversation has no historic tail to pin. Require the
+ // same empty log to survive two non-loading reads before treating that
+ // exceptional baseline as settled.
+ return observation.count >= 2 && now - observation.firstSeenAt >= 300;
+ }
function _messageRecipientIdentityKey(values = []) {
return JSON.stringify(Array.from(new Set((Array.isArray(values) ? values : [])
@@ -3779,6 +3806,7 @@
messageBody: String(dispatch.messageBody || ''),
messageBodyBaselineCount: Number(dispatch.messageBodyBaselineCount || 0),
...(Array.isArray(dispatch.existingMessageIds) ? { existingMessageIds: [...dispatch.existingMessageIds] } : {}),
+ twitterEmptyConversationBaseline: dispatch.twitterEmptyConversationBaseline === true,
gmailComposeFlow: dispatch.gmailComposeFlow === true,
composerSubject: String(dispatch.composerSubject || ''),
composerSubjectAvailable: dispatch.composerSubjectAvailable === true,
@@ -3849,6 +3877,8 @@
|| live?.messageBody !== expected.messageBody
|| (expected.existingMessageIds
&& JSON.stringify(live?.existingMessageIds) !== JSON.stringify(expected.existingMessageIds))
+ || (expected.twitterEmptyConversationBaseline === true
+ && live?.twitterEmptyConversationBaseline !== true)
|| (expected.gmailComposeFlow === true && live?.gmailComposeFlow !== true)
|| (expected.composerSubjectAvailable === true
&& (live?.composerSubjectAvailable !== true || live?.composerSubject !== expected.composerSubject))) {
@@ -4115,6 +4145,9 @@
const visible = (el) => {
if (!el || el.nodeType !== 1 || !el.isConnected) return false;
try {
+ for (let ancestor = el; ancestor; ancestor = ancestor.parentElement) {
+ if (ancestor.getAttribute?.('aria-hidden') === 'true') return false;
+ }
const style = getComputedStyle(el);
const rect = el.getBoundingClientRect();
return style.display !== 'none'
@@ -4220,12 +4253,15 @@
.filter(row => /^message-(?!text-)[a-zA-Z0-9_-]{1,128}$/.test(row.getAttribute('data-testid') || ''))
: [];
const twitterMessageIds = twitterRows.map(row => row.getAttribute('data-testid'));
- // An empty mounted log can mean X is still loading older history. Do
- // not treat it as a proven first-message conversation: without a prior
- // tail, an old matching row that appears after dispatch is
- // indistinguishable from the message this run attempted to send.
- const twitterBaselineComplete = twitterLogs.length === 1 && twitterRows.length > 0
- && twitterRows.length <= 2000 && new Set(twitterMessageIds).size === twitterMessageIds.length;
+ const twitterEmptyConversationBaseline = twitterLogs.length === 1 && twitterRows.length === 0
+ && _settledEmptyTwitterLog(twitterLogs[0]);
+ if (twitterRows.length > 0 && twitterLogs[0]) _twitterEmptyLogObservations.delete(twitterLogs[0]);
+ // An empty mounted log can mean X is still loading older history. A
+ // first-message conversation is eligible only after the same non-loading
+ // empty log has settled across repeated observations.
+ const twitterBaselineComplete = twitterLogs.length === 1 && twitterRows.length <= 2000
+ && new Set(twitterMessageIds).size === twitterMessageIds.length
+ && (twitterRows.length > 0 || twitterEmptyConversationBaseline);
const matchingTwitterMessageIds = expectedBody => {
const expected = normalizedMessageBody(expectedBody);
if (!expected || !twitterBaselineComplete) return [];
@@ -5012,7 +5048,10 @@
supportsRecipientSets: params.supportsRecipientSets,
messageBody,
messageBodyBaselineCount,
- ...(twitterConversation ? { existingMessageIds: twitterMessageIds } : {}),
+ ...(twitterConversation ? {
+ existingMessageIds: twitterMessageIds,
+ ...(twitterEmptyConversationBaseline ? { twitterEmptyConversationBaseline: true } : {}),
+ } : {}),
gmailComposeFlow,
composerSubject,
composerSubjectAvailable,
@@ -5039,6 +5078,7 @@
...(twitterConversation && twitterBaselineComplete ? {
existingMessageIds: twitterMessageIds,
matchingOutgoingMessageIds: matchingTwitterMessageIds(params.expectedMessageBody),
+ ...(twitterEmptyConversationBaseline ? { twitterEmptyConversationBaseline: true } : {}),
} : {}),
// Only recipient-specific header evidence is authoritative. Ordinary
// message text, test-id containers, and other leaf content are never
diff --git a/test/run.js b/test/run.js
index 2479a1bf6..fc7244b6b 100644
--- a/test/run.js
+++ b/test/run.js
@@ -7017,6 +7017,13 @@ test('direct-message recipient probe accepts only a unique active-thread header
left: 910, right: 980, top: 700, bottom: 750, width: 70, height: 50,
}, { tagName: 'BUTTON', role: 'button' });
sendButton.closest = () => sendButton;
+ const hiddenSendWrapper = element('', {
+ left: 900, right: 990, top: 680, bottom: 760, width: 90, height: 80,
+ }, { attributes: { 'aria-hidden': 'true' } });
+ const hiddenSendButton = element('Send', {
+ left: 910, right: 980, top: 700, bottom: 750, width: 70, height: 50,
+ }, { tagName: 'BUTTON', role: 'button', parentElement: hiddenSendWrapper });
+ hiddenSendButton.closest = () => hiddenSendButton;
const customSendControl = element('Quick send', {
left: 910, right: 990, top: 755, bottom: 795, width: 80, height: 40,
}, { dataAction: true });
@@ -7063,7 +7070,7 @@ test('direct-message recipient probe accepts only a unique active-thread header
querySelector: (selector) => selector === '#conversation-row' ? conversationRow : null,
querySelectorAll: (selector) => {
if (selector === 'textarea,[contenteditable="true"],[role="textbox"]') return [composer, searchBox, alternateComposer];
- if (selector.startsWith('a, button,')) return [sendButton, customSendControl, distantControl, conversationRowMenu];
+ if (selector.startsWith('a, button,')) return [sendButton, hiddenSendButton, customSendControl, distantControl, conversationRowMenu];
if (selector.startsWith('[aria-selected')) return [];
if (selector.startsWith('h1,')) return [searchedName, activeHeader, conversationMessageHeading];
if (selector.startsWith('[data-testid')) return [];
@@ -7358,7 +7365,8 @@ test('direct-message recipient probe accepts only a unique active-thread header
assert.equal(alternateComposerEnterResult.conclusive, false);
assert.equal(alternateComposerSubmitResult.messageSend, null, `${prefix}: alternate composer submit bypassed recipient verification`);
assert.equal(alternateComposerSubmitResult.conclusive, false);
- assert.equal(unfocusedClickResult.messageSend, true, `${prefix}: unfocused composer made send click fail open`);
+ assert.equal(unfocusedClickResult.messageSend, true,
+ `${prefix}: aria-hidden duplicate Send control made the visible target ambiguous`);
assert.equal(unfocusedClickResult.conclusive, true);
assert.equal(emptyComposerCustomSendResult.messageSend, true, `${prefix}: custom attachment/send control failed open`);
assert.equal(emptyComposerCustomSendResult.conclusive, true);
@@ -94005,6 +94013,46 @@ test('publication workflows classify and bind requested payload fields', async (
});
assert.equal(lateHistoricRow, null,
`${AgentClass.name}: a late-loaded historic X row satisfied an empty dispatch baseline`);
+ const settledEmptyBaselineBinding = agent._workflowSubmitBindingForAttempt(xTabId, xUrl, {
+ messageRecipientGuardRequired: true,
+ messageRecipientDispatchBinding: { token: 'x-settled-empty-baseline' },
+ messageRecipientBody: 'Hello there',
+ messageRecipientBodyBaselineCount: 0,
+ messageRecipientExistingMessageIds: [],
+ messageRecipientTwitterEmptyConversationBaseline: true,
+ });
+ const firstXMessage = agent._workflowTerminalEvidenceFromDone(xTabId, { liveRegionMessages: [] }, xUrl, {
+ submit: { dispatched: true, observedAfterSubmit: true, originatingUrl: xUrl, workflowBinding: settledEmptyBaselineBinding },
+ verifiedFinalSubmit: false,
+ relevantForms: 1,
+ }, {
+ success: true,
+ conclusive: true,
+ composerEmpty: true,
+ strongRecipientCandidates: [{ identity: '@altryne', role: 'to' }],
+ existingMessageIds: ['message-first'],
+ matchingOutgoingMessageIds: ['message-first'],
+ matchingOutgoingMessageCount: 1,
+ });
+ assert.equal(firstXMessage?.verificationKind, 'message_sent',
+ `${AgentClass.name}: a settled empty X conversation could not complete its first DM`);
+ const historyAfterSettledEmptyBaseline = agent._workflowTerminalEvidenceFromDone(
+ xTabId, { liveRegionMessages: [] }, xUrl, {
+ submit: { dispatched: true, observedAfterSubmit: true, originatingUrl: xUrl, workflowBinding: settledEmptyBaselineBinding },
+ verifiedFinalSubmit: false,
+ relevantForms: 1,
+ }, {
+ success: true,
+ conclusive: true,
+ composerEmpty: true,
+ strongRecipientCandidates: [{ identity: '@altryne', role: 'to' }],
+ existingMessageIds: ['message-late-history', 'message-first'],
+ matchingOutgoingMessageIds: ['message-first'],
+ matchingOutgoingMessageCount: 1,
+ },
+ );
+ assert.equal(historyAfterSettledEmptyBaseline, null,
+ `${AgentClass.name}: late history satisfied a settled empty X dispatch baseline`);
}
});