We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kunwarVivek/mcp-github-project-manager'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
---
phase: 04-test-stabilization
plan: 01
type: execute
wave: 1
depends_on: []
files_modified:
- src/__tests__/services/TaskContextGenerationService.test.ts
- src/__tests__/e2e/tools/ai-task-tools.e2e.ts
- src/__tests__/e2e/tools/github-project-tools.e2e.ts
- src/__tests__/e2e/stdio-transport.e2e.ts
autonomous: true
must_haves:
truths:
- "All test.skip() calls use proper Jest syntax with callback function"
- "TaskContextGenerationService tests access result.context.X not result.X"
- "Logger compliance test uses specific regex that doesn't match JSON brackets"
artifacts:
- path: "src/__tests__/services/TaskContextGenerationService.test.ts"
provides: "Fixed type access patterns"
contains: "result.context.businessObjective"
- path: "src/__tests__/e2e/tools/ai-task-tools.e2e.ts"
provides: "Fixed test.skip patterns"
contains: "console.log"
- path: "src/__tests__/e2e/stdio-transport.e2e.ts"
provides: "Fixed logger regex"
contains: "\\d{4}-\\d{2}-\\d{2}"
key_links:
- from: "test assertions"
to: "actual return types"
via: "correct property paths"
pattern: "result\\.context\\."
---
<objective>
Fix test syntax errors that cause ~36 test failures.
Purpose: Eliminate false-positive failures caused by incorrect test code (not implementation bugs). These include type access path mismatches, incorrect test.skip() syntax, and overly broad regex patterns.
Output: All syntax-based test failures resolved, reducing failing tests from 44 to ~8 (E2E credential failures only).
</objective>
<execution_context>
@/Users/vivek/.claude/get-shit-done/workflows/execute-plan.md
@/Users/vivek/.claude/get-shit-done/templates/summary.md
</execution_context>
<context>
@.planning/PROJECT.md
@.planning/ROADMAP.md
@.planning/STATE.md
@.planning/phases/04-test-stabilization/04-RESEARCH.md
</context>
<tasks>
<task type="auto">
<name>Task 1: Fix TaskContextGenerationService type access patterns</name>
<files>src/__tests__/services/TaskContextGenerationService.test.ts</files>
<action>
The service returns `{ context: TaskExecutionContext; metrics: ContextQualityMetrics }` but tests access `result.businessObjective` directly.
Fix all assertions to use correct nested path:
- `result.businessObjective` -> `result.context.businessObjective`
- `result.userImpact` -> `result.context.userImpact`
- `result.successMetrics` -> `result.context.successMetrics`
- `result.parentFeature` -> `result.context.parentFeature`
- `result.technicalConstraints` -> `result.context.technicalConstraints`
- `result.architecturalDecisions` -> `result.context.architecturalDecisions`
- `result.integrationPoints` -> `result.context.integrationPoints`
- `result.dataRequirements` -> `result.context.dataRequirements`
- `result.prdContextSummary` -> `result.context.prdContextSummary`
Lines affected: 91-104, 128-132, 157-164, 229-232, 256-257
Preserve existing test logic - only change property access paths.
</action>
<verify>
Run: `npm test -- --testPathPattern="TaskContextGenerationService.test.ts" 2>&1 | grep -E "(PASS|FAIL|✓|✕)"`
All tests in this file should pass.
</verify>
<done>TaskContextGenerationService.test.ts reports 0 failures, all assertions use result.context.X pattern.</done>
</task>
<task type="auto">
<name>Task 2: Fix test.skip() syntax in E2E tests</name>
<files>
src/__tests__/e2e/tools/ai-task-tools.e2e.ts
src/__tests__/e2e/tools/github-project-tools.e2e.ts
</files>
<action>
Replace incorrect `test.skip('message')` calls with early return pattern.
In ai-task-tools.e2e.ts, find all occurrences of:
```typescript
if (!condition) {
test.skip('message');
return;
}
```
Replace with:
```typescript
if (!condition) {
console.log('Skipping: message');
return;
}
```
Affected locations in ai-task-tools.e2e.ts:
- Line 77: `test.skip('No PRD generated to enhance')`
- Line 100: `test.skip('No PRD generated to parse')`
- Line 145: `test.skip('No tasks available for recommendations')`
- Line 170: `test.skip('No tasks available for complexity analysis')`
- Line 194: `test.skip('No tasks available for expansion')`
- Line 262: `test.skip('No PRD available for traceability matrix')`
In github-project-tools.e2e.ts:
- Line 217: `test.skip('No issue created to test with')`
- Line 271: `test.skip('No sprint or issue created to test with')`
- Line 324: `test.skip('No milestone created to test with')`
Also fix the beforeEach pattern at line 29-31 which incorrectly nests test.skip:
```typescript
beforeEach(() => {
if (MCPToolTestUtils.shouldSkipTest('github')) {
test.skip('Skipping test - missing credentials for github tests', () => {});
}
});
```
This pattern doesn't work - replace entire beforeEach with nothing (just remove it) since the beforeAll already handles the skip logic and individual tests should return early if utils is undefined.
</action>
<verify>
Run: `npm test -- --testPathPattern="ai-task-tools.e2e|github-project-tools.e2e" 2>&1 | grep -E "Missing second argument"`
Should return no matches (no "Missing second argument" errors).
</verify>
<done>No "Missing second argument" errors in E2E test files.</done>
</task>
<task type="auto">
<name>Task 3: Fix logger compliance regex pattern</name>
<files>src/__tests__/e2e/stdio-transport.e2e.ts</files>
<action>
The test at line 319 uses pattern `/\[.*\]/` which matches JSON arrays like `[{...}]` in valid JSON responses.
Find the logPatterns array around line 308:
```typescript
const logPatterns = [
/\[.*\]/, // Log prefixes like [MCP]
...
];
```
Replace `/\[.*\]/` with a more specific pattern that matches log timestamps but not JSON:
```typescript
const logPatterns = [
/\[\d{4}-\d{2}-\d{2}/, // Log timestamps like [2024-01-31
/\[MCP\]/, // Specific log prefix
/\[DEBUG\]/,
/\[INFO\]/,
/\[WARN\]/,
/\[ERROR\]/,
...rest of patterns unchanged
];
```
This fixes the false positive where JSON response `{"result":...}` was incorrectly matching the bracket pattern.
</action>
<verify>
Run: `npm test -- --testPathPattern="stdio-transport.e2e" 2>&1 | grep -E "Logger Compliance"`
The "Logger Compliance" test should pass.
</verify>
<done>Logger compliance test passes, no false positives from JSON bracket matching.</done>
</task>
</tasks>
<verification>
Run full test suite:
```bash
npm test 2>&1 | tail -20
```
Expected: Failing tests reduced from 44 to ~8 (only E2E credential failures remain).
The test.skip syntax errors and type access errors should all be resolved.
</verification>
<success_criteria>
1. TaskContextGenerationService.test.ts: All tests pass
2. No "Missing second argument" errors in any test file
3. stdio-transport.e2e.ts Logger Compliance test passes
4. Total failing tests reduced by ~36 (from 44 to ~8)
</success_criteria>
<output>
After completion, create `.planning/phases/04-test-stabilization/04-01-SUMMARY.md`
</output>