Skip to content

[Feedback #294] Ensure live goal agents receive the notfair-goals MCP surface #100

Description

@tongchen92

Routed feedback

This is the canonical source-repository issue for NotFair feedback #294, initially filed in nowork-studio/notfair-mcp as #725.

Observed behavior

A live goal agent did not receive the notfair-goals MCP surface, despite its identity requiring lifecycle calls such as get_goal, log_goal_action, register_pull_request, and log_learning.

Verified source evidence

  • notfair/src/app/api/mcp/goals/route.ts serves the notfair-goals server from TOOLS.
  • notfair/src/server/mcp-server/tools.ts currently defines the reported lifecycle tools.
  • provisionGoalAgent calls registerGoalsMcpForAgent, but currently ignores a returned { ok: false, ... } result and only logs thrown errors. A failed registration can therefore leave a live goal agent without its required MCP server.
  • Existing registration tests cover a successful registration but do not prove recovery from a returned failed result or repair of an existing agent's missing goals-MCP config.

Scope

Make goal-agent MCP provisioning/reconciliation reliable for the existing notfair-goals server. Do not change OAuth, credentials, Google Ads behavior, or the NotFair MCP service.

Acceptance checks

  1. A successful goal-agent provision and identity synchronization leave that specific agent with exactly one notfair-goals registration, preserving its configured endpoint and authentication wiring.
  2. A { ok: false, ... } registration result is not silently treated as success; the next safe provisioning/synchronization path repairs or clearly reports the missing registration.
  3. Regression coverage simulates a stale/missing goal-server registration and a returned registration failure, then verifies the repair/error behavior without real credentials.
  4. A focused endpoint/protocol test confirms tools/list still exposes at least get_goal, log_goal_action, register_pull_request, and log_learning.
  5. Run the touched goal-provisioning/registration/MCP tests and the package typecheck.

Non-goals

  • No cross-project tool namespace changes.
  • No new Google Ads mutation surface.
  • No live credential, OAuth, or customer-account changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions