techlist.io

Unit Testing

4 posts

Cloudflare2026-08-043 min readCurated summary

How we built a software factory to drive Astro’s GitHub issue count to zero

AI-powered software factories can address a pressing open-source problem: maintainers are overwhelmed by the flood of AI-generated issues, pull requests, and security reports. The Astro team built an automated triage pipeline that reproduces bugs, diagnoses causes, creates fixes, and ships preview releases for verification. After several months, it reduced Astro’s open issues from more than 200 to roughly 30 without mass-closing or ignoring reports. ## Building an Issue-Triage Skill - The team began by automating issue triage, one of the most time-consuming parts of open-source maintenance. - The workflow mirrors manual debugging: - **Reproduce:** Clone the reporter’s reproduction repository and confirm the problem. - **Diagnose:** Instrument the code and add logging to identify the root cause. - **Verify:** Check tests, documentation, and comments to determine whether the behavior is actually a bug. - **Fix:** Turn the reproduction into failing tests, implement a solution, and deploy it. - Each phase runs in an isolated AI subagent to reduce the tendency to force a solution. - Subagents communicate through a sequential `report.md` file containing their findings. ## Running the Pipeline in GitHub Actions - The workflow is driven by GitHub issue labels rather than a separate internal database. - New issues begin with `triage needed`; verified fixes eventually move to `fix verified`. - The pipeline reconstructs its state from labels and existing issue comments. - When a fix is ready, it: - Creates a preview release using `pkg.pr.new`. - Posts the diagnosis, logs, and installation instructions to the issue. - Lets the original reporter test the patch. - Opens a linked pull request after confirmation. ## From a Repository Workflow to Flue - The team recognized that the process was not inherently tied to GitHub. - Its core structure consists of: - An external event. - A sequence of isolated subagents. - Separate reasoning and execution permissions. - Durable workflow state. - This generalization became **Flue**, an open, platform-agnostic framework for agent workflows that can respond to GitHub events, Slack messages, cron jobs, or webhooks. ## Effects on Maintainer and Community Work - Automation did not make the Astro team less connected to users. - Instead, it freed maintainers to spend more time: - Engaging with the community in Discord. - Participating in RFCs and feature discussions. - Collaborating with contributors. - The system is designed to resolve most incoming issues, while failures are treated as signals that the codebase needs improvement. ## Using Agent Failures to Improve the Codebase Agent mistakes often reveal problems that would also challenge human developers: - **Opaque abstractions:** Component boundaries are unclear. - **Missing documentation:** Important implementation decisions are unexplained. - **Insufficient testing:** Critical behavior lacks adequate unit tests. - For example, the bot repeatedly changed an HMR-related condition and caused regressions because the logic was poorly documented and under-tested. - Adding a precise comment clarified the intended behavior, after which the bot stopped making the same incorrect change. - Fixing these weaknesses improves both future automation and human maintainability. ## Extracting the Workflow into a GitHub Action - Initially, the triage system was embedded in the Astro monorepo, making changes risky and difficult to test. - The team separated it into the standalone `triagebot-action` repository. - This enabled independent testing and safer updates to Flue and the workflow. - The action now supports Astro and has been adopted or forked by other teams building their own automated development pipelines. The practical lesson is to start with a narrow, repeatable maintenance task, isolate agent responsibilities, make all reasoning auditable, and use failures to improve documentation, architecture, and tests.

Spotify2026-02-193 min readCurated summary

Congratulations to the recipients of the 2025 Spotify FOSS Fund | Spotify Engineering

Spotify’s 2025 FOSS Fund provided €30,000 to FFmpeg, €15,000 to Mock Service Worker (MSW), and support to the Xiph.Org Foundation. The grants recognize both large, foundational projects and smaller efforts maintained by individuals, emphasizing that Spotify’s technology depends on volunteer-driven open source. Maintainers describe the funds as valuable for development, infrastructure, contributor support, and long-term sustainability. ## Spotify’s FOSS Fund - Established in 2022 to support open source projects that Spotify relies on and its developers value. - The 2025 recipients were: - FFmpeg - Mock Service Worker (MSW) - Xiph.Org Foundation - FFmpeg and Xiph.Org support technologies fundamental to streaming, while MSW is primarily maintained by its creator. - Despite differences in scale, all three projects depend heavily on volunteer contributions. ## FFmpeg: €30,000 - FFmpeg has been actively developed for more than 25 years and supports: - Multimedia encoding and decoding - Transcoding - Muxing and demuxing - Filtering - Streaming and playback - Its goal is to play every multimedia file ever created, making it widely used by hobbyists and companies such as YouTube, Netflix, X, and Spotify. - Maintainer Kieran Kunhya said the project is written almost entirely by volunteers. - The funding will support: - Hardware purchases - Conference travel - Development projects - FFmpeg’s maintainers argue that company donations also raise awareness of the project’s importance and demonstrate responsibility toward critical dependencies. - They identify reliable, long-term funding and dedicated company developers as major unmet needs in open source sustainability. ## Mock Service Worker: €15,000 - MSW is a JavaScript library for API mocking used by Spotify for unit testing and across its web stack. - Creator Artem Zakharchenko is the project’s sole full-time maintainer, supported by a small group of active contributors. - Major 2025 improvements included: - A new Interceptors architecture - Custom mock agents operating at the Node.js `node:net` level - First-class Server-Sent Events support - Planned work for 2026 includes: - A redesigned internal architecture - A new approach to request interception - Remote request interception, a technically difficult feature under development for several years - The previous Spotify grant primarily helped Artem support himself while working full time on open source. - The new funding will directly support continued MSW development and efforts to make external contributions more financially sustainable. - Artem notes that many contributors have been reluctant to accept payment, creating an ongoing challenge in building a sustainable maintainer and contributor community. ## Xiph.Org Foundation - The post identifies the Xiph.Org Foundation as a 2025 recipient and groups it with FFmpeg as a project representing technology fundamental to streaming. - The provided text does not include further details about the foundation’s grant amount, projects, or maintainer comments. Spotify’s grants illustrate how companies can support both major infrastructure projects and individual maintainers. Recurring funding, paid development time, contributor compensation, and practical resources such as hardware and conference travel remain important to the long-term health of open source.

OpenAI2025-12-114 min readCurated summary

How We Used Codex to Ship Sora for Android in 28 Days

The team behind Sora for Android built the app's first production version in 28 days, from October 8 to November 5, 2025, with a four-person engineering team using an early version of GPT-5.1-Codex. The app reached #1 on the Play Store at launch and reached a 99.9 percent crash-free rate. The authors argue that Codex works best when humans make the architectural decisions and give it clear context, and that AI-assisted development raises the need for engineering rigor rather than reducing it. The post notes that the Sora product was discontinued on April 26, 2026. ### Staying small to move fast - The team deliberately avoided adding engineers, following Fred Brooks's warning that adding people to a late project makes it later. - Four engineers, each equipped with Codex, shipped an internal build to employees in 18 days and launched publicly 10 days later. - The app consumed roughly 5 billion tokens, and the team estimates Codex wrote about 85 percent of the code. ### Treating Codex like a new senior engineer - Codex struggles to infer unstated preferences, such as architecture patterns, product strategy, user behavior, and team conventions, so each session needs onboarding. - It cannot run the app on a device, so it can't notice a janky scroll or a confusing flow. The team handled those experiential judgments. - Left alone, it tends to add unnecessary view models or put logic in the UI layer, prioritizing a working result over long-term cleanliness. - Strengths include rapidly reading large codebases, writing broad unit test coverage, reacting to pasted CI logs, running many disposable experiments in parallel, and catching bugs in code review. - The team placed many AGENTS.md files throughout the codebase to carry style rules across sessions. For example, the top-level file requires running `./gradlew detektFix` before every commit. ### Laying the foundation by hand - The humans designed the architecture, modularization, dependency injection, navigation, authentication, and base networking. - They then wrote a few representative features end to end and documented the patterns they wanted repeated. - A single prompt asking Codex to "build the Sora Android app based on the iOS code" produced code that compiled but delivered a subpar product experience, so the team abandoned that approach. - Prompts that pointed to an existing screen and said to follow its architecture worked far better. ### Planning before coding - For non-trivial changes, the team first asked Codex to summarize how a feature works, such as how data flows from the API through the repository and view model into the UI, then corrected its understanding. - Codex then produced a miniature design document listing the files to change, new states, and logic flow, which the team reviewed before implementation. - For long tasks, the plan was saved to a file so it could carry across sessions and context windows. - Plans enabled Codex to run unsupervised for long stretches and made code review and debugging easier, since problems could be traced to the plan or the code. ### Managing parallel sessions - At peak, several Codex sessions ran at once on playback, search, error handling, and tests. - The bottleneck shifted from writing code to making decisions, giving feedback, and integrating changes. - The authors describe the work as conducting an orchestra rather than playing faster solo, since each additional session adds coordination overhead. ### Cross-platform development through translation - Because Sora already shipped on iOS and had a backend, the team pointed Codex at all three repositories in the same environment. - Application logic such as data models, network calls, validation, and business rules is portable across Swift and Kotlin, and Codex translated iOS implementations into equivalent Android code. - Concrete examples gave Codex far more context than natural-language descriptions alone, so the team achieved cross-platform development through translation rather than shared abstractions. ### Closing takeaway The authors conclude that Codex made manual coding far less central, but it did not remove the need for humans who understand system constraints, architecture, and long-term product plans. Their advice is to set up Codex in a context-rich environment that reflects how the team builds, and then treat its output like a teammate's.