[PR #283] [MERGED] docs: add targeted test running guidance for agents #442

Closed
opened 2026-05-06 12:39:50 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/283
Author: @southpolesteve
Created: 3/6/2026
Status: Merged
Merged: 3/6/2026
Merged by: @southpolesteve

Base: mainHead: improve/agent-targeted-tests


📝 Commits (1)

  • 85a723e docs: add targeted test running guidance for agents

📊 Changes

1 file changed (+40 additions, -2 deletions)

View changed files

📝 AGENTS.md (+40 -2)

📄 Description

Summary

  • Adds a Running Tests section to AGENTS.md with a mapping from source files to relevant test files
  • Updates the "Adding a New Feature" workflow to reference targeted tests instead of "run the full test suite"
  • Adds targeted test command examples to the Quick Reference commands section

Motivation

The full Vitest suite runs serially (~2 min) because test files race on Vite's deps optimizer cache when run in parallel. During development, agents almost never need the full suite. They typically touch one area (a shim, a routing file, a server handler) and only need to verify 1-3 test files.

With 3-4 agents working on the repo simultaneously, each running pnpm test (2 min serial) creates unnecessary CPU contention. Running targeted tests instead takes seconds.

Changes

The new section includes:

  • Explicit examples of how to run single files, multiple files, and name-pattern matching
  • A lookup table mapping source directories to their relevant test files
  • Guidance on when to let CI run the full suite vs running it locally

/bigbonk review this


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cloudflare/vinext/pull/283 **Author:** [@southpolesteve](https://github.com/southpolesteve) **Created:** 3/6/2026 **Status:** ✅ Merged **Merged:** 3/6/2026 **Merged by:** [@southpolesteve](https://github.com/southpolesteve) **Base:** `main` ← **Head:** `improve/agent-targeted-tests` --- ### 📝 Commits (1) - [`85a723e`](https://github.com/cloudflare/vinext/commit/85a723ecc05393e52ee3eae48aa381fc3bb5b648) docs: add targeted test running guidance for agents ### 📊 Changes **1 file changed** (+40 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `AGENTS.md` (+40 -2) </details> ### 📄 Description ## Summary - Adds a **Running Tests** section to AGENTS.md with a mapping from source files to relevant test files - Updates the "Adding a New Feature" workflow to reference targeted tests instead of "run the full test suite" - Adds targeted test command examples to the Quick Reference commands section ## Motivation The full Vitest suite runs serially (~2 min) because test files race on Vite's deps optimizer cache when run in parallel. During development, agents almost never need the full suite. They typically touch one area (a shim, a routing file, a server handler) and only need to verify 1-3 test files. With 3-4 agents working on the repo simultaneously, each running `pnpm test` (2 min serial) creates unnecessary CPU contention. Running targeted tests instead takes seconds. ## Changes The new section includes: - Explicit examples of how to run single files, multiple files, and name-pattern matching - A lookup table mapping source directories to their relevant test files - Guidance on when to let CI run the full suite vs running it locally /bigbonk review this --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 12:39:50 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#442
No description provided.