Files
2026-08-24 11:09:03 +00:00

2.2 KiB

id, title, status, wave, depends_on, plan, spec
id title status wave depends_on plan spec
07-http-health-mocks Connection API, health, and mocks completed 5
04-app-oauth-webhooks
05-service-routing
06-executor-credentials
plan.md ../../specs/integrations/requirements/github-authentication.md

Task 07: Connection API, Health, And Mocks

Inputs

  • Spec: complete API Surface, Permissions, stable observable failures, and App capability status.
  • Completed service, lifecycle, and broker contracts.
  • Existing Gin controller/handler and E2E mock patterns.

Acceptance

  • Every specified status/configure/disconnect/start/callback/webhook endpoint is wired with mandatory workspace/current-user ownership, stable error codes, safe redirects, and no secret responses.
  • The old token endpoint is a workspace-required, one-release deprecated alias; health reports workspace automation/personal capability state instead of one global boolean.
  • E2E mocks independently model workspace principals, App permissions/expiry, callback state, and webhook transitions, and reset clears all new state.

Files Likely Touched

  • apps/backend/internal/github/controller.go
  • apps/backend/internal/github/controller_connections.go (new)
  • apps/backend/internal/github/controller_app.go (new)
  • apps/backend/internal/github/controller_personal.go (new)
  • apps/backend/internal/github/controller_webhook.go (new)
  • apps/backend/internal/github/handlers.go
  • apps/backend/internal/github/controller_test.go
  • apps/backend/internal/github/mock_client.go
  • apps/backend/internal/github/mock_controller.go
  • apps/backend/internal/github/mock_controller_test.go
  • apps/backend/internal/health/checks.go
  • apps/backend/internal/health/checks_test.go
  • apps/backend/internal/backendapp/helpers.go
  • apps/backend/internal/backendapp/e2e_reset.go

Verification

cd apps/backend && rtk go test ./internal/github -run 'TestHttp|TestMock'
cd apps/backend && rtk go test ./internal/health ./internal/backendapp -run 'Test.*GitHub'

Output Contract

Report final route/request/response shapes, auth/redirect handling, compatibility headers, mock controls, tests run, files touched, blockers, and risks.