Skip to content

πŸ™Œ OpenHands: AI-Driven Development

chore(deps): bump posthog-js from 1.380.0 to 1.415.0 (#16651)

dependabot[bot]9daea75f38e8
diff --git a/package-lock.json b/package-lock.json
index 678ce4de30..12bd8aaacf 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -35,7 +35,7 @@
"isbot": "5.2.1",
"lucide-react": "1.25.0",
"monaco-editor": "0.56.0",
- "posthog-js": "1.380.0",
+ "posthog-js": "1.415.0",
"react": "19.3.0",
"react-dom": "19.3.0",
"react-hot-toast": "2.6.0",
@@ -4650,19 +4650,29 @@
"integrity": "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==",
"license": "MIT"
},
+ "node_modules/@posthog/browser-common": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/@posthog/browser-common/-/browser-common-0.4.0.tgz",
+ "integrity": "sha512-W9DCGVks15docUMPvJ2nd8NS16Gn74bsGWuaeg31beEKFSjdW8wvnQ1ETY6WSql5pYxZb3GdJmEUZVVstKSrBQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@posthog/core": "^1.46.8",
+ "@posthog/types": "^1.402.0"
+ }
+ },
"node_modules/@posthog/core": {
- "version": "1.30.7",
- "resolved": "https://registry.npmjs.org/@posthog/core/-/core-1.30.7.tgz",
- "integrity": "sha512-dkByo0jBRTLoTcR8nVnK9fdOXAyQi9D4J7eSLVIHtF22U9KGC7WTOd0mMn7vw+lxcIaDdhO3Big4yfbQtP2hUg==",
+ "version": "1.55.2",
+ "resolved": "https://registry.npmjs.org/@posthog/core/-/core-1.55.2.tgz",
+ "integrity": "sha512-2mYxGbDmTLUs096VbcZqSWo0lrI48/BrX65r54NynxxFq409BOx9w73HxOAtOKZ1vblkdV6/GxQTe7KDcIQidg==",
"license": "MIT",
"dependencies": {
- "@posthog/types": "1.380.0"
+ "@posthog/types": "^1.412.4"
}
},
"node_modules/@posthog/types": {
- "version": "1.380.0",
- "resolved": "https://registry.npmjs.org/@posthog/types/-/types-1.380.0.tgz",
- "integrity": "sha512-sA4gCL4vD7vwH+lj3MQIxjNhQcN245wFBjeDN2IyA2e1k001NkeRXPJ9N5PbGDz5mXXPc+dmKcnU+TDEpsOpGg==",
+ "version": "1.413.0",
+ "resolved": "https://registry.npmjs.org/@posthog/types/-/types-1.413.0.tgz",
+ "integrity": "sha512-tYAVzNojWckuG/wxBB0fwE70sFruQQq4xbhkci7eH2ARU3mMfUTkvpN1HwBMpm0AtbxidLiH0IFvagmdJ8opPw==",
"license": "MIT"
},
"node_modules/@react-aria/breadcrumbs": {
@@ -17688,19 +17698,21 @@
}
},
"node_modules/posthog-js": {
- "version": "1.380.0",
- "resolved": "https://registry.npmjs.org/posthog-js/-/posthog-js-1.380.0.tgz",
- "integrity": "sha512-nXgixEZH4GyJkd0iS7AWhv8q3yjatKmnaKZCVhHeCsIcE+rM22TNFBVuynd5EwUTxFTJ1JMktZKwV0ikAaCPjw==",
- "license": "SEE LICENSE IN LICENSE",
- "dependencies": {
- "@posthog/core": "1.30.7",
- "@posthog/types": "1.380.0",
- "core-js": "^3.38.1",
- "dompurify": "^3.3.2",
+ "version": "1.415.0",
+ "resolved": "https://registry.npmjs.org/posthog-js/-/posthog-js-1.415.0.tgz",
+ "integrity": "sha512-yzicgc7vaAafXiara3WZ7o0BIzyPNRGzVgO9WRz2tvDD7r61eijXMSrfOPp4wkH0XvElzb5xRxJL2d33Dti8MQ==",
+ "license": "(Apache-2.0 AND MIT)",
+ "dependencies": {
+ "@posthog/browser-common": "^0.4.0",
+ "@posthog/core": "^1.47.0",
+ "@posthog/types": "^1.402.2",
+ "core-js": "^3.49.0",
+ "dompurify": "^3.4.12",
"fflate": "^0.4.8",
- "preact": "^10.28.2",
+ "preact": "^10.29.3",
"query-selector-shadow-dom": "^1.0.1",
- "web-vitals": "^5.1.0"
+ "web-vitals": "^5.3.0",
+ "web-vitals-soft-navs": "npm:[email protected]"
}
},
"node_modules/postject": {
@@ -17734,13 +17746,21 @@
}
},
"node_modules/preact": {
- "version": "10.29.2",
- "resolved": "https://registry.npmjs.org/preact/-/preact-10.29.2.tgz",
- "integrity": "sha512-7tNmwg/7mzzAoB/8kSg6Hl37JraAZw3Z3A0JSY7VXlZwo82Xn0G7wKbNNs2qoF4ZEEsQGTwDAroNdqKs1ofJxQ==",
+ "version": "10.29.8",
+ "resolved": "https://registry.npmjs.org/preact/-/preact-10.29.8.tgz",
+ "integrity": "sha512-ej2aVZ+vZ8WO7tvlQWRM9N63A0KzF9q4mWJfDUHgYaIofWY9hu74QdnQrjoPMmZi2/nZ5gN0bJCQF49xQqx09Q==",
"license": "MIT",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/preact"
+ },
+ "peerDependencies": {
+ "preact-render-to-string": ">=5"
+ },
+ "peerDependenciesMeta": {
+ "preact-render-to-string": {
+ "optional": true
+ }
}
},
"node_modules/prelude-ls": {
@@ -21271,6 +21291,13 @@
"integrity": "sha512-q6LWsLatGYZp5VGBIOvbTj6JBV2nOmC8KvWztXBmwJcfFAzhwKwbOxhUH306XY3CcaZDUlSmSuNPBsCn0bFu+g==",
"license": "Apache-2.0"
},
+ "node_modules/web-vitals-soft-navs": {
+ "name": "web-vitals",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-6.0.0.tgz",
+ "integrity": "sha512-Guaibvy/+uNtL6Bsu4jmMJGzuSl91oeRH5iO9pPRbYftnFUr3yqT1TUNX/OE4o9HexuEMU3Kb/Wg7iKhlffZUA==",
+ "license": "Apache-2.0"
+ },
"node_modules/webcrypto-core": {
"version": "1.9.2",
"resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.9.2.tgz",
diff --git a/package.json b/package.json
index cf7ad452ff..fb1ec24486 100644
--- a/package.json
+++ b/package.json
@@ -45,7 +45,7 @@
"isbot": "5.2.1",
"lucide-react": "1.25.0",
"monaco-editor": "0.56.0",
- "posthog-js": "1.380.0",
+ "posthog-js": "1.415.0",
"react": "19.3.0",
"react-dom": "19.3.0",
"react-hot-toast": "2.6.0",
diff --git a/tests/e2e/mock-llm/automations/mock-llm-automation.spec.ts b/tests/e2e/mock-llm/automations/mock-llm-automation.spec.ts
index 004787cd8a..fbcd4506d8 100644
--- a/tests/e2e/mock-llm/automations/mock-llm-automation.spec.ts
+++ b/tests/e2e/mock-llm/automations/mock-llm-automation.spec.ts
@@ -211,6 +211,78 @@ async function waitForRunStatus(
);
}
+/**
+ * Find a terminally FAILED run for the automation. The agent-server can
+ * intermittently reject the sandbox's completion message (transient 500 on
+ * POST /events), which flips the run straight to FAILED β€” so report it
+ * instead of endlessly polling for COMPLETED.
+ */
+async function findFailedRun(
+ request: import("@playwright/test").APIRequestContext,
+ automationId: string,
+) {
+ const data = await listAutomationRuns(request, automationId);
+ const runs = data.runs ?? data.items ?? [];
+ return runs.find((r: { status: string }) => r.status === "FAILED");
+}
+
+/** Dispatch a run for the automation via the real automation backend. */
+async function dispatchAutomation(
+ request: import("@playwright/test").APIRequestContext,
+ automationId: string,
+) {
+ const resp = await request.post(
+ `${AUTOMATION_API_BASE}/${encodeURIComponent(automationId)}/dispatch`,
+ {
+ headers: {
+ "X-Session-API-Key": SESSION_API_KEY,
+ },
+ },
+ );
+ if (!resp.ok()) {
+ throw new Error(
+ `POST automation dispatch returned ${resp.status()} for ${automationId}`,
+ );
+ }
+ return resp;
+}
+
+/**
+ * Poll for COMPLETED, but re-dispatch once when a run terminally FAILED β€”
+ * the completion-message race documented at findFailedRun() is upstream
+ * flakiness, not a lifecycle regression, and one re-dispatch removes it.
+ */
+async function waitForRunCompleted(
+ request: import("@playwright/test").APIRequestContext,
+ automationId: string,
+ timeoutMs = 30_000,
+) {
+ let lastError: Error | null = null;
+ for (let attempt = 0; attempt < 2; attempt++) {
+ try {
+ return await waitForRunStatus(
+ request,
+ automationId,
+ "COMPLETED",
+ timeoutMs,
+ );
+ } catch (error) {
+ lastError = error as Error;
+ try {
+ if (!(await findFailedRun(request, automationId))) break;
+ } catch {
+ // Fixture closed mid-flight (e.g. test-level timeout) β€” surface the
+ // original timeout instead of an apiRequestContext teardown error.
+ break;
+ }
+ await dispatchAutomation(request, automationId);
+ }
+ }
+ throw (
+ lastError ?? new Error(`Automation ${automationId} never reached COMPLETED`)
+ );
+}
+
/**
* Delete an automation (best-effort cleanup).
*/
@@ -242,7 +314,11 @@ async function deleteAutomationsByName(
}
}
-test.describe.configure({ mode: "serial" });
+// Retry the serial lifecycle once β€” the automation backend, agent-server,
+// and completion callback each have transient failure modes that a single
+// extra attempt absorbs; deleteAutomationsByName() in step 1 clears any
+// fixed-name leftovers between attempts.
+test.describe.configure({ mode: "serial", retries: 1 });
test.describe("mock-LLM automation lifecycle", () => {
const conversationIds = new Set<string>();
@@ -322,12 +398,19 @@ test.describe("mock-LLM automation lifecycle", () => {
const authHeader = `-H 'X-Session-API-Key: ${SESSION_API_KEY}'`;
const createCmd = [
+ // Remove any leftover result file first: on a retry the file would
+ // otherwise still hold a previous attempt's response and the dispatch
+ // command would silently reuse its (stale) automation id.
+ `rm -f /tmp/auto_result.json`,
// --retry: the automation backend can still be settling right after
// startup in the uvx/bin dev paths; transient connect/reset/5xx
// failures should not abort the create (observed flake β†’ assert then
// sees 0 automations).
- `curl --fail-with-body -sS -X POST '${AUTOMATION_API_BASE}/preset/prompt'`,
- `--retry 3 --retry-connrefused --retry-delay 1`,
+ `&& curl --fail-with-body -sS -X POST '${AUTOMATION_API_BASE}/preset/prompt'`,
+ // --retry-all-errors: retry any transient failure (conn refused or
+ // HTTP 5xx), not just connection errors β€” a failed create leaves the
+ // name-based list poll below with nothing to find.
+ `--retry 4 --retry-all-errors --retry-delay 1`,
`-H 'Content-Type: application/json'`,
authHeader,
`-d '${JSON.stringify({
@@ -518,15 +601,11 @@ test.describe("mock-LLM automation lifecycle", () => {
const automation = await getAutomation(request, createdAutomationId!);
automationIds.add(automation.id);
- // Wait for the run to reach COMPLETED. The trajectory scripts the required
- // `finish` tool turn (plus padding) for the automation run's spawned
- // conversation so it can finish and fire the completion callback.
- const run = await waitForRunStatus(
- request,
- automation.id,
- "COMPLETED",
- 90_000,
- );
+ // Wait for the run to reach COMPLETED. The trajectory includes extra
+ // responses (indices 4-6) for the automation run's spawned conversation
+ // so it can finish and fire the completion callback. waitForRunCompleted
+ // re-dispatches once if the callback race flips the run to FAILED.
+ const run = await waitForRunCompleted(request, automation.id, 90_000);
expect(run.conversation_id).toBeTruthy();
// Store the conversation ID for the click-through verification in step 3
runConversationId = run.conversation_id;