Skip to content

sync: harness 660827d#24

Merged
Alezander9 merged 1 commit intomainfrom
sync/harness-660827d
Apr 30, 2026
Merged

sync: harness 660827d#24
Alezander9 merged 1 commit intomainfrom
sync/harness-660827d

Conversation

@Alezander9
Copy link
Copy Markdown
Member

Summary

Brings browser-use/browser-harness up to 660827d. 11 upstream commits since 997ee45.

Files updated

  • src/browser_harness/daemon.py — resolve WS via /json/version (#260); report cdp_disconnected on stale CDP probe (#254); cleanup remote browser when daemon startup fails (#251).
  • src/browser_harness/admin.py — companion changes for the daemon fixes above.
  • tests/unit/test_admin.py — 7 new tests (now 19 total in this file).
  • agent-workspace/domain-skills/xiaohongshu/scraping.md — new (#246).
  • domain-skills/shopify-admin/README.md, embedded-apps.md, knowledge-base.md, polaris-inputs.md — new (#247). Note: PR #247 landed at the top-level domain-skills/ path rather than under agent-workspace/domain-skills/ as the post-#229 src-layout would suggest. Vendored verbatim to match upstream layout — embed-harness.ts glob picks them up automatically.
  • README.md — operator framing rebase (#255).
  • install.md, interaction-skills/profile-sync.md — heredoc → -c flag in examples (#256).

Divergences

  • No change. Still just .gitignore adding .venv/.

Verification

  • script/check-harness-diff.sh post-copy → only known .gitignore divergence remains.
  • Smoke test: from browser_harness import run, helpers, daemon, admin, _ipc ok; browser-harness --version0.1.0.
  • pytest tests/unit/test_admin.py → 19 passed.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 issues found across 12 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/bcode-browser/harness/domain-skills/shopify-admin/knowledge-base.md">

<violation number="1" location="packages/bcode-browser/harness/domain-skills/shopify-admin/knowledge-base.md:88">
P2: The Query log URL uses an inconsistent path (`/admin/apps/...`) that does not match the documented Shopify admin route pattern and can lead to navigation failures.</violation>
</file>

<file name="packages/bcode-browser/harness/domain-skills/shopify-admin/polaris-inputs.md">

<violation number="1" location="packages/bcode-browser/harness/domain-skills/shopify-admin/polaris-inputs.md:22">
P2: The example uses `target_id=tid` without defining `tid`, so the snippet fails with a `NameError` when run.</violation>

<violation number="2" location="packages/bcode-browser/harness/domain-skills/shopify-admin/polaris-inputs.md:65">
P2: Guard against the form never becoming ready before typing; currently the example continues even when readiness checks fail.</violation>
</file>

<file name="packages/bcode-browser/harness/domain-skills/shopify-admin/README.md">

<violation number="1" location="packages/bcode-browser/harness/domain-skills/shopify-admin/README.md:17">
P2: The recommendation is too broad: Storefront API is fine for storefront-facing product reads, but not general inventory reads. Inventory workflows typically require Admin API data (for example, per-location inventory levels).</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.


## Query log

`/admin/apps/shopify-knowledge-base/app/queries` (or "Query log" in app sidebar) shows what shoppers actually asked AI agents about your brand. Read weekly. New patterns become new FAQ entries.
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The Query log URL uses an inconsistent path (/admin/apps/...) that does not match the documented Shopify admin route pattern and can lead to navigation failures.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/bcode-browser/harness/domain-skills/shopify-admin/knowledge-base.md, line 88:

<comment>The Query log URL uses an inconsistent path (`/admin/apps/...`) that does not match the documented Shopify admin route pattern and can lead to navigation failures.</comment>

<file context>
@@ -0,0 +1,109 @@
+
+## Query log
+
+`/admin/apps/shopify-knowledge-base/app/queries` (or "Query log" in app sidebar) shows what shoppers actually asked AI agents about your brand. Read weekly. New patterns become new FAQ entries.
+
+## Verifying entries surface in AI
</file context>
Suggested change
`/admin/apps/shopify-knowledge-base/app/queries` (or "Query log" in app sidebar) shows what shoppers actually asked AI agents about your brand. Read weekly. New patterns become new FAQ entries.
`/store/<store-handle>/apps/shopify-knowledge-base/app/queries` (or "Query log" in app sidebar) shows what shoppers actually asked AI agents about your brand. Read weekly. New patterns become new FAQ entries.
Fix with Cubic

CDP-native keystrokes via `Input.insertText`:

```python
from helpers import js, type_text
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The example uses target_id=tid without defining tid, so the snippet fails with a NameError when run.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/bcode-browser/harness/domain-skills/shopify-admin/polaris-inputs.md, line 22:

<comment>The example uses `target_id=tid` without defining `tid`, so the snippet fails with a `NameError` when run.</comment>

<file context>
@@ -0,0 +1,137 @@
+CDP-native keystrokes via `Input.insertText`:
+
+```python
+from helpers import js, type_text
+
+# 1. Focus the input via JS — this works fine
</file context>
Fix with Cubic

time.sleep(0.3)

# 2. Type question (input has focus from step 1)
type_text(question)
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Guard against the form never becoming ready before typing; currently the example continues even when readiness checks fail.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/bcode-browser/harness/domain-skills/shopify-admin/polaris-inputs.md, line 65:

<comment>Guard against the form never becoming ready before typing; currently the example continues even when readiness checks fail.</comment>

<file context>
@@ -0,0 +1,137 @@
+        time.sleep(0.3)
+
+    # 2. Type question (input has focus from step 1)
+    type_text(question)
+    time.sleep(0.2)
+
</file context>
Fix with Cubic


## When to skip

- If the operation is read-only product / inventory data → use the **Storefront API** (HTTP) instead, much faster
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The recommendation is too broad: Storefront API is fine for storefront-facing product reads, but not general inventory reads. Inventory workflows typically require Admin API data (for example, per-location inventory levels).

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/bcode-browser/harness/domain-skills/shopify-admin/README.md, line 17:

<comment>The recommendation is too broad: Storefront API is fine for storefront-facing product reads, but not general inventory reads. Inventory workflows typically require Admin API data (for example, per-location inventory levels).</comment>

<file context>
@@ -0,0 +1,36 @@
+
+## When to skip
+
+- If the operation is read-only product / inventory data → use the **Storefront API** (HTTP) instead, much faster
+- If the store has a custom admin app with API token provisioned → use the **Admin API** (GraphQL or REST) instead, no UI scraping
+- If you're editing theme code → use the **Shopify CLI** (`shopify theme push`) — don't touch the theme editor UI
</file context>
Fix with Cubic

@Alezander9 Alezander9 merged commit 46afdba into main Apr 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant