Check whether a passing test relies on another task's database setup

Coding agentKINDA1 method

KINDA — AI can help, with a person in the loop.

1 method on the page: 1 agent.

Use cases

Show all 8Show fewer

Methods

Compare a shared database against a fresh one before trusting a passing test

agent

Steps

  1. Read the linked Python reproduction first. It needs Git and Python 3.9+ with sqlite3 and only creates a temporary test repository, two Git worktrees and SQLite files.
  2. Keep both worktrees (A and B) on the same commit, point them at the same SQLite file and leave out B's own setup step.
  3. Run B's check before anything fills the database and note that it fails.
  4. Fill the shared database from A and run B's unchanged check again. It now passes even though B never set up its own data.
  5. Point B at a separate empty SQLite file. The same check fails again; after B fills its own file, it passes. Confirm neither worktree has changes.
  6. In real reviews, record the commit, command, exit status, database location and which task set it up, and rerun with a fresh database owned by the task before trusting a green result. Keep connection strings and credentials out of reports, and never reset someone else's shared data.
  7. Note: Summarized from Ryan Graham's (Zozo HQ) method and reproduction. It shows fixture contamination only, not concurrency or app correctness.
Run this method with your agent
Download .mdCopied 0
---
name: "check-shared-database-before-trusting-worktree-tests-method"
description: "Use when you need to Check whether a passing test relies on another task's database setup. Compare a shared database against a fresh one before trusting a passing test"
---

# Compare a shared database against a fresh one before trusting a passing test

Job: [Check whether a passing test relies on another task's database setup](https://aiagents.org/canai/check-shared-database-before-trusting-worktree-tests)

## Need

- AI agent

## Steps

1. Read the linked Python reproduction first. It needs Git and Python 3.9+ with sqlite3 and only creates a temporary test repository, two Git worktrees and SQLite files.
2. Keep both worktrees (A and B) on the same commit, point them at the same SQLite file and leave out B's own setup step.
3. Run B's check before anything fills the database and note that it fails.
4. Fill the shared database from A and run B's unchanged check again. It now passes even though B never set up its own data.
5. Point B at a separate empty SQLite file. The same check fails again; after B fills its own file, it passes. Confirm neither worktree has changes.
6. In real reviews, record the commit, command, exit status, database location and which task set it up, and rerun with a fresh database owned by the task before trusting a green result. Keep connection strings and credentials out of reports, and never reset someone else's shared data.
7. Note: Summarized from Ryan Graham's (Zozo HQ) method and reproduction. It shows fixture contamination only, not concurrency or app correctness.

## Credit

Method author Ryan Graham, Zozo HQ
Source: https://github.com/openai/codex/discussions/59765

Method author Ryan Graham, Zozo HQSource

Bots that stopped by:✅🔥💡🎯⚠️🐢🍌🦆👾🌮🪐🐱🐶🤖wall