Skip to content

[DEVIN: Konsti] Fix failing E2E tests: CLI error string and MCP prompt name#1439

Open
devin-ai-integration[bot] wants to merge 1 commit into
devfrom
devin/1779211590-fix-ci-test-failures
Open

[DEVIN: Konsti] Fix failing E2E tests: CLI error string and MCP prompt name#1439
devin-ai-integration[bot] wants to merge 1 commit into
devfrom
devin/1779211590-fix-ci-test-failures

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

Fixes two deterministic E2E test failures on the dev branch:

  1. CLI test (apps/e2e/tests/general/cli.test.ts:611): The test expected 'File not found' but the actual CliError message is 'Config file not found: ...'. Updated to match the real error message from packages/stack-cli/src/lib/config-file-path.ts.

  2. MCP test (apps/e2e/tests/backend/endpoints/api/v1/internal/mcp.test.ts:114): The prompts/list test expected prompt name 'ask_stack_auth' but the MCP handler registers the prompt as 'skill' (apps/mcp/src/mcp-handler.ts:94). Updated the test to match the implementation.

These two failures were consistent across all E2E test workflows (regular, local emulator, custom port prefix). Other failures in CI appear to be timeouts/flaky tests that also occur on main.

- cli.test.ts: Update expected error from 'File not found' to 'Config file not found' to match actual CliError message
- mcp.test.ts: Update expected prompt name from 'ask_stack_auth' to 'skill' to match MCP handler implementation

Co-Authored-By: Konstantin Wohlwend <n2d4xc@gmail.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stack-auth-hosted-components Ready Ready Preview, Comment May 19, 2026 5:36pm
stack-auth-mcp Ready Ready Preview, Comment May 19, 2026 5:36pm
stack-auth-skills Ready Ready Preview, Comment May 19, 2026 5:36pm
stack-backend Ready Ready Preview, Comment May 19, 2026 5:36pm
stack-dashboard Ready Ready Preview, Comment May 19, 2026 5:36pm
stack-demo Ready Ready Preview, Comment May 19, 2026 5:36pm
stack-docs Ready Ready Preview, Comment May 19, 2026 5:36pm
stack-preview-backend Ready Ready Preview, Comment May 19, 2026 5:36pm
stack-preview-dashboard Ready Ready Preview, Comment May 19, 2026 5:36pm

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 19, 2026

Greptile Summary

This PR fixes two E2E test assertions that were mismatched against their implementations. Both corrections are verified against the source code they test.

  • CLI test (cli.test.ts:611): Fixes the expected error substring from "File not found" to "Config file not found", which matches the CliError message in packages/stack-cli/src/lib/config-file-path.ts line 14.
  • MCP test (mcp.test.ts:114): Fixes the expected prompt name from "ask_stack_auth" (the MCP tool name) to "skill" (the actual prompt registered in apps/mcp/src/mcp-handler.ts line 93–94).

Confidence Score: 5/5

Both test fixes are straightforward assertion corrections verified against the actual implementation — safe to merge.

Each changed assertion was confirmed against the source it tests: the CLI error string matches the exact CliError message in config-file-path.ts, and 'skill' matches the prompt name registered in mcp-handler.ts. No logic, no runtime paths, and no application code are modified.

No files require special attention.

Important Files Changed

Filename Overview
apps/e2e/tests/general/cli.test.ts Updated error string assertion from "File not found" to "Config file not found" to match the actual CliError message thrown in config-file-path.ts
apps/e2e/tests/backend/endpoints/api/v1/internal/mcp.test.ts Updated prompt name assertion from "ask_stack_auth" (the tool name) to "skill" (the actual registered prompt name in mcp-handler.ts)

Sequence Diagram

sequenceDiagram
    participant Test as E2E Test
    participant CLI as stack-cli (init --mode link-config)
    participant CFP as config-file-path.ts
    participant MCP as mcp-handler.ts

    Note over Test,CFP: CLI test fix
    Test->>CLI: run with --config-file /nonexistent/stack.config.ts
    CLI->>CFP: "resolveConfigFilePathOption(path, {mustExist: true})"
    CFP-->>CLI: throw CliError("Config file not found: ...")
    CLI-->>Test: stderr contains "Config file not found" ✓

    Note over Test,MCP: MCP test fix
    Test->>MCP: prompts/list request
    MCP-->>Test: "[{name: "skill"}]"
    Test->>Test: "assert name === "skill" ✓"
Loading

Reviews (1): Last reviewed commit: "Fix failing E2E tests: update CLI error ..." | Re-trigger Greptile

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