test: run the MCP client against the real API in CI

Open
#411 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
56/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp, github-actions, sqlite
Domain
api, ci-cd, testing

Research direction

Start by reading CLAUDE.md, the TaskFlow.Api and TaskFlow.Mcp projects, and the existing CI workflow to see how tests are run. The issue names WebApplicationFactory and a temporary SQLite database as the test harness; add coverage for the listed client operations and run the documented one-command check. Done means the acceptance criteria pass, including a CI run on every PR.

Written by the indexing model from the issue text.

Description

enhancement

Part of nevridge/TaskFlow#397. Blocked by nevridge/TaskFlow#398. This replaces the earlier options (OpenAPI snapshot, throwaway container, process rule), because the API and client now share a repo.

Problem

ApiModels.cs and TaskFlowApiClient.cs are hand-written, and the tests use hand-written fixtures. They pass against a shape the API no longer has, which is how #238, #310 and #351 drifted unnoticed.

Scope

  • Add a test project that references TaskFlow.Api and TaskFlow.Mcp and hosts the real API in-process with WebApplicationFactory and a temporary SQLite database.
  • TaskFlow has no such harness today. It needs Microsoft.AspNetCore.Mvc.Testing, and Program must be made visible to the tests.
  • Point TaskFlowApiClient at the test server's HttpClient.
  • Exercise create, update, plan, complete, block and unblock, plus reading the journal, through the client.
  • Run it in CI on every PR, with no path filter, so API-only PRs run it too.
  • Keep TaskFlow.Mcp free of any reference to TaskFlow.Api. Only the test project references both.

Acceptance criteria

  1. Re-introducing the DateTime due date makes a test fail.
  2. Renaming or removing a response field the client reads makes a test fail.
  3. The check runs locally with one command, which is documented in CLAUDE.md.
  4. The API coverage threshold is unaffected.
Dominant language
C#
Stars
1
Forks
0
Avg merge
2h 2m
Merged PRs (30d)
98

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nevridge/TaskFlow

All issues in nevridge/TaskFlow

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.