π€― LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
π fix(agent-testing): improve target intake and reference IDs (#17227)
AmAzing-27d93c1b3d84
diff --git a/.agents/skills/agent-testing/SKILL.md b/.agents/skills/agent-testing/SKILL.mdindex bd2fff43b1e..7ec916958a1 100644--- a/.agents/skills/agent-testing/SKILL.md+++ b/.agents/skills/agent-testing/SKILL.md@@ -31,10 +31,33 @@ Finish unless the user explicitly asks to keep the environment running.Confirm what will run and whether the environment is ready before changing orstarting anything.-### Step 0 β Read the two living logs (mandatory, before every run)--Before doing anything else, read both of these in full and hold them in mind for-this run:+Skill-internal setup β loading this skill, reading the living logs and+reference files β is silent preparation: never narrate it to the user ("I'll+load the mandatory living logs firstβ¦" is noise). The first user-visible+message of a session is about the user's test β the target confirmation+(Step 0) or the Phase 1 approval gate β in one message, not a setup+announcement followed by the same question again.++### Step 0 β Ground the target, then read the two living logs (mandatory)++**A test target must exist before anything else happens.** When the invocation+carries none (bare skill invocation, no pending ask in the conversation),+ground it first β do NOT read the living logs or touch the environment yet:++1. Take the target from the user's words in this conversation when they+ exist β the task lives in their words, not in git (common-mistakes Case 3).+2. Otherwise, infer the most likely candidate from observable context (current+ branch, recent commits, working-tree changes) and confirm it with one+ structured question β the candidate as the recommended option, clearly+ labeled as a guess. Never start executing against an unconfirmed guess.+3. Only when nothing is inferable, ask one direct open question. Asking "what+ should I verify" is the one legitimate opening question (common-mistakes+ Case 8) β but asking it open-ended when a candidate was inferable wastes+ the user's turn.++**Once the target is known**, read both of these in full and hold them in mind+for this run. Reading them before a target exists wastes context that may be+compacted away before Execute β they inform execution, not target selection:- [references/common-mistakes.md](./references/common-mistakes.md) β mistakes theuser has called out. Two that keep biting:diff --git a/.agents/skills/agent-testing/references/common-mistakes.md b/.agents/skills/agent-testing/references/common-mistakes.mdindex 68dafb4dd55..7ce4aadddd4 100644--- a/.agents/skills/agent-testing/references/common-mistakes.md+++ b/.agents/skills/agent-testing/references/common-mistakes.md@@ -557,3 +557,30 @@ observed failure mode is not covered, stop the test immediately, revert any expechanges, summarize the exact checks and evidence collected, and ask the user for help beforecontinuing. Do not repair the environment, switch surfaces, or invent a fallback without userdirection.++---++## Case 22 β Bare invocation: narrating skill setup, then asking an open "what should I test?"++**Wrong approach**: invoked with no test target, the agent sent "I'm using the+agent-testing skill; I'll load its mandatory living logs first", read both+living logs in full (\~1.9k lines), then sent a second message β "Agent-testing+is loaded, including both mandatory living logs. What feature, change, PR, or+user flow should I verify?" β an open question that ignored the visible+candidate (the current feature branch and its recent commits).++**Why it's wrong**: the living logs inform execution, not target selection β+reading them before a target exists burns context that may be compacted away+before the run starts. Narrating internal setup ("mandatory living logs") is+compliance-reporting the user never asked for. And an open question pushes work+onto the user that observable context could have pre-filled as a candidate.++**What it breaks**: two user-visible turns whose combined value is one+clarifying question, asked twice; the user must type the target from scratch.++**Correct approach**: ground the target first (SKILL.md Step 0): the user's+words in the conversation > an inferred candidate from branch/commits/working+tree, confirmed via one structured question and labeled as a guess (never+executed on unconfirmed β Case 3) > an open question only as last resort. Read+the living logs once the target is known, and never narrate skill-internal+setup β the first visible message is about the user's test.diff --git a/.agents/skills/agent-testing/references/probe-mock-patterns.md b/.agents/skills/agent-testing/references/probe-mock-patterns.mdindex c9de27bc842..62d684d5211 100644--- a/.agents/skills/agent-testing/references/probe-mock-patterns.md+++ b/.agents/skills/agent-testing/references/probe-mock-patterns.md@@ -994,7 +994,7 @@ agents. Set` `agentRules: false` `in next.config to disable.` and leaves the woroverrides the ignore, or call `/usr/bin/grep` directly. Before asserting "X exists nowhere",re-run the search with an explicit path into the dependency tree.-### E14. Electron `will-attach-webview` params carry NO custom attributes β identity via data-\* never arrives+### E25. Electron `will-attach-webview` params carry NO custom attributes β identity via data-\* never arrives- **Situation**: a main-process controller needs to know WHICH renderer feature a mounting`<webview>` belongs to (e.g. a per-conversation session id), and the renderer put it in a@@ -1097,7 +1097,7 @@ nodeintegration, plugins, disablewebsecurity, allowpopups, preload, β¦`). The hbefore opening the share page. Verify the fetch actually fired via`agent-browser network requests | grep getMessages`, not by waiting on the UI.-### E15. β Next dev does NOT hot-reload `apps/server/**` β you are testing STALE compiled server code+### E26. β Next dev does NOT hot-reload `apps/server/**` β you are testing STALE compiled server code- **Situation**: verifying a working-tree change inside `apps/server/src/**` (an agent-runtimeservice, a tool executor, a router) against a `bun run dev` server that was started before the@@ -1114,7 +1114,7 @@ nodeintegration, plugins, disablewebsecurity, allowpopups, preload, β¦`). The hconclusion. If a run "should" have hit your code and didn't, prove the server is running yourcode FIRST β drop a `console.error` on the path and restart β before debugging the code itself.-### E16. β `source`-ing an unquoted JSON env var silently corrupts it (JWKS\_KEY β gateway auth\_failed)+### E27. β `source`-ing an unquoted JSON env var silently corrupts it (JWKS\_KEY β gateway auth\_failed)- **Situation**: writing an env file for the local gateway loop with`JWKS_KEY={"keys":[{"kty":"RSA",...}]}` on one line, then `set -a; source that-file`.@@ -1134,7 +1134,7 @@ nodeintegration, plugins, disablewebsecurity, allowpopups, preload, β¦`). The hTo diagnose an `auth_failed`, hook `ws.send` in the page and read the token the client actuallysends β an empty string means the SERVER failed to sign, not that the gateway rejected a signature.-### E17. The chat input silently refuses to send when the agent's model is retired+### E28. The chat input silently refuses to send when the agent's model is retired- **Situation**: driving a real turn (store `sendMessage` or type+Enter). The call resolves, no erroris thrown, `activeTopicId` stays `null`, and no `agent_operations` row appears. Nothing in the dev@@ -1147,7 +1147,7 @@ nodeintegration, plugins, disablewebsecurity, allowpopups, preload, β¦`). The hand pick one from there. Also: a send that "resolves fine but creates no operation" is a UI-gatesymptom; **screenshot the composer** instead of re-reading your store call.-### E18. Fresh-worktree `seed-user` dies on `Cannot find module 'bcryptjs'` β NODE\_PATH into .pnpm fixes it+### E29. Fresh-worktree `seed-user` dies on `Cannot find module 'bcryptjs'` β NODE\_PATH into .pnpm fixes it- **Situation**: in a fresh git-worktree install, `init-dev-env.sh seed-user`(which runs `node <<'NODE'` from the repo root) throws MODULE\_NOT\_FOUND for@@ -1166,7 +1166,7 @@ nodeintegration, plugins, disablewebsecurity, allowpopups, preload, β¦`). The hthe `os error 35` agent-browser daemon wedge (D8) recovers with`agent-browser close --all` + re-running `setup-auth.sh web-seed`.-### C7. `document.body.innerText` is ALWAYS 0 in this app β probe `#root`, and use textContent to tell a wedge from a blank+### C10. `document.body.innerText` is ALWAYS 0 in this app β probe `#root`, and use textContent to tell a wedge from a blank- **Situation**: asserting rendered text with `document.body.innerText.includes(...)`. It returns `""` / length 0 even on a fully rendered page, so every text assertion silently fails and reads as "the page is blank".- **Works**: probe `document.getElementById('root').innerText`. (Cause not established β some ancestor of `#root` makes body's inner-text computation collapse; `#root` itself is fine.)