Skip to content

feat: TDD infrastructure Waves 1-3 - #1

Merged
BillyOutlast merged 14 commits into
developfrom
issue/tdd-waves-1-3
Jul 24, 2026
Merged

BillyOutlast merged 14 commits into
developfrom
issue/tdd-waves-1-3

Conversation

@BillyOutlast

Copy link
Copy Markdown
Owner

Summary

Implements TDD infrastructure for drop repository across 3 waves:

Wave 1: Test Infrastructure

  • Added vitest, @nuxt/test-utils, msw, playwright, coverage deps
  • Added Rust test harnesses (tempfile, tokio-test)
  • Formatted server/ with prettier
  • Formatted Rust crates with cargo fmt
  • Created GitHub issue label taxonomy (9 labels)

Wave 2: Configuration

  • Configured vitest workspace with @nuxt/test-utils
  • Added docker-compose.test.yml (PostgreSQL for integration tests)
  • Configured Playwright E2E
  • Created msw mocks for OIDC, JWT, metadata scrapers
  • Added CI enforcement (format:check in server-ci.yml)
  • Added stale bot workflow (90-day stale, 14-day close)

Wave 3: Tests & Hooks

  • Health endpoint smoke test (2 tests passing)
  • Rust CLI tests (Config + DepotManifest, 13 tests)
  • Vitest coverage config (v8, lcov)
  • Pre-commit hooks (husky + lint-staged, working)

Known Issues

  • Auth tests (P2T2) created but failing due to mocking complexity - needs follow-up
  • Rust CLI tests require libarchive system library to compile

Testing

  • Health endpoint: pnpm --filter server test smoke/
  • Rust tests: cargo test --workspace (requires libarchive)
  • Pre-commit hooks: Working on every commit

John Smith and others added 14 commits July 24, 2026 03:18
- Add .github/workflows/ci.yml with actionlint validation, typecheck, lint, and test jobs
- Configure for both main and develop branches
- Add sonar-project.properties for SonarCloud analysis
- Set up coverage reporting and file exclusions
cli: add tempfile dev-dep
torrential: add tokio-test dev-dep
desktop: no change needed (tempfile already in deps)
Server: vitest, @nuxt/test-utils, @vue/test-utils, msw, @playwright/test,
@vitest/coverage-v8, happy-dom

Rust: tempfile (cli), tokio-test (torrential)

Part of TDD Wave 1.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>
Formatting-only changes across cli, torrential, libraries/native_model,
desktop/src-tauri workspace. No logic changes.

Part of TDD Wave 1.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>
Exclude node_modules, .nuxt, .output, dist, .data, pnpm-lock.yaml
from prettier formatting.

Part of TDD Wave 1.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>
- Add server/vitest.config.ts with @nuxt/test-utils
- Add server/test/setup.ts with msw lifecycle
- Add vitest.workspace.ts at repo root
- Add test, test:watch, coverage scripts to server/package.json

Part of TDD Wave 2.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>
- Add server/playwright.config.ts with baseURL, retries, webServer
- Add server/test/e2e/.gitkeep placeholder directory
- Add test:e2e script to server/package.json

Part of TDD Wave 2.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>
- Add server/test/mocks/oidc.ts with configurable OIDC handlers
- Add server/test/mocks/jwt.ts with test JWT signing/verification
- Add server/test/mocks/metadata.ts with IGDB, Steam, Giantbomb mocks
- Add server/test/mocks/index.ts with setupTestMocks/teardownTestMocks lifecycle

Part of TDD Wave 2.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>
- Add format:check step before lint
- Separate format:check from lint:eslint for clarity

Part of TDD Wave 2.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>
- Close issues inactive for 90 days
- 14-day warning before closure
- Exempt priority/p0 and priority/p1 labels

Part of TDD Wave 2.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>
- Create GET /api/v1/health endpoint returning { status, timestamp }
- Add smoke test verifying 200 response and shape
- Uses @nuxt/test-utils/e2e for integration testing

Part of TDD Wave 3.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>
- Config tests: new, exists, get, get_active, serde roundtrip
- DepotManifest tests: new, append, overwrite, serde roundtrip, variants
- Uses tempfile for test isolation

Note: Tests require libarchive system library to compile.

Part of TDD Wave 3.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>
- Provider: v8
- Reporters: text, lcov
- Reports directory: ./coverage
- Include: server/**/*.ts
- Exclude: test files and directories

Part of TDD Wave 3.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>
- Install husky and lint-staged
- Configure pre-commit hook to run lint-staged
- Lint-staged config: eslint --fix + prettier --write on *.{ts,vue}
- Prettier --write on *.json

Part of TDD Wave 3.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant