test(pipeline): add pipeline stage transition tests for mgw:run#263
Merged
snipcodeit merged 1 commit intomainfrom Mar 6, 2026
Merged
Conversation
…ock agents Adds test/pipeline-transitions.test.js with 28 vitest tests covering the full mgw:run cycle simulation using mock-github.cjs and mock-gsd-agent.cjs. Four test suites: - happy-path: new → triaged → planning → executing → verifying → pr-created → done - failure-mode (empty agent output): pipeline → failed, recovery paths validated - failure-mode (blocking comment): mock gh CLI intercept, pipeline → blocked - checkpoint progression: triage → plan → execute → verify → pr step tracking Also adds supporting infrastructure from v6 milestone prior phases: - lib/mock-github.cjs (from phase 47) - lib/mock-gsd-agent.cjs (from phase 47) - vitest.config.js + test/setup.js + test/loadFixture.js (from phase 49) - test/fixtures/github/ and test/fixtures/agents/ fixture files - test/checkpoint.test.js (from phase 48 issue #251) Closes #252 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This was referenced Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test/pipeline-transitions.test.jswith 28 vitest tests simulating a full mgw:run cycle viamock-github.cjsandmock-gsd-agent.cjspipeline_stepprogression (triage→plan→execute→verify→pr)Closes #252
Milestone Context
Changes
test/pipeline-transitions.test.js— 28 vitest tests across 4 suites (310 lines)lib/mock-github.cjs— GitHub API interceptor for tests (from phase 47)lib/mock-gsd-agent.cjs— Fake Task() agent stubs for tests (from phase 47)vitest.config.js— Vitest runner config targeting*.test.jsfilestest/setup.js— Vitest global setuptest/loadFixture.js— Fixture loader utilitytest/checkpoint.test.js— Checkpoint tests from issue Write tests for checkpoint read/write and resume detection #251test/fixtures/github/— 16 GitHub API fixture JSON filestest/fixtures/agents/— 5 agent output fixture JSON filespackage.json— vitest devDependency + test/test:node scriptsTest Plan
npx vitest run test/pipeline-transitions.test.js— 28 tests pass, 0 failuresonTransitionhooks fire at each stage,clearHooks()prevents re-firemock-gsd-agent.setResponse('gsd-planner', '')→failedstatemock-github.setResponse('gh issue view', ...)with blocking comment →blockedstateGSD Progress