Skip to content

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

Treat an edited approved plan as possibly naming several deliverables

Claudeb1daf1c9e0ff
diff --git a/src/chrome/src/agent/agent.js b/src/chrome/src/agent/agent.js
index 7a4f6a215..cb29fcd0f 100644
--- a/src/chrome/src/agent/agent.js
+++ b/src/chrome/src/agent/agent.js
@@ -28459,10 +28459,12 @@ Rules: no prose intro, no conclusion, no "this screenshot shows...", no layout d
requiresStateChange: approvedRequiresStateChange,
requiresSubmission: approvedRequiresSubmission,
readScope: approvedReadScope,
- // The reviewed text is not parsed for deliverables, so an edit drops the
- // planner's list instead of enforcing what the person may have removed.
+ // The reviewed text is not parsed for deliverables: an edit drops the
+ // planner's list (the person may have removed some), and since the edit
+ // may equally have added some, the plan is treated as possibly naming
+ // several, which keeps one verified submission from finishing the task.
deliverables: approvedPlanEdited ? [] : this._plannerCompletionGateFields(plan).deliverables,
- multipleDeliverables: approvedPlanEdited ? false : this._plannerCompletionGateFields(plan).multipleDeliverables,
+ multipleDeliverables: approvedPlanEdited ? true : this._plannerCompletionGateFields(plan).multipleDeliverables,
siteWorkflowUrl: tabUrl,
messaging: approvedPlanEdited ? null : plan.messaging,
requestedMessaging: approvedPlanEdited ? null : plan.requested_messaging,
diff --git a/src/firefox/src/agent/agent.js b/src/firefox/src/agent/agent.js
index a6b77b859..b7cafdd60 100644
--- a/src/firefox/src/agent/agent.js
+++ b/src/firefox/src/agent/agent.js
@@ -25490,10 +25490,12 @@ Rules: no prose intro, no conclusion, no "this screenshot shows...", no layout d
requiresStateChange: approvedRequiresStateChange,
requiresSubmission: approvedRequiresSubmission,
readScope: approvedReadScope,
- // The reviewed text is not parsed for deliverables, so an edit drops the
- // planner's list instead of enforcing what the person may have removed.
+ // The reviewed text is not parsed for deliverables: an edit drops the
+ // planner's list (the person may have removed some), and since the edit
+ // may equally have added some, the plan is treated as possibly naming
+ // several, which keeps one verified submission from finishing the task.
deliverables: approvedPlanEdited ? [] : this._plannerCompletionGateFields(plan).deliverables,
- multipleDeliverables: approvedPlanEdited ? false : this._plannerCompletionGateFields(plan).multipleDeliverables,
+ multipleDeliverables: approvedPlanEdited ? true : this._plannerCompletionGateFields(plan).multipleDeliverables,
siteWorkflowUrl: tabUrl,
messaging: approvedPlanEdited ? null : plan.messaging,
requestedMessaging: approvedPlanEdited ? null : plan.requested_messaging,
diff --git a/test/planner-repair-authority.mjs b/test/planner-repair-authority.mjs
index 7314824b2..d1b0312ea 100644
--- a/test/planner-repair-authority.mjs
+++ b/test/planner-repair-authority.mjs
@@ -831,7 +831,7 @@ for (const browser of ['chrome', 'firefox']) {
}
});
- test(`${browser}: an edited approved plan no longer carries the planner's deliverables`, async () => {
+ test(`${browser}: an edited approved plan drops the planner's deliverable list but stays possibly several`, async () => {
for (const edit of [false, true]) {
const provider = { promptTier: 'full', model: 'neutral-planner-display-test', name: 'neutral-planner-display-test' };
const agent = new Agent({ getActive: () => provider, getVisionProvider: async () => null });
@@ -847,7 +847,7 @@ for (const browser of ['chrome', 'firefox']) {
() => {}, null, null, '', { tabUrl: 'https://example.test/owned', tabTitle: 'Owned neutral page' },
'try', 'act', { locale: 'en' });
assert.equal(gate.proceed, true, JSON.stringify(gate));
- assert.equal(gate.multipleDeliverables, !edit, `${browser}: edited=${edit}`);
+ assert.equal(gate.multipleDeliverables, true, `${browser}: edited=${edit}: an edit may have kept or added deliverables`);
assert.deepEqual(gate.deliverables, edit ? [] : ['The first result', 'The second result']);
}
});