Glean 拾遗
Daily · timeline

A few picks a day.

Thu, Aug 27, 2026 3picks
← 08-26
Calendar ▾
2026 · 08
has picks today
08-28 →
06:00

How Shopify pushed mobile E2E test stability to 98%

用视觉定位替换 Test ID:Shopify 将移动 E2E 稳定性拉到 98%

Shopify's largest mobile app had to pull E2E tests out of blocking CI because flakiness was rejecting more good PRs than bad. The root cause, they found, was the framework, not the tests: Appium's low-level flexibility let tests tap elements before the screen rendered, and shortcuts like pause(1000) accumulated. Instead of patching Appium, they built an opinionated wrapper. The API is builder-style: every step (tap, wait, type) must declare the expected resulting state, escape hatches are prefixed UNSAFE_ to discourage misuse, and the small grammar is predictable enough for AI agents to write correct tests without codebase knowledge. Element lookup is done via computer vision—PaddleOCR for text and OpenCV for matching Polaris SVG icons in grayscale across sizes; Test IDs become an opt-in fallback. Each run produces an annotated video, so most failures self-diagnose in seconds. Test stability went from 50% to 98% a few weeks after promoting the new framework to blocking CI. The post closes with transferable principles: limit the API to core commands, require assertions with validated before/after states, and enforce a multi-run stability gate before admitting tests to the suite. Useful for mobile engineers and test-infra teams fighting flaky UIs.

shopify.engineering · 8 min · Appium · Computer Vision · Mobile E2E · Test Stability
06:00

Claude Code for Startups: 5 Rules from AI-Native Teams

Claude Code 初创实战:五条规则与 AI 原生研发闭环

Anthropic interviewed a dozen fast-growing startups to extract five rules for using Claude Code: everyone ships; automate the tedium; trust but verify; build for rebuilding; and prototype, dogfood, productionize. Specific claims include Clay automating 100% of bug triage, ClickHouse's flaky-test agents becoming its second- and third-most-active repo contributors, and Cainex running a human-in-the-loop medical coding pipeline that revises agent instructions instead of patching individual examples. The guide bundles concrete mechanisms—MCP connectors, CLAUDE.md, skills, loops, hooks, dynamic workflows, and git worktrees—into a copy-paste checklist. It is vendor-produced and promotional in tone, but the operational details are unusually specific. Useful for startup CTOs and platform teams adopting agentic coding.

06:00

Mutmut: A Python Mutation Testing System

Mutmut:用变异测试揪出 100% 覆盖率背后的盲区

The author, building Python libraries, realized that even 100% code coverage can miss boundary conditions and error handling. Mutation testing works by making tiny changes to source code (e.g., turning < into <=) and then running the test suite; if the tests still pass, the mutation is considered unkilled, revealing weaknesses. After evaluating Mutpy and Cosmic Ray, the author decided to write Mutmut from scratch. A key design choice was using the baron library (later replaced by parso) to enable lossless AST round-tripping, so mutations can be written back to disk without disturbing formatting. The author attempted to intercept module loading via import hooks to mutate in memory and parallelize, but abandoned this after discovering that the Python import system forces reimplementing every loader. The disk-based serial approach was kept for its simplicity and flexibility across test runners. Applied to tri.declarative and tri.struct, Mutmut found untested edge cases and dead code even with 100% coverage, genuinely improving the test suites. This is a first-hand, honest account for engineers interested in Python testing tooling.

kodare.net · 7 min · Developer Tools · Mutation Testing · Python · Testing