Skip to content
This repository was archived by the owner on Nov 25, 2026. It is now read-only.

feat(scripts): add :agent variants for running tests (and other slow commands) - #832

Merged
wmadden merged 9 commits into
mainfrom
worktree/goofy-merkle-36a152
Jun 16, 2026
Merged

wmadden merged 9 commits into
mainfrom
worktree/goofy-merkle-36a152

Conversation

@wmadden-electric

@wmadden-electric wmadden-electric commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

At a glance

$ pnpm test:packages:agent
log: wip/test-packages.20260615-190441.32317.log

$ grep -nE " FAIL |Test Files" wip/test-packages.20260615-190441.32317.log
…

The :agent variant runs the canonical command, redirects its full output to a timestamped file under wip/, prints that path as its first line of output, and exits with the same status as the underlying command. The agent uses the exact path the script just announced.

The decision

Every slow verification command — test:packages, test:integration, test:e2e, build, typecheck, lint, lint:deps, fixtures:check — gets an :agent variant. Agents use the :agent form; canonical commands are unchanged for humans and CI.

Each variant writes wip/<name>.<YYYYMMDD-HHMMSS>.<pid>.log and a sibling .exit, then prints the log path. Every run gets a unique filename so history is preserved automatically. wip/.gitkeep is committed; everything else under wip/ is gitignored.

A new always-apply rulecard, .agents/rules/running-tests.mdc, documents the workflow:

  1. Run a test suite (use the :agent variant).
  2. Run one package's tests (pnpm --filter <pkg> test).
  3. Rerun a specific failing test (by file, or by test name with vitest -t).
  4. Find specific failures in the captured output (grep the log path the :agent printed).

Why this matters

Sampled from one Drive session, ~90 min in a single subagent:

  • 4× pnpm test:packages (~150s each) chasing the same failure list
  • 4× pnpm test:integration for the same reason
  • 11× pnpm fixtures:check re-runs grepping different slices of the same output
  • 3× pnpm turbo typecheck --force in the same minute

~25 min of pure re-run waste in one subagent. The cause: piping pnpm test:packages to tail/grep/head discards the rest of the output and hides the exit code (those tools return 0). The next question about the failure forces a full re-run.

A rulecard alone would tell agents "redirect to a file, then grep it" — standing guidance they have to remember and apply. The :agent scripts bake the pattern into the command. Affordance, not memory.

What's in this PR

  • 8 new package.json scripts, one per slow command. Each follows the same shell template:
    ts=$(date +%Y%m%d-%H%M%S).$$; log=wip/<name>.$ts.log; echo "log: $log"; \
      pnpm <name> > "$log" 2>&1; status=$?; \
      echo $status > wip/<name>.$ts.exit; exit $status
    
  • .agents/rules/running-tests.mdc (always-apply), symlinked into .cursor/rules/ and .claude/rules/ by the existing pnpm rules:sync.
  • wip/.gitkeep committed; .gitignore now reads /wip/* + !/wip/.gitkeep.
  • Rules-footprint thresholds bumped to fit the new always-apply rule.

Alternatives considered

  • A helper script (scripts/agent-run.sh). Each :agent is one self-contained shell statement; no shared library to maintain.
  • A skill (skills-contrib/running-tests/). Skills are procedural workflows you invoke; "always run tests this way" is standing guidance, which is what .agents/rules/*.mdc is for.
  • Stable symlinks wip/<name>.log → latest run. Tried, removed. The script prints the exact log path, so the read path is unambiguous — no need for a "latest" abstraction.
  • mkdir -p wip prefix in every script. Replaced by committing wip/.gitkeep — the directory always exists, the scripts stay short.
  • Overwriting a single log per command. First iteration. Broke the "run full → fix → run full again, compare" workflow. Replaced by timestamped + PID-suffixed filenames; history is preserved automatically.
  • A structured (--reporter=json) reporter on the first run. Plausible but unnecessary — everything an agent does is programmatic; the agent reads the same human-readable log a human would, and grep/tail work fine against it.

Verification

  • pnpm lint:deps:agent end-to-end: prints log: wip/lint-deps.<ts>.<pid>.log, writes the log + .exit, exits with the right status.
  • pnpm lint:rules:footprint — passes after threshold bumps.
  • pnpm lint:rules:symlinks — symlink trees consistent.

Co-authored-by: Claude Opus 4.7 [email protected]

Implementer subagents currently pipe heavy gates (pnpm test:packages,
test:integration, build, lint, fixtures:check, turbo typecheck) directly
to tail/grep, which discards the rest of the output and swallows the
exit code. The next question about the output forces a full re-run.

Observed in one Drive session: 4× test:packages, 4× test:integration,
11× fixtures:check, 3× turbo typecheck --force in the same window —
~25 min of pure re-run waste, in addition to CPU contention with other
agents.

New rule: log gate output to a wip/ file with captured exit code, grep
the file. Re-run only the failing test file with --filter. Drop
reflexive turbo --force.

Bump the alwaysApply footprint thresholds (525→565 lines,
30000→31500 bytes) to fit the new rule.

Co-authored-by: Claude Opus 4.7 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric
wmadden-electric requested a review from a team as a code owner June 15, 2026 15:12
@coderabbitai

coderabbitai Bot commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a new running-tests.mdc agent rule documenting how to invoke test suites via :agent script variants, which log output and exit codes to a timestamped wip/ directory. Eight new *:agent scripts are added to package.json, .gitignore is updated for the wip/ directory, the rule is indexed in the README, and footprint thresholds are raised.

Changes

running-tests agent rule and :agent scripts

Layer / File(s) Summary
:agent script wrappers and wip/ directory setup
package.json, .gitignore
Adds eight *:agent scripts (build, test:packages, test:e2e, test:integration, lint, lint:deps, fixtures:check, typecheck) that run the underlying turbo/pnpm task and write timestamped stdout/stderr to wip/*.log and exit code to wip/*.exit. Updates .gitignore to ignore /wip/* while unignoring /wip/.gitkeep.
running-tests.mdc rule and README registration
.agents/rules/running-tests.mdc, .agents/rules/README.md
Introduces the full 73-line guidance document covering :agent log/exit-code behavior, suite command table, single-package reruns, Vitest -t targeted reruns, log-tailing for crashes, and a Don't section. Registers the rule in the README always-apply list and Git/CI workflow section.
Footprint threshold bump
.cursor/rules-footprint.config.json
Raises alwaysApplyLines to 605 and alwaysApplyBytes to 33000 to account for the new rule content.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • prisma/prisma-next#609: Restructures and synchronizes the same .agents/rules/ documentation set that this PR extends with the new running-tests.mdc rule.

Poem

🐇 Hop, hop, the tests now log!
With :agent scripts and a timestamped fog,
wip/*.log holds each exit and trace,
No test shall vanish without leaving a trace.
The wip folder's kept but quietly ignored—
A tidy burrow, every failure stored! 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: introducing new :agent script variants for running tests and other slow commands, as detailed across package.json, the new running-tests.mdc rule, and supporting configuration changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch worktree/goofy-merkle-36a152

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jun 15, 2026 •

Copy link
Copy Markdown

size-limit report 📦

Path Size
postgres / no-emit 152.73 KB (0%)
postgres / emit 121.05 KB (0%)
mongo / no-emit 78 KB (0%)
mongo / emit 72.09 KB (0%)
cf-worker / no-emit 181.2 KB (0%)
cf-worker / emit 146.2 KB (0%)

@pkg-pr-new

pkg-pr-new Bot commented Jun 15, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@prisma-next/extension-author-tools

npm i https://pkg.pr.new/@prisma-next/extension-author-tools@832

@prisma-next/mongo-runtime

npm i https://pkg.pr.new/@prisma-next/mongo-runtime@832

@prisma-next/family-mongo

npm i https://pkg.pr.new/@prisma-next/family-mongo@832

@prisma-next/sql-runtime

npm i https://pkg.pr.new/@prisma-next/sql-runtime@832

@prisma-next/family-sql

npm i https://pkg.pr.new/@prisma-next/family-sql@832

@prisma-next/extension-arktype-json

npm i https://pkg.pr.new/@prisma-next/extension-arktype-json@832

@prisma-next/middleware-cache

npm i https://pkg.pr.new/@prisma-next/middleware-cache@832

@prisma-next/mongo

npm i https://pkg.pr.new/@prisma-next/mongo@832

@prisma-next/extension-paradedb

npm i https://pkg.pr.new/@prisma-next/extension-paradedb@832

@prisma-next/extension-pgvector

npm i https://pkg.pr.new/@prisma-next/extension-pgvector@832

@prisma-next/extension-postgis

npm i https://pkg.pr.new/@prisma-next/extension-postgis@832

@prisma-next/postgres

npm i https://pkg.pr.new/@prisma-next/postgres@832

@prisma-next/sql-orm-client

npm i https://pkg.pr.new/@prisma-next/sql-orm-client@832

@prisma-next/sqlite

npm i https://pkg.pr.new/@prisma-next/sqlite@832

@prisma-next/extension-supabase

npm i https://pkg.pr.new/@prisma-next/extension-supabase@832

@prisma-next/target-mongo

npm i https://pkg.pr.new/@prisma-next/target-mongo@832

@prisma-next/adapter-mongo

npm i https://pkg.pr.new/@prisma-next/adapter-mongo@832

@prisma-next/driver-mongo

npm i https://pkg.pr.new/@prisma-next/driver-mongo@832

@prisma-next/contract

npm i https://pkg.pr.new/@prisma-next/contract@832

@prisma-next/utils

npm i https://pkg.pr.new/@prisma-next/utils@832

@prisma-next/config

npm i https://pkg.pr.new/@prisma-next/config@832

@prisma-next/errors

npm i https://pkg.pr.new/@prisma-next/errors@832

@prisma-next/framework-components

npm i https://pkg.pr.new/@prisma-next/framework-components@832

@prisma-next/operations

npm i https://pkg.pr.new/@prisma-next/operations@832

@prisma-next/ts-render

npm i https://pkg.pr.new/@prisma-next/ts-render@832

@prisma-next/contract-authoring

npm i https://pkg.pr.new/@prisma-next/contract-authoring@832

@prisma-next/ids

npm i https://pkg.pr.new/@prisma-next/ids@832

@prisma-next/psl-parser

npm i https://pkg.pr.new/@prisma-next/psl-parser@832

@prisma-next/psl-printer

npm i https://pkg.pr.new/@prisma-next/psl-printer@832

@prisma-next/cli

npm i https://pkg.pr.new/@prisma-next/cli@832

@prisma-next/cli-telemetry

npm i https://pkg.pr.new/@prisma-next/cli-telemetry@832

@prisma-next/emitter

npm i https://pkg.pr.new/@prisma-next/emitter@832

@prisma-next/migration-tools

npm i https://pkg.pr.new/@prisma-next/migration-tools@832

prisma-next

npm i https://pkg.pr.new/prisma-next@832

@prisma-next/vite-plugin-contract-emit

npm i https://pkg.pr.new/@prisma-next/vite-plugin-contract-emit@832

@prisma-next/mongo-codec

npm i https://pkg.pr.new/@prisma-next/mongo-codec@832

@prisma-next/mongo-contract

npm i https://pkg.pr.new/@prisma-next/mongo-contract@832

@prisma-next/mongo-value

npm i https://pkg.pr.new/@prisma-next/mongo-value@832

@prisma-next/mongo-contract-psl

npm i https://pkg.pr.new/@prisma-next/mongo-contract-psl@832

@prisma-next/mongo-contract-ts

npm i https://pkg.pr.new/@prisma-next/mongo-contract-ts@832

@prisma-next/mongo-emitter

npm i https://pkg.pr.new/@prisma-next/mongo-emitter@832

@prisma-next/mongo-schema-ir

npm i https://pkg.pr.new/@prisma-next/mongo-schema-ir@832

@prisma-next/mongo-query-ast

npm i https://pkg.pr.new/@prisma-next/mongo-query-ast@832

@prisma-next/mongo-orm

npm i https://pkg.pr.new/@prisma-next/mongo-orm@832

@prisma-next/mongo-query-builder

npm i https://pkg.pr.new/@prisma-next/mongo-query-builder@832

@prisma-next/mongo-lowering

npm i https://pkg.pr.new/@prisma-next/mongo-lowering@832

@prisma-next/mongo-wire

npm i https://pkg.pr.new/@prisma-next/mongo-wire@832

@prisma-next/sql-contract

npm i https://pkg.pr.new/@prisma-next/sql-contract@832

@prisma-next/sql-errors

npm i https://pkg.pr.new/@prisma-next/sql-errors@832

@prisma-next/sql-operations

npm i https://pkg.pr.new/@prisma-next/sql-operations@832

@prisma-next/sql-schema-ir

npm i https://pkg.pr.new/@prisma-next/sql-schema-ir@832

@prisma-next/sql-contract-psl

npm i https://pkg.pr.new/@prisma-next/sql-contract-psl@832

@prisma-next/sql-contract-ts

npm i https://pkg.pr.new/@prisma-next/sql-contract-ts@832

@prisma-next/sql-contract-emitter

npm i https://pkg.pr.new/@prisma-next/sql-contract-emitter@832

@prisma-next/sql-lane-query-builder

npm i https://pkg.pr.new/@prisma-next/sql-lane-query-builder@832

@prisma-next/sql-relational-core

npm i https://pkg.pr.new/@prisma-next/sql-relational-core@832

@prisma-next/sql-builder

npm i https://pkg.pr.new/@prisma-next/sql-builder@832

@prisma-next/target-postgres

npm i https://pkg.pr.new/@prisma-next/target-postgres@832

@prisma-next/target-sqlite

npm i https://pkg.pr.new/@prisma-next/target-sqlite@832

@prisma-next/adapter-postgres

npm i https://pkg.pr.new/@prisma-next/adapter-postgres@832

@prisma-next/adapter-sqlite

npm i https://pkg.pr.new/@prisma-next/adapter-sqlite@832

@prisma-next/driver-postgres

npm i https://pkg.pr.new/@prisma-next/driver-postgres@832

@prisma-next/driver-sqlite

npm i https://pkg.pr.new/@prisma-next/driver-sqlite@832

commit: 19d7df7

@wmadden-electric wmadden-electric changed the title docs(rules): stop agents re-running suites to re-filter output docs(rules): log gate output once, grep the log — don't re-run suites Jun 15, 2026
wmadden-electric and others added 2 commits June 15, 2026 17:26
The rulecard is for agents; everything an agent does is "programmatic
consumption". Recommending --reporter=json for that case framed grep
as a fallback, but greppable text is what agents actually want from
gate output. Drop the line.

Co-authored-by: Claude Opus 4.7 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
"gate" is a banned word in plain-English style guidance — it conveys
nothing a fresh reader can act on. Rename run-gates-once →
capture-slow-command-output and rewrite the rule body to describe what
the commands actually are: long-running test/build/lint commands whose
output should be saved to a file and read from there, not re-run to
re-filter.

README entries updated. Symlink trees regenerated by pnpm rules:sync.

Co-authored-by: Claude Opus 4.7 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric wmadden-electric changed the title docs(rules): log gate output once, grep the log — don't re-run suites docs(rules): save long-running command output to a file once Jun 15, 2026
wmadden-electric and others added 2 commits June 15, 2026 18:07
Read the rule with the eyes of an agent mid-task. Fixes the gaps an
agent following it literally would still trip on:

- The rule's namesake "don't" (re-running to refine a filter) was
  bullet #2; promote it to #1.
- "Don't pass --force to turbo" left the right thing unsaid; name
  the cached invocation (pnpm turbo typecheck plain).
- The recipe captured the exit code but never told the agent to read
  it back; add the tail step plus a note for the crash-before-tests
  case (log has no FAIL lines).
- The re-run-after-a-fix case was unspecified; say to overwrite the
  same file with >.
- wip/ was presented as a magic convention; note that it's gitignored
  at the repo root.
- Scope-limit the rule explicitly to the listed slow commands; tell
  agents short commands run normally.
- Replace the orphaned "if a pipe is unavoidable" line with a worked
  tee + PIPESTATUS example.
- Drop the meta "largest waste of agent time" framing — it's for the
  reviewer, not the executing agent.

Bytes threshold bumped 31500 → 32000 to fit the richer recipe; lines
threshold unchanged.

Co-authored-by: Claude Opus 4.7 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
"capture slow command output" is bureaucratic abstraction. The rule is
about running tests — that is the primary thing agents do that hits
this — with build/lint/typecheck/fixtures as adjacent cases. Name it
that, lead the body with that, and let the other commands appear as
the list of things this same recipe applies to.

Rule heading: "Running tests"
First sentence: "When you run tests, save the output to a file and
read the file."

Co-authored-by: Claude Opus 4.7 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric wmadden-electric changed the title docs(rules): save long-running command output to a file once docs(rules): how to run tests — save output to a file, don't re-run to grep Jun 15, 2026
…-tests rule

Bake the "save output to a file" pattern into package.json instead of
asking agents to remember it. Eight new scripts:

- test:packages:agent, test:integration:agent, test:e2e:agent
- build:agent, typecheck:agent
- lint:agent, lint:deps:agent, fixtures:check:agent

Each wraps its canonical sibling with:

  mkdir -p wip; pnpm <name> > wip/<name>.log 2>&1; status=$?;
  echo $status > wip/<name>.exit; exit $status

The script exits with the underlying command's status, so the harness
still sees pass/fail. POSIX-portable; no helper script needed.

Rule rewritten with the four sections an agent actually needs:
  1. Run a test suite (table of :agent commands and what they do)
  2. Run one package's tests
  3. Rerun a specific failing test (by file, by name)
  4. Find specific failures in the captured output
  + Don't list

Footprint thresholds bumped (565 → 605 lines, 32000 → 32500 bytes) to
fit the richer rule.

Co-authored-by: Claude Opus 4.7 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric wmadden-electric changed the title docs(rules): how to run tests — save output to a file, don't re-run to grep feat(scripts): add :agent variants for slow commands so agents capture output once Jun 15, 2026
wmadden-electric and others added 3 commits June 15, 2026 18:51
wip/ now exists in the repo via wip/.gitkeep, with its contents
gitignored (/wip/* + !/wip/.gitkeep). That removes the only reason the
:agent scripts needed mkdir -p wip; up front — the directory is always
there. Each script is one shell statement now:

  pnpm <name> > wip/<name>.log 2>&1; status=$?;
  echo $status > wip/<name>.exit; exit $status

Co-authored-by: Claude Opus 4.7 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
Run-full → fix → run-full again was overwriting the first run's log,
so the original failure list was gone when the agent wanted to compare.
Now each :agent run writes to wip/<name>.<YYYYMMDD-HHMMSS>.<pid>.log
and a sibling .exit, and wip/<name>.log / wip/<name>.exit are
symlinks updated to point at the latest run.

The agent's read path is unchanged (`cat wip/<name>.exit`,
`grep ... wip/<name>.log` follow the symlinks), and historical runs
are preserved next to them. The PID suffix disambiguates same-second
runs from concurrent shells.

Rule section 1 updated to describe the layout.

Co-authored-by: Claude Opus 4.7 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
Each :agent script now prints "log: wip/<name>.<ts>.<pid>.log" as its
first line of output, and the agent uses that exact path for the rest
of the workflow. No symlinks; no implicit "latest" abstraction. The
read path is whatever the script just told you — extremely clear.

History is still preserved automatically because every run gets its
own timestamped + PID-suffixed filename.

Rule sections 1 and 4 updated; bytes threshold bumped 32500 → 33000.

Co-authored-by: Claude Opus 4.7 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric wmadden-electric changed the title feat(scripts): add :agent variants for slow commands so agents capture output once feat(scripts): add :agent variants for running tests (and other slow commands) Jun 16, 2026
@wmadden
wmadden added this pull request to the merge queue Jun 16, 2026
Merged via the queue into main with commit 219d680 Jun 16, 2026
20 checks passed
@wmadden
wmadden deleted the worktree/goofy-merkle-36a152 branch June 16, 2026 10:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants