Source feedback
Misrouted from nowork-studio/notfair-mcp feedback #360 (tracker issue #847). A goal-agent session was instructed to use the NotFair goal-intake lifecycle but notfair-goals was unavailable from tool discovery.
Ground truth
- The owning implementation is this repository:
notfair/src/app/api/mcp/goals/route.ts serves notfair-goals; notfair/src/server/mcp-server/tools.ts exports the lifecycle tools.
provisionGoalAgent calls registerGoalsMcpForAgent in notfair/src/server/goals/provision.ts, but treats only thrown exceptions as failures.
registerGoalsMcpForAgent returns InstallResult, including { ok: false, error }; that non-throwing failed registration is currently swallowed, leaving a provisioned agent without required goal tools.
Bounded implementation contract
- In the goal-agent provisioning/synchronization path, treat a returned failed
registerGoalsMcpForAgent result as a failed registration rather than success.
- Preserve best-effort behavior for optional browser/catalog MCPs; do not alter credentials, server secret generation, OAuth, or unrelated MCP registrations.
- Ensure a safe subsequent provision/synchronization can repair a missing/stale
notfair-goals registration.
- Add regressions for:
- returned
{ ok: false } from goal registration;
- missing/stale registration repair without real credentials;
- a
tools/list result containing get_goal, log_goal_action, register_pull_request, and log_learning after successful provisioning.
- Run focused provisioning/registration/MCP tests and TypeScript typecheck.
Non-goals
- No eager global tool loading, auth/secret changes, production agent rewrites, or unrelated goal workflow redesign.
Refs nowork-studio/notfair-mcp#847
Source feedback
Misrouted from
nowork-studio/notfair-mcpfeedback #360 (tracker issue #847). A goal-agent session was instructed to use the NotFair goal-intake lifecycle butnotfair-goalswas unavailable from tool discovery.Ground truth
notfair/src/app/api/mcp/goals/route.tsservesnotfair-goals;notfair/src/server/mcp-server/tools.tsexports the lifecycle tools.provisionGoalAgentcallsregisterGoalsMcpForAgentinnotfair/src/server/goals/provision.ts, but treats only thrown exceptions as failures.registerGoalsMcpForAgentreturnsInstallResult, including{ ok: false, error }; that non-throwing failed registration is currently swallowed, leaving a provisioned agent without required goal tools.Bounded implementation contract
registerGoalsMcpForAgentresult as a failed registration rather than success.notfair-goalsregistration.{ ok: false }from goal registration;tools/listresult containingget_goal,log_goal_action,register_pull_request, andlog_learningafter successful provisioning.Non-goals
Refs nowork-studio/notfair-mcp#847