Skip to content

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

fix(social-publish): past-tense verbs never bind destinations

Barack Sokulluf84f3b8032eb
diff --git a/src/chrome/src/agent/agent.js b/src/chrome/src/agent/agent.js
index ed65c701f..ff1b5d377 100644
--- a/src/chrome/src/agent/agent.js
+++ b/src/chrome/src/agent/agent.js
@@ -18152,6 +18152,9 @@ Rules: no prose intro, no conclusion, no "this screenshot shows...", no layout d
if (SOCIAL_READ_VERBS.test(beforeVerbClause)) continue;
if (socialNegationGovernsPublish(beforeVerbClause)) continue;
const verbWord = verb[0] || '';
+ // A past-tense verb describes already-published content ("the post
+ // published on X"), it never issues a new publication command.
+ if (/ed$/iu.test(verbWord)) continue;
const unscopedAfterVerbText = targetText.slice(verbIndex + verbWord.length);
const nextPublish = unscopedAfterVerbText.match(SOCIAL_PUBLISH_VERBS);
const afterVerbText = nextPublish
diff --git a/src/firefox/src/agent/agent.js b/src/firefox/src/agent/agent.js
index fb15392cd..0f0e502b5 100644
--- a/src/firefox/src/agent/agent.js
+++ b/src/firefox/src/agent/agent.js
@@ -15951,6 +15951,9 @@ Rules: no prose intro, no conclusion, no "this screenshot shows...", no layout d
if (SOCIAL_READ_VERBS.test(beforeVerbClause)) continue;
if (socialNegationGovernsPublish(beforeVerbClause)) continue;
const verbWord = verb[0] || '';
+ // A past-tense verb describes already-published content ("the post
+ // published on X"), it never issues a new publication command.
+ if (/ed$/iu.test(verbWord)) continue;
const unscopedAfterVerbText = targetText.slice(verbIndex + verbWord.length);
const nextPublish = unscopedAfterVerbText.match(SOCIAL_PUBLISH_VERBS);
const afterVerbText = nextPublish
diff --git a/test/run.js b/test/run.js
index bf1ddfe45..4c752c55a 100644
--- a/test/run.js
+++ b/test/run.js
@@ -91084,6 +91084,10 @@ test('social publication workflow follows the live X or Bluesky destination and
'French content link to form should not compete with Bluesky publish destination'],
['Veröffentliche einen Link zur Umfrage auf X', ['twitter'],
'German content link to survey should not compete with X publish destination'],
+ ['Use the post published on X to fill the form.', [],
+ 'past-tense mention of an existing post was bound as a publish destination'],
+ ['A post shared on Bluesky should be entered into the form.', [],
+ 'past-tense mention of an existing post was bound as a publish destination'],
]) {
assert.deepEqual(
[...agent._trustedSocialPublishTargetAdapters({ taskText })].sort(),