diff --git a/Makefile b/Makefile index 83d997a..f3ab322 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,10 @@ corpus: retrieval: corpus uv run python -m mobium_rag.evaluate +.PHONY: experiments +experiments: + uv run python -m mobium_rag.experiments > /dev/null && echo "data/retrieval-experiments.md" + .PHONY: generation generation: corpus uv run python -m mobium_rag.generate diff --git a/README.md b/README.md index 88905c5..bd2927b 100644 --- a/README.md +++ b/README.md @@ -209,6 +209,19 @@ and ROADMAP), outranked by sections that name a device — under every reranker tried, a larger one and rank fusion included (`data/retrieval-report.md`, "Rerankers"). +**Experiments to raise retrieval, 2026-11-27** +([data/retrieval-experiments.md](data/retrieval-experiments.md)). Each change +was chosen on half of golden set v2 and confirmed on the other half, with the +82 above run last. None held: no interval on held-out questions excluded zero, +so the gate's retriever and its floors are unchanged. The best stack — the bge +reranker on a hybrid BM25 + dense pool of 50, with heading paths, five distinct +sections — reached recall@5 0.870 and MRR 0.779 on the 82, ahead of 0.815 and +0.767 but within the interval, at about 2.6 s a question on a Mac against +70 ms. Hybrid retrieval raises the share of questions with their gold among +the candidates to 0.96–0.97; the reranker is where most of the loss is. Three +of the "runs on X" misses are answered by a ROADMAP section their labels leave +out, which is for the v2 review to decide. + ## Running it Requirements: [uv](https://docs.astral.sh/uv/), a checkout of Mobium's @@ -221,6 +234,7 @@ make test # unit tests: metrics, corpus, answers, judge plumbing make corpus # cut the pinned docs into data/corpus.jsonl make retrieval # corpus, then the retrieval report (data/retrieval-report.md) make ci # tests, corpus, and the retrieval gate: what CI runs +make experiments # retrieval changes on golden set v2 (data/retrieval-experiments.md) make generation # answer the golden set with Ollama (data/answers.jsonl) make judge # score stored answers with each judge, behind its controls @@ -255,6 +269,7 @@ deliberate corpus change and is reviewed like code. | `src/mobium_rag/answer.py` | the prompt, the Ollama call, citations and refusals | | `src/mobium_rag/metrics.py` | recall@k, MRR, nDCG against gold sections | | `src/mobium_rag/evaluate.py` | phases 3–4: retrieval with controls, intervals and the gate | +| `src/mobium_rag/experiments.py` | retrieval changes chosen on half of v2, confirmed on the other half and the gate | | `src/mobium_rag/generate.py` | phase 5: answers, refusals and citations | | `src/mobium_rag/metajudge.py` | phase 6: judges, controls, repeat, judge vs judge and vs person | | `src/mobium_rag/claudecli.py` | a Claude model as a judge through `claude -p` | diff --git a/REVIEWING.md b/REVIEWING.md index 385e988..9ad14e7 100644 --- a/REVIEWING.md +++ b/REVIEWING.md @@ -240,10 +240,14 @@ The choice and its reasons go in PLAN.md, phase 6. ## Golden set v2 (from 2026-10-24) -100 questions drafted from nothing against Mobium `f232d54`, to +100 questions drafted from nothing against Mobium `f232d54` and carried +to `767cd14` on 2026-11-26, to `review/GOLDEN-V2.md`: `data/golden-v2-proposed.jsonl`, checked by `review/check_golden_v2.py`, on their own page built by `review/build_review_v2.py` (`review/golden-review-v2.html`). Key facts show their anchors after them in ⟦ ⟧: alternatives split by " / ", -anchors by " ; ". The 82 in `data/golden.jsonl` keep the gate until v2 is -decided and applied. +anchors by " ; ". The maintainer exports the page's `reviews` collection +to `review/decisions-v2/` and runs `review/apply_v2.py`, which writes +`data/golden-v2.jsonl` and refuses a reviewed question that breaks the +specification's rules. The 82 in `data/golden.jsonl` keep the gate until +v2 is adopted. diff --git a/data/golden-v2-proposed.jsonl b/data/golden-v2-proposed.jsonl index f72201c..5d87b6e 100644 --- a/data/golden-v2-proposed.jsonl +++ b/data/golden-v2-proposed.jsonl @@ -1,23 +1,23 @@ -{"id": "g001", "question": "There are no Mobium release binaries yet. What do I need on my Mac to install the mobium command, and what is the command?", "kind": "fact", "category": "how-to", "persona": "new-user", "gold": ["docs/quickstart/README.md#1-install-mobium"], "facts": [{"fact": "Until the first release mobium installs with Go 1.24 or later and needs nothing else.", "anchors": [["Go 1.24"]]}, {"fact": "The install command is go install github.com/mobiumdev/mobium/cmd/mobium@latest.", "anchors": [["go install github.com/mobiumdev/mobium/cmd/mobium@latest"]]}, {"fact": "The binary lands in $(go env GOPATH)/bin, which must be on PATH.", "anchors": [["GOPATH"]]}], "new_since_pin": false, "verified_in": ["go.mod:3", "cmd/mobium/main.go"], "nearest": [], "concern": "", "check": "Claude's reading: go.mod declares go 1.24.0, matching the quick start's Go 1.24 or later; cmd/mobium is the main package. SETUP.md#installing-a-release covers the future prebuilt route and is a likely near miss, not gold."} +{"id": "g001", "question": "How do I install Mobium's prebuilt release on my Mac, and why should I download it with curl rather than my browser?", "kind": "fact", "category": "how-to", "persona": "new-user", "gold": ["docs/quickstart/README.md#1-install-mobium"], "facts": [{"fact": "Releases from v0.1.0-rc1 on carry one static mobium binary for macOS, Linux and Windows, on amd64 and arm64, needing nothing else.", "anchors": [["v0.1.0-rc1"]]}, {"fact": "Download the archive and SHA256SUMS, check it with shasum -a 256 -c, unpack it and move mobium onto PATH.", "anchors": [["SHA256SUMS"]]}, {"fact": "Use curl because the binaries are not notarized, and macOS blocks one a browser saved.", "anchors": [["notarized"]]}], "new_since_pin": true, "verified_in": [".github/workflows/release.yml"], "nearest": [], "concern": "", "check": "Claude's reading: replaces a question whose premise, that there are no release binaries yet, is false since v0.1.0-rc1. The release workflow builds the archives and SHA256SUMS. docs/SETUP.md#installing-a-release says the same in full, with xattr for a browser download; it is a near-equal answer, so tick Also answers it if you want both as gold."} {"id": "g002", "question": "I made an Android virtual device in Android Studio. How do I get Mobium to start it and wait until it is ready, and how do I see its screen while it runs?", "kind": "fact", "category": "how-to", "persona": "new-user", "gold": ["docs/quickstart/README.md#android-emulator-macos-linux"], "facts": [{"fact": "mobium boot starts the emulator by its AVD name and answers once Android has finished booting, not merely once adb sees it.", "anchors": [["mobium boot"]]}, {"fact": "It runs headless unless --window is added.", "anchors": [["--window"]]}], "new_since_pin": false, "verified_in": ["internal/device/boot.go:115-141", "internal/device/boot.go:189"], "nearest": [], "concern": "", "check": "Claude's reading: BootEmulator passes -no-window -no-audio unless window is set (boot.go:139-141) and waits for sys.boot_completed=1 (boot.go:189). SETUP.md#android-emulator says the same in one sentence and may be returned instead; the quick-start section is the fuller answer."} {"id": "g003", "question": "My Android emulator won't start and says 'Cannot find valid sdk root path', yet adb works fine from my terminal. What is actually wrong?", "kind": "fact", "category": "troubleshooting", "persona": "new-user", "gold": ["docs/SETUP.md#two-traps-neither-of-which-names-its-own-cause"], "facts": [{"fact": "platform-tools must be installed into the SDK root by sdkmanager, not only as the Homebrew android-platform-tools cask; the emulator validates the SDK root by that directory.", "anchors": [["sdkmanager"], ["platform-tools"]]}, {"fact": "mobium doctor checks for this specifically.", "anchors": [["mobium doctor"]]}], "new_since_pin": false, "verified_in": ["internal/agent/doctor.go:103-121", "cmd/mobium/doctor.go:12-16"], "nearest": [], "concern": "", "check": "Claude's reading: doctor's android sdk root check fails when the SDK root has no platform-tools directory and says to run sdkmanager platform-tools (doctor.go:115-118). The same trap is named in the doctor command's help text."} {"id": "g004", "question": "I restarted my Android emulator and my app came back as a build from days ago, missing screens I added since. Why, and how do I restart it without that happening?", "kind": "fact", "category": "troubleshooting", "persona": "test-author", "gold": ["docs/SETUP.md#headed-and-headless-the-procedures-and-what-differs"], "facts": [{"fact": "-no-snapshot-save still loads the quick-boot snapshot on the next start, so everything installed since the snapshot is gone.", "anchors": [["-no-snapshot-save"]]}, {"fact": "Cold-boot with -no-snapshot-load, which mobium boot passes, or reinstall what you need and confirm its version.", "anchors": [["-no-snapshot-load"]]}], "new_since_pin": false, "verified_in": ["internal/device/boot.go:115-139"], "nearest": [], "concern": "", "check": "Claude's reading: BootEmulator always passes -no-snapshot-load and its comment cites the old-app snapshot problem (boot.go:116-118, 139). The fact is in part ~1 of the section."} {"id": "g005", "question": "What do I have to switch on, on the iPhone itself, before Mobium can drive it?", "kind": "fact", "category": "how-to", "persona": "test-author", "gold": ["docs/SETUP.md#on-the-phone-once"], "facts": [{"fact": "Trust the computer over a cable and let Xcode's Devices and Simulators window prepare the phone, then turn on Developer Mode.", "anchors": [["Developer Mode"]]}, {"fact": "Turn on Settings > Developer > Enable UI Automation; without it WebDriverAgent fails with \"Timed out while enabling automation mode\".", "anchors": [["Enable UI Automation"]]}, {"fact": "Set Auto-Lock to Never (or long enough) so the phone does not lock mid-run.", "anchors": [["Auto-Lock"]]}], "new_since_pin": false, "verified_in": ["internal/device/wdaphone.go:653-660"], "nearest": [], "concern": "", "check": "Claude's reading: wdaphone.go recognizes WebDriverAgent's \"Timed out while enabling automation mode\" log and names the switch (lines 653-660). README.md#platforms~1 lists Developer Mode and Enable UI Automation too and is a plausible near miss, but lacks the trust/Xcode/Auto-Lock steps."} {"id": "g006", "question": "Which simulator features does Mobium refuse on a real iPhone, and how do I reset an app's data on a phone instead?", "kind": "fact", "category": "support", "persona": "test-author", "gold": ["docs/SETUP.md#what-a-phone-cannot-do"], "facts": [{"fact": "On a phone Mobium refuses permissions, appearance, the clipboard, simulated location and routes, and notifications, each with the reason, because simctl does them and devicectl has no equivalent.", "anchors": [["devicectl"]]}, {"fact": "Clearing an app's data on a phone takes its bundle: mobium clear-data --bundle uninstalls and reinstalls the app.", "anchors": [["--bundle"]]}], "new_since_pin": false, "verified_in": ["internal/mobiumdriver/wdaphone.go:196-230", "internal/mobiumdriver/wdaphone.go:263-265"], "nearest": [], "concern": "", "check": "Claude's reading: simulatorOnly in wdaphone.go lists exactly permissions, appearance, clipboard read/write, geolocation, routes, clear-data and notifications, and phoneRemedies gives the --bundle reinstall route for clear-data. The code also lists clipboard read separately; the doc says 'the clipboard'."} -{"id": "g007", "question": "Can I use Mobium on a Windows PC for my Android and iOS app testing today, and how far does that go?", "kind": "multi", "category": "support", "persona": "new-user", "gold": ["docs/WINDOWS.md#windows-support", "docs/WINDOWS.md#android-only-ios-is-not-possible-on-windows"], "facts": [{"fact": "Since 2026-10-22 an Android emulator and a phone have been driven from a Windows laptop through mobium mcp, the CLI and all five clients, but Windows is not yet declared supported.", "anchors": [["2026-10-22"]]}, {"fact": "iOS is not possible on Windows: Mobium drives iOS through xcrun simctl and WebDriverAgent built with Xcode, which is macOS-only.", "anchors": [["macOS-only"]]}, {"fact": "What is left before support is the checks a person at the machine runs and seven checks whose failures are not yet explained.", "anchors": [["not yet explained"]]}], "new_since_pin": true, "verified_in": ["internal/device/detach_windows.go:21-27", "internal/device/procpath_windows.go:8", "internal/device/simctl.go:282"], "nearest": [], "concern": "docs/quickstart/README.md#where-it-runs still says no emulator or phone has been driven from Windows, which README.md and WINDOWS.md contradict since #270/#271; the quick-start table is stale.", "check": "Claude's reading: Windows-specific code (named-pipe daemon, Detach, process path) is in internal/device/*_windows.go and builds for windows/amd64; iOS paths call xcrun throughout internal/device. README.md#platforms~2 restates the status in brief and will likely be retrieved; the stale quick-start table is a hard negative."} +{"id": "g007", "question": "Can I use Mobium on a Windows PC for my Android and iOS app testing today, and how far does that go?", "kind": "multi", "category": "support", "persona": "new-user", "gold": ["docs/WINDOWS.md#windows-support", "docs/WINDOWS.md#android-only-ios-is-not-possible-on-windows"], "facts": [{"fact": "Since 2026-10-22 an Android emulator and a phone have been driven from a Windows laptop through mobium mcp, the CLI and all five clients, but Windows is not yet declared supported.", "anchors": [["2026-10-22"]]}, {"fact": "iOS is not possible on Windows: Mobium drives iOS through xcrun simctl and WebDriverAgent built with Xcode, which is macOS-only.", "anchors": [["macOS-only"]]}, {"fact": "What is left before Windows is declared supported is full emulator sweeps, which an 8 GB laptop cannot hold with Chrome open.", "anchors": [["full emulator sweeps"]]}], "new_since_pin": true, "verified_in": ["internal/device/detach_windows.go:21-27", "internal/device/procpath_windows.go:8", "internal/device/simctl.go:282"], "nearest": [], "concern": "", "check": "Claude's reading: Windows-specific code (named-pipe daemon, Detach, process path) is in internal/device/*_windows.go and builds for windows/amd64; iOS paths call xcrun throughout internal/device. README.md#platforms~2 restates the status in brief and will likely be retrieved; the stale quick-start table is a hard negative. Re-pinned 2026-11-26 to 767cd14: the third fact now says what is left (WINDOWS.md, 2026-10-27); the quick start's table no longer contradicts it, so the concern is gone."} {"id": "g008", "question": "In Git Bash on Windows, pushing a file to /data/local/tmp on my Android device fails because Mobium sees the path as 'C:/Program Files/Git/data/local/tmp/x'. How do I fix it?", "kind": "fact", "category": "troubleshooting", "persona": "test-author", "gold": ["docs/WINDOWS.md#also-expected-unverified"], "facts": [{"fact": "Git Bash rewrites any argument that starts with / into a path under Git's own folder before mobium sees it, and Mobium refuses such a path naming the rewrite.", "anchors": [["Git Bash"]]}, {"fact": "Set MSYS2_ARG_CONV_EXCL=\"/data/;/sdcard/\" to leave device paths alone (MSYS_NO_PATHCONV=1 stops every conversion), or run from PowerShell or cmd, which never rewrite.", "anchors": [["MSYS2_ARG_CONV_EXCL"], ["PowerShell"]]}], "new_since_pin": true, "verified_in": ["internal/device/paths.go:126-135"], "nearest": [], "concern": "", "check": "Claude's reading: CheckDevicePath refuses a path starting with a drive letter as a Git Bash rewrite and its remedy names MSYS2_ARG_CONV_EXCL, MSYS_NO_PATHCONV=1 and PowerShell or cmd (paths.go:126-135). CHALLENGES#361 tells the same story and is a near-equal answer."} {"id": "g009", "question": "On Windows, does a Mobium daemon that started inside an SSH session keep running after I disconnect, and what makes that work?", "kind": "fact", "category": "behavior", "persona": "ci-engineer", "gold": ["docs/WINDOWS.md#4-devicedetach-internaldevicedetachwindowsgo-and-detachunixgo"], "facts": [{"fact": "Windows' OpenSSH server kills every process in a session's job when the session ends, which used to take the daemon with it.", "anchors": [["OpenSSH"]]}, {"fact": "Detach now adds CREATE_BREAKAWAY_FROM_JOB when the job allows breakaway, so the daemon outlives the session.", "anchors": [["CREATE_BREAKAWAY_FROM_JOB"]]}], "new_since_pin": true, "verified_in": ["internal/device/detach_windows.go:13-40", "cmd/mobium/daemon_client.go:114-119"], "nearest": [], "concern": "", "check": "Claude's reading: Detach sets CREATE_NEW_PROCESS_GROUP|DETACHED_PROCESS and adds CREATE_BREAKAWAY_FROM_JOB only when JOB_OBJECT_LIMIT_BREAKAWAY_OK is set (detach_windows.go:21-40); the auto-started daemon goes through it (daemon_client.go:119). CHALLENGES#359 is the defect behind it and an equally good source."} -{"id": "g010", "question": "My Android emulator on a Windows host has frozen: adb still lists it but every shell call times out. Will mobium shutdown end it, and how?", "kind": "multi", "category": "behavior", "persona": "test-author", "gold": ["docs/SHUTDOWN.md#2-simulators-then-emulators", "CHALLENGES#360"], "facts": [{"fact": "mobium shutdown gives adb emu kill ten seconds, then ends the process the emulator's discovery file names once that process is an emulator by name.", "anchors": [["discovery file"]]}, {"fact": "On Windows this now works too: the process is read with QueryFullProcessImageName and ended, where it used to be refused.", "anchors": [["QueryFullProcessImageName"]]}], "new_since_pin": true, "verified_in": ["internal/device/boot.go:32", "internal/device/boot.go:250-270", "internal/device/boot.go:400-428", "internal/device/procpath_windows.go:8-20"], "nearest": [], "concern": "docs/SHUTDOWN.md#2-simulators-then-emulators still ends with 'On Windows it does not end the process, and says so', but #268 (CHALLENGES 360) made killEmulatorProcess work on Windows (boot.go:400-428, procpath_windows.go); SHUTDOWN.md is stale.", "check": "Claude's reading: emuKillWait is 10s (boot.go:32) and killEmulatorProcess ends the discovery file's pid when its image name contains qemu or emulator, on every OS (boot.go:400-428). The SHUTDOWN.md section gives the mechanism and CHALLENGES 360 gives Windows; a right answer must say it works on Windows despite the stale line."} -{"id": "g011", "question": "I run two Android emulators at once on one machine and want a test run on each in parallel without the two slowing each other down. How do I set that up?", "kind": "multi", "category": "how-to", "persona": "ci-engineer", "gold": ["docs/SETUP.md#running-two-at-once", "docs/SETUP.md#parallel-runs"], "facts": [{"fact": "With two devices ready, a call that names no device is refused, so each run names its device with --device (or the client's device option); a second emulator gets its own console port with -port 5556.", "anchors": [["-port 5556"]]}, {"fact": "Give each run its own daemon by naming it with MOBIUM_SESSION, since one daemon serves one call at a time across every device it holds.", "anchors": [["MOBIUM_SESSION"]]}, {"fact": "Keep the session name short: it is part of a socket path capped at about 104 bytes.", "anchors": [["104"]]}], "new_since_pin": false, "verified_in": ["internal/device/adb.go:429", "internal/daemon/daemon.go:30", "internal/paths/paths.go:44-48", "internal/paths/paths.go:77"], "nearest": [], "concern": "", "check": "Claude's reading: adb.go:429 refuses with 'N devices are ready — pick one with --device'; the daemon serializes handlers with one mutex (daemon.go:30); paths.go names the socket from MOBIUM_SESSION and guards the 104-byte limit. docs/guides/cli.md#8 also explains MOBIUM_SESSION and is a near miss."} +{"id": "g010", "question": "My Android emulator on a Windows host has frozen: adb still lists it but every shell call times out. Will mobium shutdown end it, and how?", "kind": "fact", "category": "behavior", "persona": "test-author", "gold": ["docs/SHUTDOWN.md#2-simulators-then-emulators"], "facts": [{"fact": "mobium shutdown gives adb emu kill ten seconds, then ends the process the emulator's discovery file names once that process is an emulator by name.", "anchors": [["discovery file"]]}, {"fact": "On Windows the process is read with QueryFullProcessImageName, where Unix uses ps, and ended the same way.", "anchors": [["QueryFullProcessImageName"]]}], "new_since_pin": true, "verified_in": ["internal/device/boot.go:32", "internal/device/boot.go:250-270", "internal/device/boot.go:400-428", "internal/device/procpath_windows.go:8-20"], "nearest": [], "concern": "", "check": "Claude's reading: emuKillWait is 10s (boot.go:32) and killEmulatorProcess ends the discovery file's pid when its image name contains qemu or emulator, on every OS (boot.go:400-428). The SHUTDOWN.md section gives the mechanism and CHALLENGES 360 gives Windows; a right answer must say it works on Windows despite the stale line. Re-pinned 2026-11-26 to 767cd14: SHUTDOWN.md now says Windows ends the process (fixed in mobium#275), so that section alone answers it: kind fact, CHALLENGES 360 dropped from gold. The area keeps four multi through g018."} +{"id": "g011", "question": "I run two Android emulators at once on one machine and want a test run on each in parallel without the two slowing each other down. How do I set that up?", "kind": "multi", "category": "how-to", "persona": "ci-engineer", "gold": ["docs/SETUP.md#running-two-at-once", "docs/SETUP.md#parallel-runs"], "facts": [{"fact": "With two devices ready, a call that names no device is refused, so each run names its device with --device; mobium boot starts each emulator on the next free port, and one started by hand must not be given -port.", "anchors": [["next free port"]]}, {"fact": "Give each run its own daemon by naming it with MOBIUM_SESSION, since one daemon serves one call at a time across every device it holds.", "anchors": [["MOBIUM_SESSION"]]}, {"fact": "Keep the session name short: it is part of a socket path capped at about 104 bytes.", "anchors": [["104"]]}], "new_since_pin": false, "verified_in": ["internal/device/adb.go:429", "internal/daemon/daemon.go:30", "internal/paths/paths.go:44-48", "internal/paths/paths.go:77", "internal/device/boot.go:144"], "nearest": [], "concern": "", "check": "Claude's reading: adb.go:429 refuses with 'N devices are ready — pick one with --device'; the daemon serializes handlers with one mutex (daemon.go:30); paths.go names the socket from MOBIUM_SESSION and guards the 104-byte limit. docs/guides/cli.md#8 also explains MOBIUM_SESSION and is a near miss. Re-pinned 2026-11-26 to 767cd14: SETUP now starts both with mobium boot and says not to pass -port (CHALLENGES 390), so the first fact's -port 5556 was wrong."} {"id": "g012", "question": "If I leave Mobium alone for a while, does the background process it started keep running forever?", "kind": "fact", "category": "behavior", "persona": "new-user", "gold": ["docs/guides/cli.md#8-the-daemon-and-running-several-at-once"], "facts": [{"fact": "The first command starts a daemon in the background that holds the device sessions and refs, and it exits after 30 idle minutes.", "anchors": [["30 idle minutes"]]}, {"fact": "mobium daemon stop stops it, ending its sessions.", "anchors": []}], "new_since_pin": false, "verified_in": ["cmd/mobium/daemon_client.go:16-19", "cmd/mobium/daemon_client.go:114", "internal/daemon/daemon.go:184-210"], "nearest": [], "concern": "", "check": "Claude's reading: the auto-start passes --idle-timeout 30m (daemon_client.go:19, 114) and watchIdle shuts the daemon down after that (daemon.go:184-210). The question avoids the word daemon on purpose."} {"id": "g013", "question": "I have two lab Macs with emulators on them. How do I spread my test runs across both machines' devices, and what does each lab Mac need for that?", "kind": "multi", "category": "how-to", "persona": "ci-engineer", "gold": ["docs/guides/grid.md#2-a-grid", "docs/guides/grid.md#what-a-node-needs"], "facts": [{"fact": "Set MOBIUM_GRID=node1,node2; at a run's first call mobium asks each node for its devices and takes the first free one that matches.", "anchors": [["MOBIUM_GRID"]]}, {"fact": "Each node needs key-based SSH with no prompt (mobium runs SSH with BatchMode=yes) and mobium reachable by its non-interactive shell, set with MOBIUM_REMOTE_BIN if needed.", "anchors": [["BatchMode=yes"], ["MOBIUM_REMOTE_BIN"]]}, {"fact": "On a Mac node, Remote Login must be on.", "anchors": [["Remote Login"]]}], "new_since_pin": false, "verified_in": ["cmd/mobium/grid.go:23-40", "cmd/mobium/remote.go:151-162", "cmd/mobium/remote.go:183-186"], "nearest": [], "concern": "", "check": "Claude's reading: grid.go splits MOBIUM_GRID on commas and remote.go adds -o BatchMode=yes and honors MOBIUM_SSH and MOBIUM_REMOTE_BIN. SETUP.md#a-grid and SETUP.md#driving-another-machines-devices say most of this too; Remote Login is only in the grid guide."} {"id": "g014", "question": "A teammate's phone is plugged into one of our grid machines. Could a grid test run end up installing and tapping on it?", "kind": "fact", "category": "behavior", "persona": "ci-engineer", "gold": ["docs/guides/grid.md#phones-on-a-grid"], "facts": [{"fact": "The grid lends a physical device only when the node's own environment sets MOBIUM_GRID_PHONES=1, the node's choice, never the caller's; until then it is listed as not offered.", "anchors": [["MOBIUM_GRID_PHONES=1"]]}, {"fact": "A grid shows a phone's model, never its name.", "anchors": []}], "new_since_pin": false, "verified_in": ["cmd/mobium/grid.go:60-96", "cmd/mobium/grid.go:211"], "nearest": [], "concern": "", "check": "Claude's reading: grid.go marks a device Offered only if it is an emulator/simulator or the node's MOBIUM_GRID_PHONES is 1 (line 96) and tells a run asking for one so (line 211). SETUP.md#a-grid~1 also covers phones but not the model-not-name point."} {"id": "g015", "question": "How do I connect my Fire TV so Mobium can drive it over Wi-Fi from my Mac, and what do I do when adb connect says \"No route to host\" although the TV answers ping?", "kind": "fact", "category": "how-to", "persona": "new-user", "gold": ["docs/SETUP.md#over-wi-fi"], "facts": [{"fact": "Turn on ADB Debugging in the Fire TV's Developer Options (shown under Settings > Device & Software after selecting the device name seven times in About), then run adb connect :5555 with the TV's IPv4 address and accept the prompt on the TV; a Fire TV has no pairing step.", "anchors": [["ADB Debugging"], ["5555"]]}, {"fact": "\"No route to host\" while ping works is macOS Local Network privacy silently blocking an adb server that a background process started; run adb kill-server && adb connect :5555 from a Terminal window so macOS asks, and allow it.", "anchors": [["Local Network"], ["adb kill-server"]]}], "new_since_pin": false, "verified_in": ["internal/device/adb.go:358"], "nearest": [], "concern": "", "check": "Claude's reading: replaces a draft that duplicated g074 (simulator audio setup). Both facts are in SETUP.md#over-wi-fi; the Local Network trap is macOS behavior, measured on the Fire TV and recorded in the doc, not something the code can show, and the code's own part is the disconnect-then-connect before it reports a network device missing (internal/device/adb.go:358). SHUTDOWN.md's TV section repeats the trap and could also count."} {"id": "g016", "question": "How do I set up an Apple TV simulator for Mobium, and how do I move around in it given that it has no touch screen?", "kind": "fact", "category": "how-to", "persona": "test-author", "gold": ["docs/SETUP.md#an-apple-tv-simulator"], "facts": [{"fact": "The tvOS platform is a separate download: xcodebuild -downloadPlatform tvOS, then create and boot an Apple TV simulator; the first command installs WebDriverAgent's tvOS runner.", "anchors": [["-downloadPlatform tvOS"]]}, {"fact": "It is driven with the remote: press dpad-up/down/left/right and select, back is the Menu button; tap and other gestures are refused.", "anchors": [["dpad-up"], ["select"]]}], "new_since_pin": false, "verified_in": ["internal/agent/remote.go:12", "internal/mobiumdriver/buttons.go:194", "internal/mobiumdriver/alerts.go:73"], "nearest": [], "concern": "", "check": "Claude's reading: remote.go and alerts.go refuse touches on an Apple TV because it has no touch screen, and buttons.go maps back to the remote's Menu button on tvOS. README.md#platforms~2 summarizes TVs and is a near miss without the setup commands."} {"id": "g017", "question": "Does Mobium work with Wear OS watches, and what can't it do on one yet?", "kind": "fact", "category": "support", "persona": "test-author", "gold": ["README.md#platforms"], "facts": [{"fact": "Wear OS is driven by the Android backends with nothing added, verified on a Wear OS 5.1 emulator, with swiping right as a watch's back.", "anchors": [["Wear OS 5.1"]]}, {"fact": "Not yet a real watch, and not the crown: press has no rotary input.", "anchors": [["rotary"]]}], "new_since_pin": false, "verified_in": ["internal/agent/schema.go:1438", "internal/mobiumdriver/buttons.go:37"], "nearest": [], "concern": "", "check": "Claude's reading: the press button list in schema.go has D-pad, select, back and media keys and no rotary or crown input; nothing in internal/ handles a crown. SETUP.md#a-wear-os-emulator says 'the crown has no command yet' but not that a real watch is untested, so README is the sufficient section."} -{"id": "g018", "question": "mobium doctor printed several 'note' lines on my machine. Does that mean my setup is broken, and will doctor fail a CI setup step because of them?", "kind": "fact", "category": "behavior", "persona": "ci-engineer", "gold": ["docs/SETUP.md#setting-up-devices"], "facts": [{"fact": "A note means something is missing that is only needed for part of the job, such as no Xcode on a machine doing Android work, which is normal.", "anchors": [["part of the job"]]}, {"fact": "doctor checks the whole list without a device and exits non-zero when it found a problem (a FAIL line), so a script can act on it.", "anchors": [["non-zero"]]}], "new_since_pin": false, "verified_in": ["internal/agent/doctor.go:42-67", "internal/agent/doctor.go:343-345", "cmd/mobium/doctor.go:29-34"], "nearest": [], "concern": "", "check": "Claude's reading: only checks with status problem (printed FAIL) count toward Problems, and the command exits non-zero only when Problems > 0, so notes alone exit zero. The doc says 'exits non-zero if it found something', which a reviewer may find vaguer than the code; the answer that notes do not fail is from the code, so the second fact is left to the judge on that point."} +{"id": "g018", "question": "On the Android Automotive emulator, which Android user does Mobium act for when it clears my app's data or grants it a permission, and which of Mobium's drivers should I use on a car?", "kind": "multi", "category": "behavior", "persona": "test-author", "gold": ["README.md#platforms", "CHALLENGES#397"], "facts": [{"fact": "Mobium acts for user 10, the driver, as the car's apps do, not user 0.", "anchors": [["user 10"]]}, {"fact": "It asks am get-current-user and, when that is not 0, passes --user to pm clear and pm grant or revoke, and reads that user's permissions back.", "anchors": [["am get-current-user"]]}, {"fact": "Use the default UiAutomator2 driver: the uiautomator driver reads only the app's window on a car.", "anchors": [["reads only the app's window"]]}], "new_since_pin": true, "verified_in": ["internal/device/users.go:18"], "nearest": [], "concern": "", "check": "Claude's reading: new, Android Automotive since 2026-11-11 (mobium#337–#339). README gives user 10 and the driver limit; CHALLENGES 397 gives how, and neither has both. users.go asks am get-current-user. It replaces the doctor-notes question, whose answer that notes alone exit zero came from the code, not from its gold."} {"id": "g019", "question": "How do I set up the Mobium daemon to start automatically at login as a launchd or systemd service, so it is always up before my tests run?", "kind": "unanswerable", "category": "", "persona": "ci-engineer", "gold": [], "facts": [], "new_since_pin": false, "verified_in": ["cmd/mobium/daemon_client.go:16-19", "cmd/mobium/daemon_cmd.go:46"], "nearest": ["docs/guides/cli.md#8-the-daemon-and-running-several-at-once", "docs/SHUTDOWN.md#1-mobium-daemon-stop-always-first"], "concern": "", "check": "Claude's reading: the corpus mentions launchd only for simulator internals and Chrome's crash handler, never systemd or a login service; the code only auto-starts the daemon from the first command (daemon_client.go) or `daemon start`. The docs explain auto-start and idle exit, which a retriever will return, but never how to run it as a service."} -{"id": "g020", "question": "When will Mobium's first prebuilt release, v0.1.0, be published so I can install without Go?", "kind": "unanswerable", "category": "", "persona": "new-user", "gold": [], "facts": [], "new_since_pin": false, "verified_in": ["docs/RELEASE-CHECKLIST.md"], "nearest": ["docs/SETUP.md#installing-a-release", "docs/quickstart/README.md#1-install-mobium"], "concern": "", "check": "Claude's reading: the corpus describes what a release will contain and that installs need Go until the first release, and uses v0.1.0 as an example version, but states no date; release gating is a checklist, not a schedule. A right answer says the docs give no date."} +{"id": "g020", "question": "Mobium v0.1.0-rc1 is out. On what date will the final v0.1.0 be released?", "kind": "unanswerable", "category": "", "persona": "new-user", "gold": [], "facts": [], "new_since_pin": false, "verified_in": ["docs/RELEASE-CHECKLIST.md"], "nearest": ["docs/SETUP.md#installing-a-release", "docs/quickstart/README.md#1-install-mobium", "docs/ROADMAP.md#next"], "concern": "", "check": "Claude's reading: the old question asked when the first prebuilt release would come, and v0.1.0-rc1 has come. The docs name v0.1.0 in the roadmap's release steps and the checklist, with no date anywhere. A right answer says the docs give none."} {"id": "g021", "question": "My locator text=Settings also clicks things like \"Display settings\" because it matches part of the text. How do I make a Mobium locator match only an element whose text is exactly Settings?", "kind": "fact", "category": "how-to", "persona": "test-author", "gold": ["docs/guides/cli.md#4-locators-and-refs"], "facts": [{"fact": "An unquoted string locator matches part of the words, in any case; putting the value in double quotes matches the whole of it (still in any case).", "anchors": [["double quotes"]]}, {"fact": "For example text=\"Internet\" finds only an element whose text is Internet, not \"Network & internet\".", "anchors": [["text=\"Internet\""]]}], "new_since_pin": false, "verified_in": ["internal/uitree/locator.go:425", "internal/uitree/locator.go:441"], "nearest": [], "concern": "", "check": "Claude's reading: cli.md section 4 states the quoted-whole rule; Locator.field compares a quoted (Whole) value with strings.EqualFold after trimming, and an unquoted one by case-insensitive substring (match). Reviewer: the question's example is mine, the anchor example is the doc's."} {"id": "g022", "question": "Every row in my list has its own \"More\" button. How do I write a locator in a test file for the More button in the row titled \"Card 8\", one that still works after the list scrolls?", "kind": "fact", "category": "how-to", "persona": "test-author", "gold": ["docs/guides/cli.md#4-locators-and-refs"], "facts": [{"fact": "Use within to scope a locator to a row, e.g. label=More within text=Card 8; both sides are whole locators.", "anchors": [["within text=", "within label="]]}, {"fact": "It keeps the match nearest the anchor and never reaches past the list holding the anchor, so a row without the target finds nothing rather than the neighbor's.", "anchors": []}, {"fact": "Both sides are resolved again on every read, since a list reuses its rows as it scrolls (unlike a ref, which is gone with its map).", "anchors": []}], "new_since_pin": false, "verified_in": ["internal/uitree/locator.go:40", "internal/uitree/locator.go:491", "internal/uitree/locator.go:508"], "nearest": [], "concern": "", "check": "Claude's reading: cli.md section 4 describes within; Locator.Resolve keeps the target matches nearest the anchor and the comment above it says the climb stops at a scroll container and resolves whole on every read. Facts 2 and 3 have no distinctive token and are left to the judge."} {"id": "g023", "question": "In my hybrid app the Save button sits inside an iframe on the embedded web page. How do I tap it from the Mobium CLI?", "kind": "multi", "category": "how-to", "persona": "test-author", "gold": ["README.md#hybrid-apps-and-webviews", "docs/guides/cli.md#4-locators-and-refs"], "facts": [{"fact": "Switch to the WebView's context first (mobium contexts, then mobium context WEBVIEW_...), after which map and tap operate on the page.", "anchors": [["mobium context"]]}, {"fact": "Then use a css= locator with the frame's path before the selector, separated by >>, as map prints it, e.g. 'css=iframe#f >> button'.", "anchors": [["css="], [">>"]]}], "new_since_pin": false, "verified_in": ["internal/agent/webview.go:1057", "internal/webview/css.go:35", "internal/agent/webview.go:51"], "nearest": [], "concern": "", "check": "Claude's reading: README's hybrid section gives the context switch, cli.md section 4 the css= selector with a frame path; findWebByLocator and webview/css.go split the selector on ' >> ' and resolve inside that frame. CHALLENGES 312 and SKILL 'When things fail' also mention the frame path; I kept gold to the two sections a new user needs."} @@ -45,7 +45,7 @@ {"id": "g045", "question": "I want one sign-in test to run with several different bad passwords and show up as separate results. How do I write that in a .test.json file?", "kind": "fact", "category": "how-to", "persona": "test-author", "gold": ["docs/guides/test-runner.md#9-one-test-over-several-cases-each"], "facts": [{"fact": "Give the test an \"each\" array of cases; ${key} in any string of its steps is that case's value, and each case runs as a test of its own.", "anchors": [["\"each\""], ["${key}"]]}, {"fact": "Without a ${key} in the test's name the cases are numbered [1], [2] rather than named after values that may be a password.", "anchors": [["[1]"]]}, {"fact": "Each case starts over: the app is stopped and launched and beforeEach runs again.", "anchors": [["starts over"]]}], "new_since_pin": false, "verified_in": ["internal/testrun/file.go:44", "internal/testrun/file.go:539", "internal/testrun/file.go:560", "internal/testrun/file.go:598"], "nearest": [], "concern": "", "check": "Claude's reading: expandEach in file.go makes one test per case, names unnamed cases \" [i]\", keeps a lone ${key}'s type, and refuses a missing key, all as test-runner.md section 9 says."} {"id": "g046", "question": "Our mobium.config.json takes the iOS simulator from ${MOBIUM_IOS_DEVICE}. If a CI job runs mobium test without that variable set, what happens and what exit status does the job get?", "kind": "multi", "category": "behavior", "persona": "ci-engineer", "gold": ["docs/guides/test-runner.md#6-more-than-one-device", "docs/guides/test-runner.md#7-in-ci"], "facts": [{"fact": "An unset variable in a project's device is refused by name before any test runs.", "anchors": [["refused by name"]]}, {"fact": "The run exits with mobium's own code 2 (a bad file or an unset device), not 1, which means a test failed, so a job can tell a broken run from a broken app.", "anchors": [["2 for a bad file or an unset device"]]}], "new_since_pin": false, "verified_in": ["internal/testrun/file.go:410", "internal/testrun/run.go:242", "internal/mobiumerr/mobiumerr.go:239", "cmd/mobium/test.go:228"], "nearest": [], "concern": "", "check": "Claude's reading: run.go refuses a project with unset variables as invalid_argument naming the variable, and ExitCode maps invalid_argument to 2; section 6 has the refusal and section 7 the exit code, so both are needed."} {"id": "g047", "question": "How do I get mobium test results into my CI system's test report, and how does a test that only passed on a retry show up there?", "kind": "multi", "category": "how-to", "persona": "ci-engineer", "gold": ["docs/guides/test-runner.md#7-in-ci", "docs/guides/test-runner.md#5-retries-and-flaky"], "facts": [{"fact": "Run mobium test --reporter list,junit,html; the JUnit file is mobium-report/junit.xml, for the CI's test report.", "anchors": [["mobium-report/junit.xml"]]}, {"fact": "With --retries, a test that fails then passes is flaky; in JUnit it is a pass with a flaky property.", "anchors": [["pass with a flaky property"]]}, {"fact": "The exit status is 0 when every test passed or was flaky.", "anchors": [["0 when every test passed or was flaky"]]}], "new_since_pin": false, "verified_in": ["internal/testrun/report.go:137", "internal/testrun/report.go:169", "cmd/mobium/test.go:228"], "nearest": [], "concern": "", "check": "Claude's reading: WriteJUnit writes junit.xml with a `flaky` property \"passed on attempt N\" and the command fails only when a test failed; section 7 has the command and path, section 5 the flaky-in-JUnit rule."} -{"id": "g048", "question": "I only want step-by-step screenshots and a replayable recording for the tests that fail in my nightly mobium test run. What do I pass, and where does the recording end up?", "kind": "fact", "category": "how-to", "persona": "test-author", "gold": ["docs/guides/test-runner.md#a-trace"], "facts": [{"fact": "--trace retain-on-failure keeps the screenshot and map after every step only for a test that failed (trace in the config sets the default).", "anchors": [["retain-on-failure"]]}, {"fact": "The recording is a zip in Vibium's record format at mobium-report/artifacts/trace/---/trace.zip, linked from the report.", "anchors": [["trace.zip"]]}, {"fact": "player.vibium.dev opens it.", "anchors": [["player.vibium.dev"]]}], "new_since_pin": false, "verified_in": ["cmd/mobium/test.go:103", "internal/testrun/run.go:477", "internal/testrun/run.go:509", "internal/testrun/run.go:513"], "nearest": [], "concern": "test-runner.md 'A trace' says \"Each attempt is also kept as a recording\", but run.go:477-487 keeps only the attempt reported (a flaky test's first failure, a failed test's last attempt, a pass) and pruneTraces deletes the other attempts' trace directories.", "check": "Claude's reading: the flag, the path and the player match the code. A reviewer should look at the concern: the doc says each attempt is kept, the code keeps one."} +{"id": "g048", "question": "I only want step-by-step screenshots and a replayable recording for the tests that fail in my nightly mobium test run. What do I pass, and where does the recording end up?", "kind": "fact", "category": "how-to", "persona": "test-author", "gold": ["docs/guides/test-runner.md#a-trace"], "facts": [{"fact": "--trace retain-on-failure keeps the screenshot and map after every step only for a test that failed (trace in the config sets the default).", "anchors": [["retain-on-failure"]]}, {"fact": "The recording is a zip in Vibium's record format at mobium-report/artifacts/trace/---/trace.zip, linked from the report.", "anchors": [["trace.zip"]]}, {"fact": "player.vibium.dev opens it.", "anchors": [["player.vibium.dev"]]}], "new_since_pin": false, "verified_in": ["cmd/mobium/test.go:103", "internal/testrun/run.go:477", "internal/testrun/run.go:509", "internal/testrun/run.go:513"], "nearest": [], "concern": "", "check": "Claude's reading: the flag, the path and the player match the code. A reviewer should look at the concern: the doc says each attempt is kept, the code keeps one. Re-pinned 2026-11-26 to 767cd14: the doc now says the attempt reported is kept, as run.go does (fixed in mobium#275), so the concern is gone."} {"id": "g049", "question": "If I attach the trace zip from a sign-in test to a bug report, will the username and password I typed be readable in it?", "kind": "fact", "category": "behavior", "persona": "test-author", "gold": ["CHALLENGES#327"], "facts": [{"fact": "A password is not recorded, only its length.", "anchors": [["only its length"]]}, {"fact": "Other typed text, such as the username, is in the trace: in the call's result and the screen after it.", "anchors": [["in the call's result"]]}], "new_since_pin": false, "verified_in": ["cmd/mobium/trace.go:20", "internal/agent/schema.go:882"], "nearest": [], "concern": "", "check": "Claude's reading: only CHALLENGES 327 (its second part) states the corrected rule in the corpus; the CLI help and app_trace schema say the same, but neither is in the corpus. checks/README's trace.sh row adds that a typed password appears nowhere in the zip but does not cover other text."} {"id": "g050", "question": "My app polls a server in the background forever, and I launched it with --gray-box. What happens when I tap something?", "kind": "fact", "category": "behavior", "persona": "test-author", "gold": ["docs/guides/graybox.md#what-an-action-does"], "facts": [{"fact": "After 10 seconds the action is refused as a timeout that failed check idle, naming what the app said kept it busy.", "anchors": [["after 10 seconds"], ["failed check idle"]]}, {"fact": "The remedy is to launch the app again without the gray box, to act on the screen as it is.", "anchors": [["without --gray-box", "without gray_box"]]}], "new_since_pin": false, "verified_in": ["internal/agent/graybox.go:28"], "nearest": [], "concern": "", "check": "Claude's reading: grayBoxIdleLimit is 10 s in agent/graybox.go, and the refusal text in the guide's example ends \"launch the app again without gray_box\"."} {"id": "g051", "question": "My mobium test suite runs on a Fire TV over Wi-Fi whose adb link keeps dropping for a few seconds. What does the runner do with a step when the link goes?", "kind": "fact", "category": "behavior", "persona": "test-author", "gold": ["docs/guides/test-runner.md#a-device-that-drops-off-and-comes-back"], "facts": [{"fact": "A step whose call never reached the device is made again once the device is back, for up to 90 seconds and never past the test's own time; a device reached by adb connect is connected again.", "anchors": [["90 seconds"], ["connected again"]]}, {"fact": "A failure from a call that may have reached the device fails the step as before, because making it again could press twice.", "anchors": [["press twice"]]}], "new_since_pin": false, "verified_in": ["internal/testrun/run.go:800", "internal/testrun/run.go:807"], "nearest": [], "concern": "", "check": "Claude's reading: callReaching retries only device.Unreached errors, every 2 s, until linkWait (90 s) or the test's deadline, as the section says."} @@ -57,7 +57,7 @@ {"id": "g057", "question": "Walking through the login screen at the start of every test is slow. How can a test put my app straight into a signed-in state instead?", "kind": "fact", "category": "how-to", "persona": "test-author", "gold": ["docs/guides/graybox.md#hooks-calling-into-the-app"], "facts": [{"fact": "The app registers hooks by name with the gray-box library (GrayBox.register), and a test calls one with mobium hook [args], or app_hook from MCP, getting back what it returned.", "anchors": [["GrayBox.register"], ["mobium hook", "app_hook"]]}, {"fact": "Hooks answer only when the app was launched with --gray-box; otherwise the call is device_not_ready.", "anchors": [["without --gray-box is device_not_ready"]]}], "new_since_pin": false, "verified_in": ["cmd/mobium/hook.go:8", "internal/agent/graybox.go:150", "internal/agent/graybox.go:192"], "nearest": [], "concern": "", "check": "Claude's reading: hook.go's help and agent/graybox.go (15 s default limit, device_not_ready when not launched with the gray box) match the guide's Hooks section."} {"id": "g058", "question": "My app is native Swift and Kotlin, not React Native. What does it have to do so that mobium test waits for its background loading before each step?", "kind": "multi", "category": "how-to", "persona": "test-author", "gold": ["docs/guides/graybox-tutorial.md#5-your-own-app", "docs/guides/graybox-tutorial.md#4-turning-the-gray-box-on"], "facts": [{"fact": "Write MOBIUM-GRAYBOX lines (on, busy= tag= at each change of work in flight, lift) to the device log: on iOS os_log subsystem dev.mobium.graybox, on Android logcat tag MobiumGrayBox.", "anchors": [["dev.mobium.graybox"], ["MobiumGrayBox"]]}, {"fact": "Write them only when launched with the gray box on: the argument -MobiumGrayBox YES on iOS, the intent extra MobiumGrayBox=true on Android.", "anchors": [["-MobiumGrayBox YES"]]}, {"fact": "In the test file set \"grayBox\": true beside \"app\", so each test's launch turns it on.", "anchors": [["\"grayBox\": true"]]}], "new_since_pin": false, "verified_in": ["internal/device/graybox.go:69", "internal/device/graybox.go:74", "internal/device/graybox.go:77", "internal/device/grayboxstream.go:77", "internal/device/grayboxstream.go:80", "internal/testrun/file.go:32"], "nearest": [], "concern": "", "check": "Claude's reading: the log prefix, iOS argument and subsystem, Android extra and tag all match device/graybox.go and grayboxstream.go; the test-file key is in tutorial section 4, the native lines in section 5."} {"id": "g059", "question": "How do I split my mobium test suite across four CI machines so that each one runs a quarter of the test files?", "kind": "unanswerable", "category": "", "persona": "ci-engineer", "gold": [], "facts": [], "new_since_pin": false, "verified_in": ["cmd/mobium/test.go:234"], "nearest": ["docs/guides/test-runner.md#6-more-than-one-device", "docs/guides/test-runner.md#7-in-ci", "docs/guides/test-runner.md#the-commands"], "concern": "", "check": "Claude's reading: no shard option exists; `grep -ri shard` finds nothing in the code or the docs, and the test command's flags (test.go:234-250) parallelize only across devices on one machine (--workers, one worker per device) or lease grid devices. A retriever will return the multi-device and CI sections."} -{"id": "g060", "question": "If I don't pass --timeout to mobium test and the config sets no timeout, how long does each test get before it is stopped?", "kind": "unanswerable", "category": "", "persona": "test-author", "gold": [], "facts": [], "new_since_pin": false, "verified_in": ["cmd/mobium/test.go:84", "cmd/mobium/test.go:239"], "nearest": ["docs/guides/test-runner.md#the-commands", "docs/guides/test-runner.md#2-run-it"], "concern": "Docs gap: the 60 s default per-test timeout (cmd/mobium/test.go:84, 239) is not stated anywhere in the docs; test-runner.md's commands table could say it.", "check": "Claude's reading: the code's default is 60 s per test (test.go:84 and the flag default at 239), but no corpus section states it: the commands table gives `--timeout 30s` as an example and says the config's timeout is milliseconds, and section 2's \"ten seconds\" is each assertion's timeout, the likely wrong answer."} +{"id": "g060", "question": "What does one mobium check cost when it asks its default Claude model to judge a recording?", "kind": "unanswerable", "category": "", "persona": "test-author", "gold": [], "facts": [], "new_since_pin": true, "verified_in": ["internal/claim/anthropic.go:17"], "nearest": ["docs/guides/verifier.md#asking-a-model", "docs/guides/verifier.md#how-good-is-a-judge", "docs/ROADMAP.md#under-consideration"], "concern": "", "check": "Claude's reading: new, the verifier (mobium#281). The guide says a check with no --model asks claude-opus-5-5 and that each check is a paid call, and gives no price; the code has none. ROADMAP's red-teaming entry gives \"$16 of Claude usage\" for an A/B, a likely wrong answer. It replaces the per-test timeout question, which the docs answer since mobium#275 (\"60 seconds unless set\"): that question found the gap."} {"id": "g061", "question": "My Charles proxy listens on port 8888 on my Mac. How do I send an Android emulator's app traffic through it with Mobium without looking up the Mac's LAN address?", "kind": "fact", "category": "how-to", "persona": "test-author", "gold": ["docs/guides/network.md#5-through-a-proxy"], "facts": [{"fact": "Run `mobium network --proxy 127.0.0.1:8888` (host:port) to set the device's HTTP proxy.", "anchors": [["--proxy"]]}, {"fact": "A proxy on 127.0.0.1 or localhost is the host machine's: Mobium reverses its port with adb reverse before pointing the device at it, so no LAN address or firewall is involved.", "anchors": [["adb reverse"]]}], "new_since_pin": true, "verified_in": ["cmd/mobium/network.go:76", "internal/agent/network.go:192", "internal/device/proxy.go:134", "internal/mobiumdriver/network.go:78"], "nearest": [], "concern": "", "check": "Claude's reading: network.md section 5 gives the command and the adb reverse behavior; code reverses the port only for a loopback host (IsLoopback) and ParseProxy takes host:port only. PROXY.md describes a planned `--proxy charles` that is not built (ParseProxy would refuse it), so an answer offering it is wrong."} {"id": "g062", "question": "I removed the emulator's proxy with `adb shell settings delete global http_proxy`, it reads back null, yet my app still tries to connect to 127.0.0.1:8888. Why, and how do I clear it for real?", "kind": "fact", "category": "troubleshooting", "persona": "test-author", "gold": ["docs/guides/network.md#5-through-a-proxy"], "facts": [{"fact": "Android derives global_http_proxy_host and _port from http_proxy, and deleting http_proxy leaves them, and the proxy, in force.", "anchors": [["global_http_proxy_host"]]}, {"fact": "`mobium network --no-proxy` takes it off the way that sticks: http_proxy set to :0, then every proxy key deleted.", "anchors": [["--no-proxy"], [":0"]]}], "new_since_pin": true, "verified_in": ["internal/device/proxy.go:16", "internal/device/proxy.go:69", "cmd/mobium/network.go:77"], "nearest": [], "concern": "", "check": "Claude's reading: network.md section 5 states both facts; proxy.go writes `:0` then deletes the host, port, exclusion list and PAC keys and reads the proxy in force back. PROXY.md#what-was-measured-2026-10-20 has the same finding at length but no Mobium command."} {"id": "g063", "question": "Can Mobium point my real Pixel's network traffic at a debugging proxy, and can it do the same for an iPhone?", "kind": "fact", "category": "support", "persona": "new-user", "gold": ["docs/guides/network.md#what-each-device-can-do"], "facts": [{"fact": "On an Android phone the proxy works: the same setting as the emulator, with no root needed (measured on a Pixel 8 Pro, Android 17).", "anchors": [["no root"]]}, {"fact": "On an iOS simulator or iPhone, Mobium cannot set a proxy (nor offline or shaping); iOS refuses.", "anchors": []}], "new_since_pin": true, "verified_in": ["internal/device/proxy.go:69", "internal/agent/network.go:71", "internal/agent/schema.go:2135"], "nearest": [], "concern": "", "check": "Claude's reading: the table in network.md has a proxy column added after the pin; app_network on an iOS driver has no Networker capability and is refused (network.go:71). PROXY.md plans a Wi-Fi proxy on a real iPhone through Settings (step 5), not built — a right answer says no today."} @@ -66,7 +66,7 @@ {"id": "g066", "question": "On iOS the location permission prompt shows Allow Once, Allow While Using App and Don't Allow. What happens if my script runs `mobium alert accept` on it, and how do I choose one of them?", "kind": "fact", "category": "behavior", "persona": "test-author", "gold": ["skills/mobile-check/SKILL.md#dialogs"], "facts": [{"fact": "accept and dismiss only answer a dialog of one or two buttons; a dialog of three or more is refused, naming its buttons, because more than one may mean yes.", "anchors": [["three or more"]]}, {"fact": "Press one by caption or position from 1 with `mobium alert --button \"Allow While Using App\"`; captions match in any case with straight or curly quotes.", "anchors": [["--button"]]}], "new_since_pin": false, "verified_in": ["internal/agent/alert.go:201", "internal/agent/alert.go:262", "internal/agent/alert.go:409", "cmd/mobium/alert.go:52"], "nearest": [], "concern": "", "check": "Claude's reading: SKILL.md#dialogs states both; alert.go refuses len(buttons) > 2 with the remedy to use button, and normalizes curly quotes for captions. CHALLENGES#305 is the history (accept pressed Don't Allow) but is not needed for the answer."} {"id": "g067", "question": "In a mobium test file, how do I make iOS's offer to save a password after login get answered automatically in every test, and what does that do when the same file runs on Android?", "kind": "fact", "category": "how-to", "persona": "test-author", "gold": ["docs/guides/test-runner.md#writing-tests"], "facts": [{"fact": "Add an app_dialogs rule in beforeEach: {\"name\": \"app_dialogs\", \"arguments\": {\"when\": \"Save Password\", \"press\": \"Not Now\"}}.", "anchors": [["app_dialogs"], ["beforeEach"], ["Not Now"]]}, {"fact": "On Android the rule never fires, since that dialog never comes there.", "anchors": []}], "new_since_pin": false, "verified_in": ["internal/agent/dialogs.go:56", "internal/agent/dialogs.go:105", "internal/agent/dialogs.go:116"], "nearest": [], "concern": "", "check": "Claude's reading: test-runner.md 'Writing tests' gives the exact step; dialogs.go matches a rule when the dialog text contains `when`, ignoring case, and presses the captioned button. SKILL.md#dialogs shows the CLI form (`mobium dialogs --when ... --press ...`) but not the test-file form."} {"id": "g068", "question": "My Android app posts a notification and I need my test to tap it. `mobium map` doesn't show it — what do I do?", "kind": "fact", "category": "how-to", "persona": "test-author", "gold": ["skills/mobile-check/SKILL.md#interruptions-and-hardware-buttons"], "facts": [{"fact": "A notification cannot be tapped until the shade is open: run `mobium notifications --shade open`, then `map`, then tap it.", "anchors": [["--shade open"]]}, {"fact": "Close the shade when finished, or every later locator fails against the panel covering the app.", "anchors": []}], "new_since_pin": false, "verified_in": ["cmd/mobium/notifications.go:42", "internal/device/adb.go:1548", "internal/agent/schema.go:983"], "nearest": [], "concern": "", "check": "Claude's reading: SKILL.md states it; adb.go runs `cmd statusbar expand-notifications` for open, and the tool description says opening or closing the shade discards the last map's refs."} -{"id": "g069", "question": "I want one test to run with VoiceOver on, on a real iPhone, without leaving the phone with VoiceOver on afterward. How do I do that with Mobium?", "kind": "fact", "category": "how-to", "persona": "test-author", "gold": ["docs/ACCESSIBILITY.md#5-a-screen-reader-as-a-setting-built"], "facts": [{"fact": "`mobium accessibility screen_reader on` (app_accessibility, setting screen_reader) turns VoiceOver on an iPhone on iOS 27, confirmed by reading back.", "anchors": [["screen_reader on"], ["iOS 27"]]}, {"fact": "It is put back as found when the session ends; on a phone the session's restore is the only safe way to turn it on.", "anchors": [["put back when the session ends"]]}], "new_since_pin": true, "verified_in": ["internal/agent/schema.go:1624", "internal/mobiumdriver/axsettings.go:89", "internal/agent/accessibility.go:18", "internal/agent/accessibility.go:134"], "nearest": [], "concern": "", "check": "Claude's reading: ACCESSIBILITY.md step 5 and the code agree: VoiceOver via WebDriverAgent's enable/disable, undo run at session end; simulators and Apple TV are refused (axsettings.go:93)."} +{"id": "g069", "question": "I want one test to run with VoiceOver on, on a real iPhone, without leaving the phone with VoiceOver on afterward. How do I do that with Mobium?", "kind": "fact", "category": "how-to", "persona": "test-author", "gold": ["docs/ACCESSIBILITY.md#5-a-screen-reader-as-a-setting-built"], "facts": [{"fact": "`mobium accessibility screen_reader on` (app_accessibility, setting screen_reader) turns VoiceOver on an iPhone on iOS 27, confirmed by reading back.", "anchors": [["screen_reader on"]]}, {"fact": "It is put back as found when the session ends; on a phone the session's restore is the only safe way to turn it on.", "anchors": [["put back when the session ends"]]}], "new_since_pin": true, "verified_in": ["internal/agent/schema.go:1624", "internal/mobiumdriver/axsettings.go:89", "internal/agent/accessibility.go:18", "internal/agent/accessibility.go:134"], "nearest": [], "concern": "", "check": "Claude's reading: ACCESSIBILITY.md step 5 and the code agree: VoiceOver via WebDriverAgent's enable/disable, undo run at session end; simulators and Apple TV are refused (axsettings.go:93). Re-pinned 2026-11-26 to 767cd14: \"iOS 27\" is now common in the corpus, so it is no longer an anchor; the fact still says it."} {"id": "g070", "question": "With VoiceOver turned on on an iPhone, what does `mobium tap` actually do, and what happens if my test tries to swipe?", "kind": "fact", "category": "behavior", "persona": "test-author", "gold": ["docs/ACCESSIBILITY.md#1-a-tap-with-voiceover-on-lands-or-is-refused-built-243"], "facts": [{"fact": "A tap touches the target to move VoiceOver's cursor, reads the cursor back, and double-taps to activate it (also for check, an alert's button and a dialog rule).", "anchors": [["double-tap"]]}, {"fact": "Every other touch, such as a swipe, is refused naming VoiceOver.", "anchors": [["refused naming VoiceOver"]]}], "new_since_pin": true, "verified_in": ["internal/agent/screenreader.go:23", "internal/mobiumdriver/voiceover.go:111", "internal/mobiumdriver/voiceover.go:120"], "nearest": [], "concern": "", "check": "Claude's reading: ACCESSIBILITY.md step 1 matches screenreader.go touch() (FocusAt, compare spoken name, ActivateFocused) and voiceOverGuard refusing other touches. A cursor landing elsewhere is refused (screenreader.go:35); SETUP.md#with-a-screen-reader-on says the same in brief."} {"id": "g071", "question": "`mobium speech` on my Android emulator with TalkBack on refuses and says nothing is logged. What do I have to change?", "kind": "fact", "category": "troubleshooting", "persona": "test-author", "gold": ["docs/ACCESSIBILITY.md#2-hear-the-screen-reader-appspeech-built"], "facts": [{"fact": "TalkBack's sentence is read from its log, which holds it only with TalkBack's Developer settings' Log output level at VERBOSE.", "anchors": [["VERBOSE"], ["Log output level"]]}, {"fact": "Mobium does not set that level itself — it is TalkBack's own preference — and refuses, naming it, while nothing is logged.", "anchors": []}], "new_since_pin": true, "verified_in": ["internal/device/talkback.go:31", "internal/device/talkback.go:250"], "nearest": [], "concern": "", "check": "Claude's reading: ACCESSIBILITY.md step 2 and talkback.go's ErrTalkBackQuiet agree (remedy: Advanced settings > Developer settings > Log output level VERBOSE). The doc also warns verbose logging puts everything TalkBack says in the device log."} {"id": "g072", "question": "How can I check what TalkBack announces right after my test taps an 'Add to cart' button that updates a live region?", "kind": "fact", "category": "how-to", "persona": "test-author", "gold": ["docs/ACCESSIBILITY.md#2-hear-the-screen-reader-appspeech-built"], "facts": [{"fact": "Run `mobium speech --listen start` before the action and `mobium speech --listen stop` after it; the stop answers with every sentence said in between.", "anchors": [["--listen start"], ["--listen stop"]]}, {"fact": "It must start before the action because a live region's change was said about 0.4 seconds after the tap, before a later call could arrive.", "anchors": [["0.4 seconds"]]}], "new_since_pin": true, "verified_in": ["cmd/mobium/speech.go:53", "internal/agent/speech.go:39", "internal/agent/speech.go:742"], "nearest": [], "concern": "", "check": "Claude's reading: ACCESSIBILITY.md step 2 'Listening' describes it; speech.go refuses listen together with a target or walk. On Android each sentence carries a cause (focus, announcement, change); on an iPhone VoiceOver is polled and has none."} @@ -83,7 +83,7 @@ {"id": "g083", "question": "When one of Mobium's tools fails over MCP, does my client get a JSON-RPC error, and what in the reply should my agent decide on?", "kind": "fact", "category": "behavior", "persona": "agent-builder", "gold": ["docs/guides/mcp.md#5-failures"], "facts": [{"fact": "A failed tool answers with a normal result marked `isError: true`, never a protocol error, which is kept for a malformed request.", "anchors": [["isError"]]}, {"fact": "The structured half carries a code, the message, a remedy and whether retrying could help; the agent should decide by the code and read the remedy.", "anchors": [["retryable"]]}], "new_since_pin": false, "verified_in": ["internal/agent/server.go:163", "internal/agent/server.go:188", "internal/mobiumerr/mobiumerr.go:183"], "nearest": [], "concern": "", "check": "Claude's reading: server.go's CallTool returns ErrorResult (isError true, structuredContent from mobiumerr.PayloadOf) for any tool failure and a JSON-RPC error only for unparseable params, as the guide's section 5 says."} {"id": "g084", "question": "Why does `mobium mcp` run the tools inside its own process instead of going through the daemon the way the language clients do?", "kind": "fact", "category": "rationale", "persona": "contributor", "gold": ["docs/ARCHITECTURE.md#the-whole-system"], "facts": [{"fact": "The MCP server runs the tool layer in-process because an MCP client already holds a long-lived connection of its own.", "anchors": [["long-lived connection"]]}, {"fact": "The clients go through the daemon (via `mobium pipe`) because a device-side server holds one session at a time, so a client with its own session would invalidate the CLI's.", "anchors": [["one session at a time"], ["mobium pipe"]]}], "new_since_pin": false, "verified_in": ["cmd/mobium/mcp_cmd.go:22", "cmd/mobium/pipe.go"], "nearest": [], "concern": "", "check": "Claude's reading: both reasons are the bullets under ARCHITECTURE's diagram (part ~2 of the section); mcp_cmd.go's comment gives the same reason for running agent.NewServer in-process."} {"id": "g085", "question": "What happens if my agent's MCP server and a `mobium` command in my terminal drive the same phone at the same time?", "kind": "fact", "category": "behavior", "persona": "agent-builder", "gold": ["docs/guides/mcp.md#6-sessions-and-sharing-a-device"], "facts": [{"fact": "A device's automation server holds one session at a time, so the two take it from each other; each recovers, but neither is reliable.", "anchors": [["one session at a time"]]}, {"fact": "Give each its own device, or take turns.", "anchors": [["take turns"]]}], "new_since_pin": false, "verified_in": ["cmd/mobium/mcp_cmd.go:22", "internal/agent/session.go"], "nearest": [], "concern": "", "check": "Claude's reading: section 6 of the MCP guide states this; the code confirms the MCP server keeps its own sessions in-process (mcp_cmd.go) while the CLI's are in the daemon, so nothing arbitrates between them. The collision itself is a device-side fact I did not reproduce."} -{"id": "g086", "question": "I wrote a driver script, and `mobium map --driver mything` answers that there is no built-in backend by that name. How does Mobium look for third-party drivers?", "kind": "fact", "category": "troubleshooting", "persona": "driver-author", "gold": ["examples/drivers/PROTOCOL.md#discovery"], "facts": [{"fact": "`--driver mything` looks for a built-in backend first, then for an executable named `mobium-driver-mything` on PATH.", "anchors": [["mobium-driver-"]]}, {"fact": "`MOBIUM_DRIVER_` overrides the path for one backend, for developing a driver without installing it.", "anchors": [["MOBIUM_DRIVER_"]]}, {"fact": "`mobium doctor` lists the drivers it can find.", "anchors": [["mobium doctor"]]}], "new_since_pin": false, "verified_in": ["internal/mobiumdriver/external.go:102", "internal/mobiumdriver/external.go:106", "internal/mobiumdriver/external.go:114"], "nearest": [], "concern": "internal/mobiumdriver/external.go:116-121: the refusal says that after setting MOBIUM_DRIVER_ you must run `mobium daemon stop`, because the daemon is what looks for drivers and a running one keeps the environment it started with. Neither PROTOCOL.md#discovery nor README.md#developing-without-installing says so, so following the docs with a daemon already running still fails.", "check": "Claude's reading: FindDriver checks MOBIUM_DRIVER_ (dashes and dots become underscores), then exec.LookPath(\"mobium-driver-\"+name), and refuses with the message the docs quote. See the concern: the code's refusal adds a step the docs leave out."} +{"id": "g086", "question": "I wrote a driver script, and `mobium map --driver mything` answers that there is no built-in backend by that name. How does Mobium look for third-party drivers?", "kind": "fact", "category": "troubleshooting", "persona": "driver-author", "gold": ["examples/drivers/PROTOCOL.md#discovery"], "facts": [{"fact": "`--driver mything` looks for a built-in backend first, then for an executable named `mobium-driver-mything` on PATH.", "anchors": [["mobium-driver-"]]}, {"fact": "MOBIUM_DRIVER_ overrides the path for one backend, for developing a driver without installing it; run mobium daemon stop after setting it, since a running daemon keeps the environment it started with.", "anchors": [["MOBIUM_DRIVER_"], ["the environment it started with"]]}, {"fact": "`mobium doctor` lists the drivers it can find.", "anchors": [["mobium doctor"]]}], "new_since_pin": false, "verified_in": ["internal/mobiumdriver/external.go:102", "internal/mobiumdriver/external.go:106", "internal/mobiumdriver/external.go:114"], "nearest": [], "concern": "", "check": "Claude's reading: FindDriver checks MOBIUM_DRIVER_ (dashes and dots become underscores), then exec.LookPath(\"mobium-driver-\"+name), and refuses with the message the docs quote. See the concern: the code's refusal adds a step the docs leave out. Re-pinned 2026-11-26 to 767cd14: PROTOCOL.md now gives the daemon stop step (fixed in mobium#275), so it is in the second fact and the concern is gone."} {"id": "g087", "question": "My third-party driver leaves `text` out of its capabilities. What happens when someone runs `mobium type` against it?", "kind": "fact", "category": "behavior", "persona": "driver-author", "gold": ["examples/drivers/PROTOCOL.md#handshake"], "facts": [{"fact": "Mobium wires up only the capabilities a driver names, so it never asks the driver to type.", "anchors": [["only the capabilities named"]]}, {"fact": "The command is refused and the user is told to use a different backend, rather than the driver being asked and failing.", "anchors": [["different backend"]]}], "new_since_pin": false, "verified_in": ["internal/mobiumdriver/external.go:202", "internal/mobiumdriver/capability.go:106", "internal/agent/handlers.go:2214"], "nearest": [], "concern": "internal/agent/handlers.go:2214: the refusal for any backend without text entry says \"use the uiautomator2 backend (`--driver uiautomator2`, the default)\" — a remedy that cannot work for a non-Android driver such as a TV, against CONTRIBUTING's rule that a remedy must be one that can work.", "check": "Claude's reading: external.go keeps only known advertised capabilities, AsTextEntry requires CapText, and handlers.go refuses with code unsupported. The refusal's wording is worth a look (concern)."} {"id": "g088", "question": "My driver for a TV with a D-pad marks the node holding input focus as `focused` in its snapshot. What does Mobium do with it?", "kind": "fact", "category": "behavior", "persona": "driver-author", "gold": ["examples/drivers/PROTOCOL.md#the-hierarchy"], "facts": [{"fact": "`map` shows the node's state as `(button, focused)`.", "anchors": [["(button, focused)"]]}, {"fact": "On a device with a D-pad it is what select will press and how a D-pad press is read back, so a TV driver should send it.", "anchors": [["D-pad"]]}], "new_since_pin": true, "verified_in": ["internal/uitree/wire.go:43", "internal/uitree/wire.go:133", "internal/uitree/snapshot.go:80", "internal/agent/mapdiff.go:184"], "nearest": [], "concern": "", "check": "Claude's reading: WireNode.Focused is carried into the node (wire.go) and map appends the \"focused\" state (snapshot.go). The paragraph was added to PROTOCOL.md after 7b590a4 (#259, CHALLENGES 355)."} {"id": "g089", "question": "How do I make Mobium find my Python driver script on Windows, where there is no shebang line or execute bit?", "kind": "fact", "category": "how-to", "persona": "driver-author", "gold": ["examples/drivers/README.md#the-smallest-driver-that-works"], "facts": [{"fact": "Name it `mobium-driver-mything.exe`, or give the script a wrapper named `mobium-driver-mything.cmd` containing `@python \"%~dp0mobium-driver-mything.py\"`.", "anchors": [["mobium-driver-mything.cmd"]]}, {"fact": "Anything listed in PATHEXT is found the same way, and `mobium doctor` reports the driver as `mything` either way.", "anchors": [["PATHEXT"]]}, {"fact": "It was run on Windows 11 on 2026-10-22: the reference driver through such a wrapper mapped the same 11 elements as the built-in backend.", "anchors": [["Windows 11"]]}], "new_since_pin": true, "verified_in": ["internal/mobiumdriver/external.go:114"], "nearest": [], "concern": "", "check": "Claude's reading: the lookup is exec.LookPath(\"mobium-driver-\"+name), which honors PATHEXT on Windows; the Windows 11 run sentence replaced \"not yet run there\" after 7b590a4 (#270)."} @@ -92,9 +92,9 @@ {"id": "g092", "question": "The .NET client is not on NuGet yet. How do I add it to my project?", "kind": "fact", "category": "how-to", "persona": "test-author", "gold": ["docs/quickstart/dotnet.md#2-install-the-client"], "facts": [{"fact": "Clone the repository and build a local package with `dotnet pack` from clients/dotnet/Mobium into a folder.", "anchors": [["dotnet pack"]]}, {"fact": "Add it with `dotnet add package Mobium --version 0.1.0 --source `.", "anchors": [["--source"]]}], "new_since_pin": false, "verified_in": ["clients/dotnet/Mobium/Mobium.csproj:29", "clients/dotnet/Mobium/Mobium.csproj:30"], "nearest": [], "concern": "", "check": "Claude's reading: the csproj's PackageId is Mobium and Version 0.1.0, matching the quickstart's `--version 0.1.0`."} {"id": "g093", "question": "Why would a pull request that adds a separate implementation of some behavior just for the MCP server be pushed back on in Mobium?", "kind": "fact", "category": "rationale", "persona": "contributor", "gold": ["CONTRIBUTING.md#the-design-rule"], "facts": [{"fact": "Mobium's design rule, mutatis mutandis, is to carry the existing thing with only the necessary changes, not a parallel implementation; a change that duplicates a layer is almost always the wrong one.", "anchors": [["Mutatis mutandis"], ["duplicates a layer"]]}, {"fact": "Behavior lives in internal/agent and the CLI only parses flags and calls a tool by name, so the MCP surface and every client get it too.", "anchors": [["internal/agent"]]}], "new_since_pin": false, "verified_in": ["cmd/mobium/mcp_cmd.go:25", "internal/apisurface/surface_test.go:50"], "nearest": [], "concern": "", "check": "Claude's reading: CONTRIBUTING's design rule says both; the code matches — `mobium mcp` serves agent.NewServer, the same tool layer the daemon dispatches to, and apisurface fails the build on drift between front doors."} {"id": "g094", "question": "I'm driving a real Android phone on the office Wi-Fi with Mobium's default driver. Can others on that network get at the phone while my session is open, and what does Mobium offer instead?", "kind": "fact", "category": "behavior", "persona": "test-author", "gold": ["docs/upstream/uiautomator2-server-binds-every-interface.md#what-mobium-does-meanwhile"], "facts": [{"fact": "Yes: the session's answer says the UiAutomator2 server answers on the phone's network until the session ends.", "anchors": [["phone's network"]]}, {"fact": "It names `--driver uiautomator`, which drives the phone through `uiautomator dump` over adb and listens on nothing.", "anchors": [["--driver uiautomator"], ["listens on nothing"]]}], "new_since_pin": false, "verified_in": ["internal/agent/session.go:31", "internal/agent/session.go:373"], "nearest": [], "concern": "", "check": "Claude's reading: sessionExposure returns the warning only for the uiautomator2 backend on a non-emulator device; its text also says the uiautomator driver reads at about 2 s a screen and cannot type, which this section does not mention."} -{"id": "g095", "question": "The MCP guide shows `tools/list` answering 71 tools, but `mobium mcp` lists 75 for me. Is my install wrong?", "kind": "multi", "category": "troubleshooting", "persona": "agent-builder", "gold": ["docs/API.md#the-numbers", "docs/guides/mcp.md#mcp-mobium-as-an-agents-tools"], "facts": [{"fact": "No: the generated tool surface in API.md counts 75 tools today.", "anchors": [["75"]]}, {"fact": "The guide's transcripts are from a run on 2026-09-28, and its full tool list is the generated API.md.", "anchors": []}], "new_since_pin": true, "verified_in": ["internal/agent/schema.go:1966", "internal/agent/schema.go:2007", "docs/api/surface.json"], "nearest": [], "concern": "docs/guides/mcp.md:126 and :296 and docs/quickstart/mcp.md:134 and :166 still say 71 tools; the code (internal/agent/schema.go) has 75, and API.md said 73 at the pin. The guide and quickstart are stale.", "check": "Claude's reading: schema.go defines 75 app_ tools; app_speech and app_assistant were added after 7b590a4 (73 at the pin). A right answer needs API.md for the count and the guide's intro for why its number is older."} +{"id": "g095", "question": "The MCP guide shows tools/list answering 71 tools, but mobium mcp lists 78 for me. Is my install wrong?", "kind": "multi", "category": "troubleshooting", "persona": "agent-builder", "gold": ["docs/API.md#the-numbers", "docs/guides/mcp.md#mcp-mobium-as-an-agents-tools"], "facts": [{"fact": "No: the generated tool surface in API.md counts 78 tools today.", "anchors": [["78"]]}, {"fact": "The guide's transcripts are from a run on 2026-09-28, and its full tool list is the generated API.md.", "anchors": []}], "new_since_pin": true, "verified_in": ["internal/agent/schema.go:1966", "internal/agent/schema.go:2007", "docs/api/surface.json"], "nearest": [], "concern": "docs/guides/mcp.md still says \"on 2026-10-24 it answers 75\" (section 3) and \"The same 75 tools behind each\" (Which front door), where API.md and its own section 7 say 78. The 71 is dated, the 75s are not.", "check": "Claude's reading: schema.go defines 75 app_ tools; app_speech and app_assistant were added after 7b590a4 (73 at the pin). A right answer needs API.md for the count and the guide's intro for why its number is older. Re-pinned 2026-11-26 to 767cd14: API.md counts 78 (app_recording, app_verdict and app_check since mobium#281); the question and first fact say 78."} {"id": "g096", "question": "My driver should let Mobium scroll and use scroll-to. What do I have to advertise and implement?", "kind": "multi", "category": "how-to", "persona": "driver-author", "gold": ["examples/drivers/README.md#capabilities", "examples/drivers/PROTOCOL.md#methods"], "facts": [{"fact": "Advertise the `gestures` capability in the initialize reply; it unlocks scrolling, scroll-to and long press.", "anchors": []}, {"fact": "Implement `swipe` taking x1, y1, x2, y2 and durationMs (and `longPress` taking x, y, durationMs), in device pixels.", "anchors": [["durationMs"]]}], "new_since_pin": false, "verified_in": ["internal/mobiumdriver/external.go:318", "internal/mobiumdriver/external.go:324"], "nearest": [], "concern": "", "check": "Claude's reading: README's capabilities table maps gestures to swipe and longPress and what they unlock; PROTOCOL's methods table has the parameters, which External.Swipe and LongPress send exactly."} {"id": "g097", "question": "I want two agents, each driving its own Android emulator through Mobium's MCP server at the same time. How do I set them up so they don't get in each other's way?", "kind": "multi", "category": "how-to", "persona": "agent-builder", "gold": ["docs/guides/mcp.md#1-connect-it", "docs/guides/mcp.md#6-sessions-and-sharing-a-device"], "facts": [{"fact": "Pin each server to its own device, e.g. `mobium mcp --device emulator-5554` in each client's configuration.", "anchors": [["--device emulator-5554"]]}, {"fact": "Each `mobium mcp` runs the tools in its own process with its own device sessions, and a device's automation server holds one session at a time, so each agent needs its own device.", "anchors": [["one session at a time"], ["its own process"]]}], "new_since_pin": false, "verified_in": ["cmd/mobium/mcp_cmd.go:26", "internal/agent/server.go"], "nearest": [], "concern": "", "check": "Claude's reading: SetDefaultDevice is set from the global --device in mcp_cmd.go; that two servers on two different devices work together is implied by section 6 rather than stated as a run, which a reviewer may want to weigh."} -{"id": "g098", "question": "Can I put Mobium into a read-only mode so my agent can look at the screen but never act on the device?", "kind": "multi", "category": "support", "persona": "agent-builder", "gold": ["docs/THREAT-MODEL.md#the-llm-top-10", "docs/guides/mcp.md#3-what-a-client-sees"], "facts": [{"fact": "Not in Mobium itself: a read-only mode Mobium enforces, and a tool allowlist, are listed as open.", "anchors": [["read-only mode"]]}, {"fact": "Every MCP tool carries `readOnlyHint`, true only for the tools that only read (`app_map`, `app_text`, `app_state` and the like), so the agent's harness can allow only reads.", "anchors": [["readOnlyHint"]]}], "new_since_pin": false, "verified_in": ["internal/agent/readonly.go:13", "internal/agent/schema.go:2243", "cmd/mobium/mcp_cmd.go:11"], "nearest": [], "concern": "", "check": "Claude's reading: readonly.go lists 19 read-only tools and schema.go sets readOnlyHint from it; `mobium mcp` has no read-only flag. Unrelated defect seen while checking: app_network's new `proxy` argument is missing from readUnless in readonly.go, so IsReadCall treats a proxy-setting call as a read for the test runner's expect."} +{"id": "g098", "question": "Can I put Mobium into a read-only mode so my agent can look at the screen but never act on the device, and how is that different from trusting each tool's readOnlyHint?", "kind": "multi", "category": "support", "persona": "agent-builder", "gold": ["docs/guides/mcp.md#7-limiting-what-an-agent-can-do", "docs/guides/mcp.md#3-what-a-client-sees"], "facts": [{"fact": "Yes: mobium mcp --read-only, or MOBIUM_READ_ONLY=1, set by whoever starts Mobium and never by a call; an acting call is refused as not_permitted before it reaches the device.", "anchors": [["not_permitted"]]}, {"fact": "readOnlyHint is true only for the tools that only read, so a harness relying on it allows those alone.", "anchors": [["the 22 that only read"]]}, {"fact": "Under --read-only, tools/list offers 36 of the 78, including tools such as app_alert that read unless told to act, and refuses only the acting form.", "anchors": [["36 of the 78"]]}], "new_since_pin": true, "verified_in": ["internal/agent/policy.go:31", "internal/mobiumerr/mobiumerr.go:74"], "nearest": [], "concern": "docs/guides/mcp.md#3-what-a-client-sees says \"on 2026-10-24 it answers 75, still 19 read-only\" and then \"true for the 22 that only read\"; one of the two counts is stale.", "check": "Claude's reading: the answer flipped since f232d54, when the threat model listed a read-only mode as open. Section 7 gives the mode, section 3 the hint; policy.go reads MOBIUM_READ_ONLY. The threat model's LLM06 row says the same in brief and is a near miss."} {"id": "g099", "question": "How many tool calls per minute will Mobium's MCP server accept before it starts throttling my agent?", "kind": "unanswerable", "category": "", "persona": "agent-builder", "gold": [], "facts": [], "new_since_pin": false, "verified_in": ["internal/agent/server.go:43"], "nearest": ["docs/THREAT-MODEL.md#the-llm-top-10", "docs/guides/mcp.md#6-sessions-and-sharing-a-device"], "concern": "", "check": "Claude's reading: no rate limit is stated anywhere in the corpus, and the code has none (grep for rate limit or throttle in internal/agent and cmd/mobium finds only Android's crash-record limit); the threat model's unbounded-consumption row lists per-call timeouts, batches of at most 100 steps and backgrounding of at most 180 s, which a retriever will bring back."} {"id": "g100", "question": "When will Mobium's Python client be published on PyPI so I can just run pip install mobium?", "kind": "unanswerable", "category": "", "persona": "test-author", "gold": [], "facts": [], "new_since_pin": false, "verified_in": ["clients/python"], "nearest": ["docs/quickstart/python.md#2-install-the-client", "docs/ROADMAP.md#next"], "concern": "", "check": "Claude's reading: the quickstart says only that `pip install mobium` works after the first release, and the roadmap lists the registry accounts to set up; no date for the first release or the PyPI publish is given anywhere in the corpus."} diff --git a/data/retrieval-experiments.md b/data/retrieval-experiments.md new file mode 100644 index 0000000..780a451 --- /dev/null +++ b/data/retrieval-experiments.md @@ -0,0 +1,156 @@ +# Retrieval experiments + +Generated by `uv run python -m mobium_rag.experiments` from cached embeddings and reranker scores (data/index/experiments/; a cold run takes about an hour, most of it the bge reranker). Every change is measured against the two-stage retriever the gate runs — bi-encoder top 20, MiniLM reranker reading the file name — question by question, with a paired bootstrap (4,000 resamples, 95% interval). **✓** marks an interval above zero, **✗** one below; a change counts only with a ✓. + +**Questions.** Chosen on `dev`, confirmed on `held-out`: golden set v2 (`data/golden-v2-proposed.jsonl`, 100 questions at `767cd14`, **not yet reviewed by a person**) split in two by area and kind (`split_v2`, seed 0): 45 and 45 questions with gold. The gate's 81 reviewed questions at `7b590a4` are run last, as a confirmation; nothing was chosen on them. + +**Columns.** recall@5, MRR and nDCG@5 over the 5 sections returned (MRR is over those 5). first@N: the share of gold sections among the first stage's N candidates, before any reranking. ceiling@5: recall@5 if the reranker put every gold candidate of its pool first — the most any reranker of that pool could reach. Time is under [Cost](#cost). + +## What was found + +- **Nothing held on held-out questions.** Of the four configurations fixed on dev, none excluded zero on held-out or on the gate. The fullest, C (bge on a hybrid pool of 50, heading path, 5 sections), was the only one ahead on every metric of both, by 0.012 to 0.056; B, bge alone with the heading path, fell behind on the gate. The floors stay where they are (evaluate.py). +- **The first stage is not where most of the loss is.** Dense first@50 is 0.87 to 0.97 across the sets; hybrid BM25 + dense raises the pool's ceiling (to 0.956 on dev, 0.967 on held-out, 0.969 on the gate) and the reranker turns little of it into recall@5. A wider pool alone lowers MRR: MiniLM ranks more distractors above the gold. +- **The "runs on X" class is mostly a labeling question, not a ranking one.** See [below](#the-runs-on-x-class). +- **Structural chunking is robust and less accurate.** The one-bullet edit of mobiumdev/mobium#194 changed 9 chunks under today's chunking and moved a question; cut at list items it changed 2 and moved none. It lost recall@5 on held-out (0.722 against 0.789), so it is not adopted. +- **5 distinct sections never hurts.** Returning the reranker's best part of each section, rather than 5 parts that may repeat one, keeps every section the baseline returns, in its order, and fills the slots repeats took: no metric can fall. Alone on dev it raised recall@5 by 0.022, at the edge of zero. + +## Dev: one change at a time + +### Dev, 767cd14 + +Controls: oracle 1.000 / 1.000 / 1.000, random 0.022 / 0.013 / 0.014 (recall@5 / MRR / nDCG@5) — the metrics move both ways. + +| Configuration | recall@5 | MRR | nDCG@5 | first@20 | first@50 | first@100 | ceiling@5 | Δ recall@5 (95%) | Δ MRR (95%) | Δ nDCG@5 (95%) | +|---|---|---|---|---|---|---|---|---|---|---| +| two-stage (baseline) | 0.733 | 0.627 | 0.626 | 0.844 | 0.867 | 0.867 | 0.844 | — | — | — | +| pool 50 | 0.711 | 0.616 | 0.614 | 0.844 | 0.867 | 0.867 | 0.867 | -0.022 (-0.078 to +0.022) | -0.011 (-0.028 to +0.000) | -0.012 (-0.041 to +0.012) | +| pool 100 | 0.711 | 0.614 | 0.614 | 0.844 | 0.867 | 0.867 | 0.867 | -0.022 (-0.078 to +0.022) | -0.012 (-0.030 to +0.000) | -0.012 (-0.041 to +0.011) | +| BM25 alone, pool 20 | 0.733 | 0.641 | 0.635 | 0.878 | 0.922 | 0.944 | 0.878 | +0.000 (-0.089 to +0.089) | +0.014 (-0.034 to +0.076) | +0.009 (-0.045 to +0.073) | +| hybrid (BM25 + dense, RRF), pool 20 | 0.722 | 0.611 | 0.619 | 0.867 | 0.956 | 0.956 | 0.867 | -0.011 (-0.067 to +0.033) | -0.016 (-0.034 to -0.003) **✗** | -0.007 (-0.035 to +0.019) | +| hybrid, pool 50 | 0.689 | 0.627 | 0.618 | 0.867 | 0.956 | 0.956 | 0.956 | -0.044 (-0.133 to +0.044) | +0.000 (-0.039 to +0.056) | -0.008 (-0.060 to +0.053) | +| heading path, bi-encoder | 0.733 | 0.625 | 0.626 | 0.856 | 0.867 | 0.944 | 0.856 | +0.000 (+0.000 to +0.000) | -0.002 (-0.014 to +0.010) | -0.000 (-0.010 to +0.009) | +| heading path, reranker | 0.767 | 0.674 | 0.665 | 0.844 | 0.867 | 0.867 | 0.844 | +0.033 (+0.000 to +0.089) | +0.047 (-0.030 to +0.133) | +0.039 (-0.017 to +0.109) | +| heading path, both | 0.744 | 0.664 | 0.653 | 0.856 | 0.867 | 0.944 | 0.856 | +0.011 (-0.056 to +0.078) | +0.037 (-0.041 to +0.127) | +0.027 (-0.034 to +0.099) | +| 5 distinct sections | 0.756 | 0.632 | 0.636 | 0.844 | 0.867 | 0.867 | 0.844 | +0.022 (+0.000 to +0.067) | +0.006 (+0.000 to +0.017) | +0.010 (+0.000 to +0.029) | +| structural chunks | 0.733 | 0.658 | 0.646 | 0.833 | 0.878 | 0.911 | 0.833 | +0.000 (-0.033 to +0.033) | +0.031 (-0.043 to +0.106) | +0.020 (-0.036 to +0.078) | +| bge reranker, with path | 0.800 | 0.713 | 0.711 | 0.844 | 0.867 | 0.867 | 0.844 | +0.067 (-0.022 to +0.167) | +0.086 (-0.006 to +0.183) | +0.085 (+0.010 to +0.159) **✓** | + +## Dev: stacked + +The bge reranker gained most alone and the hybrid pool left the most ceiling, so the next round put a stronger reranker on the wider pool and added the changes that did not hurt. + +### Dev, 767cd14 + +Controls: oracle 1.000 / 1.000 / 1.000, random 0.022 / 0.013 / 0.014 (recall@5 / MRR / nDCG@5) — the metrics move both ways. + +| Configuration | recall@5 | MRR | nDCG@5 | first@20 | first@50 | first@100 | ceiling@5 | Δ recall@5 (95%) | Δ MRR (95%) | Δ nDCG@5 (95%) | +|---|---|---|---|---|---|---|---|---|---|---| +| two-stage (baseline) | 0.733 | 0.627 | 0.626 | 0.844 | 0.867 | 0.867 | 0.844 | — | — | — | +| bge | 0.800 | 0.713 | 0.711 | 0.844 | 0.867 | 0.867 | 0.844 | +0.067 (-0.022 to +0.167) | +0.086 (-0.006 to +0.183) | +0.085 (+0.010 to +0.159) **✓** | +| bge, hybrid pool 20 | 0.800 | 0.680 | 0.692 | 0.867 | 0.956 | 0.956 | 0.867 | +0.067 (-0.022 to +0.156) | +0.054 (-0.041 to +0.152) | +0.066 (-0.003 to +0.138) | +| bge, hybrid pool 50 | 0.811 | 0.693 | 0.706 | 0.867 | 0.956 | 0.956 | 0.956 | +0.078 (-0.033 to +0.189) | +0.067 (-0.042 to +0.183) | +0.080 (-0.010 to +0.176) | +| bge, heading path | 0.800 | 0.739 | 0.731 | 0.844 | 0.867 | 0.867 | 0.844 | +0.067 (-0.022 to +0.167) | +0.112 (+0.018 to +0.212) **✓** | +0.104 (+0.025 to +0.188) **✓** | +| bge, 5 distinct sections | 0.800 | 0.713 | 0.711 | 0.844 | 0.867 | 0.867 | 0.844 | +0.067 (-0.022 to +0.167) | +0.086 (-0.006 to +0.183) | +0.085 (+0.010 to +0.159) **✓** | +| bge, hybrid 50, 5 sections | 0.811 | 0.693 | 0.706 | 0.867 | 0.956 | 0.956 | 0.956 | +0.078 (-0.033 to +0.189) | +0.067 (-0.042 to +0.183) | +0.080 (-0.010 to +0.176) | +| bge, hybrid 50, heading path, 5 sections | 0.856 | 0.717 | 0.734 | 0.867 | 0.956 | 0.956 | 0.956 | +0.122 (+0.022 to +0.233) **✓** | +0.091 (-0.024 to +0.208) | +0.108 (+0.016 to +0.207) **✓** | +| MiniLM, heading path, 5 sections | 0.789 | 0.678 | 0.674 | 0.844 | 0.867 | 0.867 | 0.844 | +0.056 (+0.000 to +0.133) | +0.051 (-0.026 to +0.139) | +0.048 (-0.011 to +0.119) | + +## Confirmation + +Four configurations, fixed from the dev results before either set below was run (`FINAL`). + +### Held-out, 767cd14 + +Controls: oracle 1.000 / 1.000 / 1.000, random 0.022 / 0.011 / 0.011 (recall@5 / MRR / nDCG@5) — the metrics move both ways. + +| Configuration | recall@5 | MRR | nDCG@5 | first@20 | first@50 | first@100 | ceiling@5 | Δ recall@5 (95%) | Δ MRR (95%) | Δ nDCG@5 (95%) | +|---|---|---|---|---|---|---|---|---|---|---| +| two-stage (baseline) | 0.789 | 0.639 | 0.644 | 0.878 | 0.944 | 0.989 | 0.878 | — | — | — | +| A: MiniLM, heading path, 5 sections | 0.822 | 0.632 | 0.658 | 0.878 | 0.944 | 0.989 | 0.878 | +0.033 (+0.000 to +0.089) | -0.006 (-0.065 to +0.054) | +0.014 (-0.030 to +0.062) | +| B: bge, heading path | 0.811 | 0.669 | 0.684 | 0.878 | 0.944 | 0.989 | 0.878 | +0.022 (-0.067 to +0.122) | +0.031 (-0.060 to +0.128) | +0.040 (-0.038 to +0.122) | +| C: bge, hybrid 50, heading path, 5 sections | 0.811 | 0.661 | 0.683 | 0.967 | 0.967 | 0.989 | 0.967 | +0.022 (-0.078 to +0.133) | +0.023 (-0.069 to +0.123) | +0.039 (-0.044 to +0.127) | + +### Gate, 7b590a4 (reported last) + +Controls: oracle 1.000 / 1.000 / 1.000, random 0.012 / 0.013 / 0.008 (recall@5 / MRR / nDCG@5) — the metrics move both ways. + +| Configuration | recall@5 | MRR | nDCG@5 | first@20 | first@50 | first@100 | ceiling@5 | Δ recall@5 (95%) | Δ MRR (95%) | Δ nDCG@5 (95%) | +|---|---|---|---|---|---|---|---|---|---|---| +| two-stage (baseline) | 0.815 | 0.767 | 0.755 | 0.872 | 0.969 | 0.981 | 0.872 | — | — | — | +| A: MiniLM, heading path, 5 sections | 0.819 | 0.757 | 0.753 | 0.872 | 0.969 | 0.981 | 0.872 | +0.004 (-0.033 to +0.037) | -0.010 (-0.036 to +0.013) | -0.002 (-0.024 to +0.018) | +| B: bge, heading path | 0.809 | 0.743 | 0.734 | 0.872 | 0.969 | 0.981 | 0.872 | -0.006 (-0.053 to +0.043) | -0.024 (-0.073 to +0.024) | -0.021 (-0.066 to +0.023) | +| C: bge, hybrid 50, heading path, 5 sections | 0.870 | 0.779 | 0.781 | 0.924 | 0.969 | 0.988 | 0.969 | +0.056 (-0.019 to +0.130) | +0.012 (-0.052 to +0.077) | +0.026 (-0.037 to +0.092) | + +## The runs-on-X class + +Questions whose wording asks whether Mobium runs on, supports or drives something (`PLATFORM_Q`, fixed before any result). Recall@5 per question: + +| Question | Gold | two-stage (baseline) | A | B | C | C's top 3 sections | +|---|---|---|---|---|---|---| +| q041 Can Mobium drive iOS from a Windows machine? | docs/WINDOWS.md#android-only-ios-is-not-possible-on-windows, docs/SETUP.md#driving-another-machines-devices | 1.0 | 1.0 | 0.5 | 0.5 | docs/WINDOWS.md#android-only-ios-is-not-possible-on-windows, docs/ROADMAP.md#next, examples/drivers/README.md#writing-a-mobium-driver | +| q044 Can Mobium drive a Flutter app? | docs/APP-TYPES.md#cross-platform-or-native-once-removed | 1.0 | 1.0 | 1.0 | 1.0 | examples/drivers/README.md#writing-a-mobium-driver, docs/APP-TYPES.md#cross-platform-or-native-once-removed, docs/checks/README.md#running-several-at-once | +| q055 Does Mobium support HarmonyOS devices? | README.md#drivers-for-other-platforms | 0.0 | 0.0 | 0.0 | 0.0 | docs/ROADMAP.md#next, docs/WINDOWS.md#android-only-ios-is-not-possible-on-windows, docs/WINDOWS.md#what-to-try-in-order | +| q056 How do I drive a Galaxy Watch running Wear OS? | README.md#platforms | 1.0 | 1.0 | 1.0 | 1.0 | docs/SETUP.md#a-wear-os-emulator, README.md#platforms, docs/ROADMAP.md#next | +| q057 How do I connect Mobium to BrowserStack's device cloud? | docs/ROADMAP.md#under-consideration | 0.0 | 0.0 | 1.0 | 1.0 | docs/guides/mcp.md#1-connect-it, docs/ROADMAP.md#under-consideration, docs/quickstart/mcp.md#2-connect-an-agent | +| q058 Can Mobium automate a Tizen TV? | README.md#drivers-for-other-platforms | 1.0 | 1.0 | 0.0 | 0.0 | docs/SETUP.md#with-a-screen-reader-on, docs/ROADMAP.md#under-consideration, skills/mobile-check/SKILL.md#mobium-mobile-automation-cli-reference | +| q059 Does Mobium run on KaiOS phones? | README.md#drivers-for-other-platforms | 0.0 | 0.0 | 0.0 | 0.0 | docs/ROADMAP.md#next, docs/quickstart/java.md#notes, docs/ROADMAP.md#under-consideration | +| q060 How do I drive a BlackBerry device? | README.md#drivers-for-other-platforms | 0.0 | 0.0 | 0.0 | 0.0 | docs/ROADMAP.md#next, README.md#documentation, docs/SETUP.md#driving-another-machines-devices | +| q061 Can I run Mobium tests on Sauce Labs? | docs/ROADMAP.md#under-consideration | 0.0 | 0.0 | 0.0 | 0.0 | tests/README.md#tests, docs/guides/test-runner.md#10-a-page-to-run-tests-from---ui, docs/ROADMAP.md#not-planned | +| q078 Can Mobium automate a car's head unit? | examples/drivers/README.md#writing-a-mobium-driver | 1.0 | 1.0 | 1.0 | 1.0 | examples/drivers/README.md#writing-a-mobium-driver, skills/mobile-check/SKILL.md#mobium-mobile-automation-cli-reference, README.md#mobium | +| mean | | 0.500 | 0.500 | 0.450 | 0.450 | | + +Why they miss, read from the passages: + +- **HarmonyOS, KaiOS, BlackBerry (q055, q059, q060)**: the gold section, README "Drivers for other platforms", names none of them; it says a platform nobody has written is a driver. The passage every configuration ranks first, ROADMAP "Next", says "HarmonyOS, KaiOS and BlackBerry: no plans to implement at the moment; anyone can write a driver" — the answer, in a section the labels leave out. Whether it is gold is for the person reviewing the set; no retriever change should be judged by it until then. +- **Tizen, Sauce Labs (q058, q061)**: neither word is anywhere in the corpus, so keyword search cannot help, and the answer is a general rule. MiniLM finds the README section for Tizen; bge, reading for the platform's name, ranks a TV-related section above it, and neither finds the ROADMAP entry for Sauce Labs. A rewrite of the question into "supported platforms / drivers" would fix these by fitting them: it needs a model call, or a rule written for this class, and was not run. +- The gold section is among the first 100 candidates for 9 of the 10: the loss is the reranker's, and for q055, q059 and q060 it is right to prefer the passage that names the platform. + +v2 has 2 questions of this class (g007, g017); it should have more before a fix for the class can be chosen without the gate. + +## Robustness + +Each configuration again at the nearest commit that changed the docs. Only questions whose gold sections exist at both commits are counted. + +### Gate, 7b590a4 → 532898d + +| Configuration | Questions | recall@5 | MRR | Questions whose recall@5 moved | Chunk texts changed | +|---|---|---|---|---|---| +| two-stage (baseline) | 81 | 0.815 → 0.815 | 0.767 → 0.767 | none | 5 of 1009 | +| structural chunks | 81 | 0.815 → 0.815 | 0.759 → 0.759 | none | 5 of 1490 | +| A: MiniLM, heading path, 5 sections | 81 | 0.819 → 0.819 | 0.757 → 0.757 | none | 5 of 1009 | +| C: bge, hybrid 50, heading path, 5 sections | 81 | 0.870 → 0.870 | 0.779 → 0.779 | none | 5 of 1009 | + +### Held-out, 767cd14 → 0d5eaea + +| Configuration | Questions | recall@5 | MRR | Questions whose recall@5 moved | Chunk texts changed | +|---|---|---|---|---|---| +| two-stage (baseline) | 45 | 0.789 → 0.789 | 0.639 → 0.639 | none | 3 of 1176 | +| structural chunks | 45 | 0.722 → 0.722 | 0.572 → 0.572 | none | 1 of 1779 | +| A: MiniLM, heading path, 5 sections | 45 | 0.822 → 0.822 | 0.632 → 0.632 | none | 3 of 1176 | +| C: bge, hybrid 50, heading path, 5 sections | 45 | 0.811 → 0.811 | 0.661 → 0.661 | none | 3 of 1176 | + +### The ROADMAP edit of mobiumdev/mobium#194, 5b27730 → 663b4c8, gate questions + +| Configuration | Questions | recall@5 | MRR | Questions whose recall@5 moved | Chunk texts changed | +|---|---|---|---|---|---| +| two-stage (baseline) | 64 | 0.794 → 0.779 | 0.730 → 0.727 | q028 1.0→0.0 | 9 of 937 | +| structural chunks | 64 | 0.766 → 0.766 | 0.702 → 0.706 | none | 2 of 1397 | +| A: MiniLM, heading path, 5 sections | 64 | 0.750 → 0.750 | 0.734 → 0.734 | none | 9 of 937 | +| C: bge, hybrid 50, heading path, 5 sections | 64 | 0.766 → 0.766 | 0.729 → 0.741 | q057 0.0→1.0, q061 1.0→0.0 | 9 of 937 | + +## Cost + +Reranking one question, uncached (ms; `LATENCY`). The bge reranker is a 2.2 GB download; on CI's CPU it is the reason the gate leaves it out. + +| Reranker | Pool | Apple silicon (MPS) | CPU | +|---|---|---|---| +| MiniLM | 20 | 68 | 178 | +| MiniLM | 50 | 140 | 346 | +| bge | 20 | 1210 | 2612 | +| bge | 50 | 2572 | 5444 | + +## Not run + +- **Query rewriting, multi-query and HyDE**: each needs a model call per question, which makes retrieval non-deterministic unless cached, and the class it is most likely to help is the one with no held-out questions. +- **Synthetic section summaries (document expansion)**: one model call per section, 875 at this pin; the same objection, and the heading path, which is free, did not hold. +- **Label changes**: the misses above that are answered by an unlabeled section go to the v2 review, where a person decides. No label was changed to raise a score. diff --git a/review/GOLDEN-V2.md b/review/GOLDEN-V2.md index e63ffb3..4248e6c 100644 --- a/review/GOLDEN-V2.md +++ b/review/GOLDEN-V2.md @@ -5,8 +5,10 @@ questions, grew by additions to 82, and leans on what it was drafted from: three quarters of its gold is CHALLENGES entries, one question is unanswerable, and nothing in it covers what Mobium gained after `7b590a4`. Version 2 is written from nothing, against Mobium's public -`main` at **`f232d54`**, to this specification. The 82 stay in -`data/golden.jsonl` and keep the gate until v2 is reviewed and adopted. +`main` at `f232d54`, to this specification, and carried to **`767cd14`** +on 2026-11-26, before any of it was reviewed (`review/repin_v2.py` says +what changed and why). The 82 stay in `data/golden.jsonl` and keep the +gate until v2 is reviewed and adopted. A golden set is a test suite. Each question is a test case: it has one right answer, the answer is in the corpus, and a reader can say whether an @@ -102,7 +104,8 @@ One JSON object per line, in `data/golden-v2-proposed.jsonl`: ``` `check` is the drafter's reading, shown on the review page as Claude's — -the person decides; `review/apply.py` applies what they decided. +the person decides; `review/apply_v2.py` applies what they decided, into +`data/golden-v2.jsonl`. ## Checked by code before review diff --git a/review/apply_v2.py b/review/apply_v2.py new file mode 100644 index 0000000..05d5c4a --- /dev/null +++ b/review/apply_v2.py @@ -0,0 +1,124 @@ +"""Apply the golden v2 review's decisions to data/golden-v2.jsonl. + +The decisions are the v2 review page's `reviews` collection, exported with +ArtifactData: either a directory of one JSON file per question +(`review/decisions-v2/reviews/g001.json`, what `out_dir` writes) or one +JSON object keyed by id (`review/decisions-v2.json`). Each holds +`decision` (approve, edit, reject or null), `question` (the edited +wording), `also` (gold sections ticked), `facts` (the fact lines as the +reviewer left them, anchors in ⟦ ⟧) and `note`. + +A note's instructions ("DROP …", "ADD …", "kind fact") are copied by hand +into the tables below, so every change is read here rather than parsed out +of prose; every note is printed on each run so none is missed. + +The 82 in data/golden.jsonl keep the gate: this writes the reviewed v2 set +beside them, and adopting it is a separate decision (PLAN.md, Phase 6b). +An undecided question stays out and is counted. Every applied question is +held to the specification's rules for one question (check_golden_v2.py); +the set's quotas are reported, not enforced, since a rejection lowers them. + + uv run python review/apply_v2.py [decisions] [--commit 767cd14] +""" + +import json +import sys +from pathlib import Path + +from build_review_v2 import parse_fact_line +from check_golden_v2 import PIN, problems + +ROOT = Path(__file__).resolve().parent.parent +PROPOSED = ROOT / "data" / "golden-v2-proposed.jsonl" +GOLDEN = ROOT / "data" / "golden-v2.jsonl" +DECISIONS = [ROOT / "review" / "decisions-v2" / "reviews", ROOT / "review" / "decisions-v2.json"] + +# From the notes, word for word in effect. +DROP: dict[str, list[str]] = {} # gold sections the reviewer dropped +KIND: dict[str, str] = {} # a kind the reviewer changed +FOUND: dict[str, list[str]] = {} # defects in Mobium a question's review found: "CHALLENGES 362", "mobium#275" + +KEEP = ("id", "question", "kind", "category", "persona", "gold", "facts", "nearest", "new_since_pin") + + +def load_decisions(src: Path) -> dict[str, dict]: + if src.is_dir(): + return {p.stem: json.loads(p.read_text()) for p in sorted(src.glob("*.json"))} + return json.loads(src.read_text()) + + +def apply(proposed: list[dict], decisions: dict[str, dict]) -> tuple[list[dict], dict]: + """The reviewed set, and what happened to every question.""" + rows, report = [], {"approve": [], "edit": [], "reject": [], "undecided": [], "notes": {}} + for p in proposed: + d = decisions.get(p["id"]) or {} + verdict = d.get("decision") + if (d.get("note") or "").strip(): + report["notes"][p["id"]] = d["note"].strip() + if verdict is None: + report["undecided"].append(p["id"]) + continue + if verdict not in ("approve", "edit", "reject"): + raise SystemExit(f"{p['id']}: decision {verdict!r} is not approve, edit or reject") + report[verdict].append(p["id"]) + if verdict == "reject": + continue + r = {k: p[k] for k in KEEP if k in p} + if verdict == "edit" and (d.get("question") or "").strip(): + r["question"] = d["question"].strip() + r["kind"] = KIND.get(p["id"], r["kind"]) + gold = [g for g in r["gold"] if g not in DROP.get(p["id"], [])] + r["gold"] = gold + [g for g in d.get("also") or [] if g not in gold] + if d.get("facts"): + r["facts"] = [parse_fact_line(line) for line in d["facts"] if line.strip()] + if r["kind"] == "unanswerable" and (r["gold"] or r["facts"]): + raise SystemExit(f"{p['id']}: unanswerable with gold {r['gold']} — change its kind in KIND or drop the gold") + r["verified_in"] = p.get("verified_in", []) + if p["id"] in FOUND: + r["found"] = FOUND[p["id"]] + r["status"] = "reviewed" + rows.append(r) + return rows, report + + +def main(argv: list[str]) -> int: + import check_golden_v2 + from mobium_rag import corpus + from mobium_rag.checks import rarity + + commit = PIN + if "--commit" in argv: + k = argv.index("--commit") + commit, argv = argv[k + 1], argv[:k] + argv[k + 2:] + src = Path(argv[0]) if argv else next((s for s in DECISIONS if s.exists()), None) + if src is None: + raise SystemExit("no decisions: export the page's `reviews` collection to review/decisions-v2/ first") + proposed = [json.loads(line) for line in PROPOSED.read_text().splitlines() if line.strip()] + rows, report = apply(proposed, load_decisions(src)) + + check_golden_v2.PIN = commit + passages = corpus.build(commit) + sections: dict[str, str] = {} + for p in passages: + sid = corpus.section_of(p.id) + sections[sid] = sections.get(sid, "") + "\n" + p.text + found = problems(rows, sections, rarity([p.text for p in passages])) + ids = {r["id"] for r in rows} + own = [f for f in found if f.split(":")[0] in ids] + if own: + print("\n".join(own)) + print(f"{len(own)} problems in reviewed questions: fix them in the review, or in the tables here") + return 1 + GOLDEN.write_text("".join(json.dumps(r, ensure_ascii=False) + "\n" for r in rows)) + + print(f"{len(rows)} reviewed into {GOLDEN.relative_to(ROOT)} at {commit}: {len(report['approve'])} approved, " + f"{len(report['edit'])} edited, {len(report['reject'])} rejected, {len(report['undecided'])} undecided") + for line in (f for f in found if f.split(":")[0] not in ids): + print(f" quota: {line}") + for i, note in report["notes"].items(): + print(f" note {i}: {note}") + return 0 + + +if __name__ == "__main__": + sys.exit(main(sys.argv[1:])) diff --git a/review/build_review_v2.py b/review/build_review_v2.py index 6a602f7..382d481 100644 --- a/review/build_review_v2.py +++ b/review/build_review_v2.py @@ -2,7 +2,7 @@ the 82's, built from the same page with its questions taken out. For each drafted question: its gold sections with an excerpt, what the -two-stage retriever returns for it from the corpus at f232d54 with the gold +two-stage retriever returns for it from the corpus at 767cd14 with the gold marked, its key facts with their anchors, and Claude's check of it. The corpus.pin and the 82's index are not touched: the retrieval here is its own index, keyed by the commit. @@ -11,7 +11,7 @@ separated by " / ", anchors by " ; ". The reviewer edits the line; the apply step reads it back the same way (`fact_line`, `parse_fact_line`). - uv run python review/build_review_v2.py [questions.jsonl] [--commit f232d54] + uv run python review/build_review_v2.py [questions.jsonl] [--commit 767cd14] """ import json @@ -72,7 +72,7 @@ def entry(q: dict, index: Index, by_section: dict) -> dict: def main(argv: list[str]) -> None: - commit = "f232d54" + commit = "767cd14" if "--commit" in argv: k = argv.index("--commit") commit, argv = argv[k + 1], argv[:k] + argv[k + 2:] @@ -92,7 +92,7 @@ def main(argv: list[str]) -> None: page = page.replace("

Golden Set Review

", "

Golden Set v2 Review

") page = page.replace("Golden Set Review", "Golden Set v2 Review", 1) page = re.sub(r"\d+ questions · corpus", f"{len(qs)} questions · corpus", page, count=1) - page = page.replace("key facts drafted 2026-10-12", "drafted 2026-10-24 to review/GOLDEN-V2.md; " + page = page.replace("key facts drafted 2026-10-12", "drafted 2026-10-24 to review/GOLDEN-V2.md, re-pinned 2026-11-26; " "anchors follow each fact in ⟦ ⟧, alternatives split by / and anchors by ;") # Category, persona and whether it is new show beside the kind. page = page.replace('q.missed ? el("span",{class:"tag miss",text:"Missed by retrieval"}) : null,', diff --git a/review/check_golden_v2.py b/review/check_golden_v2.py index 3f17137..e3e2cb2 100644 --- a/review/check_golden_v2.py +++ b/review/check_golden_v2.py @@ -7,7 +7,7 @@ Prints each problem and exits 1 if there is any. Run from the repository root: - uv run python review/check_golden_v2.py [questions.jsonl] [--commit f232d54] + uv run python review/check_golden_v2.py [questions.jsonl] [--commit 767cd14] """ import json @@ -21,7 +21,7 @@ from mobium_rag.checks import normalize, present, rarity ROOT = corpus.ROOT -PIN = "f232d54" +PIN = "767cd14" KINDS = {"fact": 70, "multi": 20, "unanswerable": 10} CATEGORIES = {"how-to": 35, "behavior": 25, "troubleshooting": 15, "support": 8, "rationale": 7} PERSONAS = {"new-user", "test-author", "ci-engineer", "agent-builder", "driver-author", "contributor"} diff --git a/review/golden-review-v2.html b/review/golden-review-v2.html index a6e6740..f157afb 100644 --- a/review/golden-review-v2.html +++ b/review/golden-review-v2.html @@ -91,7 +91,7 @@

Golden Set v2 Review

-

mobium-rag · 100 questions · corpus at · drafted 2026-10-24 to review/GOLDEN-V2.md; anchors follow each fact in ⟦ ⟧, alternatives split by / and anchors by ; · each decision saves as you make it

+

mobium-rag · 100 questions · corpus at · drafted 2026-10-24 to review/GOLDEN-V2.md, re-pinned 2026-11-26; anchors follow each fact in ⟦ ⟧, alternatives split by / and anchors by ; · each decision saves as you make it

@@ -110,7 +110,7 @@

Golden Set v2 Review