Bug Agent Testing Guide Last Updated: 2026-01-10
For each completed requirement, the Bug Agent will:
- Verify file/feature existence
- Test basic functionality
- Run syntax/validation checks
- Test error conditions
- Verify integration points
- Run any available unit tests
- Document results in BUG_FINDINGS.md
Test Cases:
- File exists at /home/user/Tradingpoly/pnpm-workspace.yaml
- Valid YAML syntax
- Contains packages array
- Includes apps/* and packages/* patterns
Test Cases:
- File exists at /home/user/Tradingpoly/package.json
- Valid JSON syntax
- Contains "workspaces" field
- Contains "name" field
- Contains "private": true
- Contains "scripts" object
Test Cases:
- File exists at /home/user/Tradingpoly/tsconfig.json
- Valid JSON syntax
- Contains "compilerOptions"
- Contains path aliases configuration
- References workspace packages
Test Cases:
- File exists at /home/user/Tradingpoly/.nvmrc
- Contains Node.js version 20.x
- Version format is valid
Test Cases:
- File exists at /home/user/Tradingpoly/.npmrc
- Contains pnpm-specific settings
- No secrets in file
Test Cases:
- File exists at /home/user/Tradingpoly/.gitignore
- Includes node_modules
- Includes dist/build directories
- Includes .env files
- Includes OS-specific files
Test Cases:
- File exists at /home/user/Tradingpoly/.env.example
- Contains all required API key placeholders
- No actual secrets present
- Includes comments for each variable
Test Cases:
- File exists at /home/user/Tradingpoly/turbo.json
- Valid JSON syntax
- Contains "pipeline" configuration
- Defines build dependencies
Test Cases:
- File exists at /home/user/Tradingpoly/.prettierrc
- Valid JSON/YAML syntax
- Contains formatting rules
Test Cases:
- File exists at /home/user/Tradingpoly/.eslintrc.js
- Valid JavaScript syntax
- Exports configuration object
- Contains rules configuration
Test Cases:
- apps/ directory exists
- apps/cli/ directory exists
- apps/web/ directory exists
- apps/mcp-server/ directory exists
- packages/ directory exists
- packages/core/ directory exists
- packages/types/ directory exists
- pipelines/ directory exists
- remotion/ directory exists
- templates/ directory exists
- python/ directory exists
- config/ directory exists
- assets/ directory exists with .gitkeep
- output/ directory exists with .gitkeep
Test Cases:
- packages/core/package.json exists and valid
- packages/types/package.json exists and valid
- apps/cli/package.json exists and valid
- TypeScript installed (check node_modules)
- tsx installed
- vitest installed
- zod installed
- commander installed
- All tsconfig.json files valid
Test Cases:
- All interfaces exported from packages/types
- TypeScript compilation succeeds
- No type errors
- Interfaces have JSDoc comments
Test Cases:
- All generation interfaces defined
- Types match provider requirements
- No circular dependencies
Test Cases:
- All pipeline interfaces defined
- Event types properly structured
- Error types comprehensive
Test Cases:
- All schemas export successfully
- Schema validation works
- Invalid data rejected correctly
- Default values applied
- Error messages clear
Test Cases:
- Barrel export works (index.ts)
- ESM build succeeds
- CJS build succeeds
- Can import from package
Test Cases:
- loadConfig() loads .env correctly
- saveConfig() writes files
- getEnvVar() validates required vars
- ConfigManager singleton works
- YAML config parsing works
- Config merging works correctly
Test Cases:
- Logger instantiates
- All log levels work
- JSON format works
- Pretty format works
- File logging works
- Child logger works
- Silent mode works
Test Cases:
- ensureDir() creates directories
- writeFile() atomic writes work
- readFile() handles encodings
- copyFile() works correctly
- moveFile() works correctly
- deleteFile() works correctly
- listFiles() glob patterns work
- Temp file utilities work
Test Cases:
- AssetManager instantiates
- registerAsset() works
- getAsset() retrieves correctly
- deleteAsset() works
- listAssets() works
- Hash generation works
- Metadata extraction works
Test Cases:
- All error classes extend base
- Error serialization works
- Error codes unique
- isRetryable() works correctly
Test Cases:
- CLI entry point executes
- Commander parses commands
- --version flag works
- --help flag works
- Global flags work
- Error handling works
Test Cases:
-
void initruns without errors - Project directory created
- Config files created
- Success message displayed
- --template flag works
- --force flag works
Test Cases:
-
void config showdisplays config -
void config setupdates values -
void config getretrieves values - Sensitive values masked
- Validation works
- Nested keys work
Test Cases:
-
void voice "text"works - --input file flag works
- --provider flag works
- --voice flag works
- --output flag works
- Progress indicator shows
- Output file created
- API errors handled
Test Cases:
- VoiceProvider interface defined
- VoiceProviderFactory works
- Provider registration works
- Provider lookup works
- Health check works
Test Cases:
- Provider instantiates
- API key validation works
- generateVoice() returns audio
- listVoices() returns list
- Rate limiting works
- Error handling works
- Audio buffer returned
Test Cases:
- Provider instantiates
- API key validation works
- generateVoice() works
- Voice selection works
- Model selection works
- Format selection works
- Audio buffer returned
Test Cases:
- VoicePipeline instantiates
- Config input works
- Provider selection works
- Voice generation works
- File save works
- Progress events emit
- Cancellation works
Test Cases:
- detectFFmpeg() finds ffmpeg
- detectFFmpeg() finds ffprobe
- Version check works
- Error on missing ffmpeg
- Installation instructions shown
Test Cases:
- FFmpegCommand instantiates
- input() adds input
- output() adds output
- Options work correctly
- toString() formats command
- toArgs() returns array
Test Cases:
- executeFFmpeg() runs command
- Progress parsing works
- Progress events emit
- Exit handling works
- Error handling works
- Cancellation works
Test Cases:
- trimVideo() works
- concatVideos() works
- addAudioToVideo() works
- extractAudio() works
- convertFormat() works
- resizeVideo() works
- getMediaInfo() works
Test Cases:
- remotion/ directory exists
- package.json valid
- Dependencies installed
- Root.tsx exists
- index.ts exists
- remotion.config.ts exists
-
npx remotion studiostarts
Test Cases:
- All components export
- TypeScript compiles
- Components render without error
- Props validation works
Test Cases:
- All compositions registered
- Props work correctly
- Dynamic duration works
- Compositions render
Test Cases:
- renderVideo() function works
- Composition ID accepted
- Props passed correctly
- Output file created
- Progress reporting works
- Error handling works
Test Cases:
- vitest runs
- Test files discovered
- Coverage works
- Scripts in package.json work
Test Cases:
- All test files run
- Tests pass
- Coverage > 70%
- No flaky tests
Test Cases:
- README.md exists and complete
- Installation instructions work
- Examples run correctly
- API docs complete
- No broken links
- JSDoc comments present
When bugs are found, assign severity:
- CRITICAL: System won't build/run, data loss, security issue
- HIGH: Feature completely broken, no workaround
- MEDIUM: Feature partially works, workaround exists
- LOW: Cosmetic, edge case, minor issue
- File Existence: Always test first
- Syntax Validation: JSON/YAML/TS compilation
- Basic Functionality: Core feature works
- Error Handling: Graceful failures
- Integration: Works with other components
- Performance: No obvious bottlenecks
- Each test creates detailed reproduction steps
- All bugs logged with timestamp
- Screenshots/logs attached when relevant
- Bugs linked to requirements