Skip to content

Write integration tests for validate_and_load and state file lifecycle #250

@snipcodeit

Description

@snipcodeit

Description

Cover: fresh .mgw/ init, gitignore injection, cross-refs.json creation, migrateProjectState() idempotency, staleness detection with mocked GitHub updatedAt timestamps. Use tmp directories so tests do not pollute the real .mgw/.

Acceptance Criteria

  • Write integration tests for validate_and_load and state file lifecycle

Milestone Context

Milestone v6 — Local Testing & Simulation Framework
Phase Phase 48: State & Pipeline Tests
GSD Route plan-phase
Phase Position Phase 2 of 4 in milestone

Milestone Goal

Offline test suite with mock GitHub API and fake GSD agents to validate MGW orchestration logic without requiring live GitHub tokens or active Claude API calls.

Phase Goal

Test coverage for lib/state.cjs functions, the validate_and_load pattern, and core pipeline stage transitions used in mgw:run and mgw:milestone.

Dependencies

add-vitest-test-runner-with-fixture-loader-and-m

Scope Hints

  • Estimated route: plan-phase
  • Labels: testing,state

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions