AI Agents SDE Task Viewer
      • Context
      • Plan
      • Prd
  1. Home
  2. AgentSDE
  3. agent-core
  4. gh-382
  5. plan
  6. context.json
context.json(4.1 KB)· Apr 12, 2026
{
  "meta": {
    "agent": "planner",
    "task_id": "382",
    "title": "Fix E2E failures after multi-tenant RC release",
    "created_at": "2026-04-12T08:45:00Z"
  },
  "inputs": [
    {
      "name": "issue-382",
      "type": "context",
      "ref": "https://github.com/AgentSDE/agent-core/issues/382",
      "notes": "E2E failures after multi-tenant RC release"
    },
    {
      "name": "e2e-run-apr8",
      "type": "log",
      "ref": "gh run 24117833783",
      "notes": "3 failed: DIRECTIVE-04, DIRECTIVE-03, SYNC-ARTEFACTS-01"
    },
    {
      "name": "e2e-run-apr7",
      "type": "log",
      "ref": "gh run 24064306384",
      "notes": "6 failed: DIRECTIVE-04, DIRECTIVE-03, REVIEW-01, DELIVER-01, PERMISSIONS-03, PERMISSIONS-04"
    }
  ],
  "outputs": [
    {
      "name": "plan",
      "type": "plan",
      "format": "md",
      "content": "plan.md"
    }
  ],
  "files": [
    {
      "path": "src/platform/github-platform.provider.ts",
      "action": "create",
      "reason": "Real PlatformProvider implementation delegating to GitHubService"
    },
    {
      "path": "src/platform/platform.module.ts",
      "action": "modify",
      "reason": "Wire GitHubPlatformProvider instead of no-op default"
    },
    {
      "path": "src/phase-router/phase-router.service.ts",
      "action": "modify",
      "reason": "Apply mode directive changes in webhook path"
    },
    {
      "path": "src/webhook/webhook.controller.ts",
      "action": "modify",
      "reason": "Use get() for GITHUB_WEBHOOK_SECRET, skip verification when unset"
    },
    {
      "path": "src/tenant/tenant.constants.ts",
      "action": "modify",
      "reason": "Remove duplicate PLATFORM_PROVIDER token"
    },
    {
      "path": "src/tenant/tenant.module.ts",
      "action": "modify",
      "reason": "Remove local PLATFORM_PROVIDER provision"
    },
    {
      "path": "src/platform/github-platform.provider.spec.ts",
      "action": "create",
      "reason": "Unit tests for new provider"
    },
    {
      "path": "src/phase-router/phase-router.service.spec.ts",
      "action": "modify",
      "reason": "Test mode directive handling"
    },
    {
      "path": "src/directive/directive.service.spec.ts",
      "action": "modify",
      "reason": "Update mock verification"
    }
  ],
  "steps": [
    {
      "id": "S1",
      "summary": "Create GitHubPlatformProvider and wire into PlatformModule",
      "acceptance": [
        "GitHubPlatformProvider exists and delegates postComment/closePR/deleteBranch to GitHubService",
        "PlatformModule uses useClass: GitHubPlatformProvider instead of no-op useValue",
        "PlatformModule imports GitHubModule for DI resolution",
        "Unit tests verify delegation to GitHubService"
      ],
      "depends_on": []
    },
    {
      "id": "S2",
      "summary": "Fix PhaseRouterService to apply mode directive changes in webhook path",
      "acceptance": [
        "PhaseRouterService step 2d sets task.directive for auto/quick/careful directives",
        "task.directive is saved before gate clearing",
        "Unit test: /agent auto on gated task sets directive=auto and clears gate"
      ],
      "depends_on": []
    },
    {
      "id": "S3",
      "summary": "Fix webhook secret handling and clean up duplicate PLATFORM_PROVIDER token",
      "acceptance": [
        "webhook.controller.ts uses get() for GITHUB_WEBHOOK_SECRET",
        "Signature verification is skipped when secret is empty/undefined",
        "tenant.constants.ts re-exports PLATFORM_PROVIDER from platform-provider.interface.ts",
        "TenantModule does not provide its own PLATFORM_PROVIDER",
        "All existing tests pass with zero lint warnings"
      ],
      "depends_on": [
        "S1"
      ]
    }
  ],
  "risks": [
    {
      "risk": "Replacing no-op PlatformProvider may expose untested GitHubService calls",
      "mitigation": "All specs already mock GitHubService; verify PlatformProvider mocks are added where needed"
    },
    {
      "risk": "Mode directive change in PhaseRouterService alters gating behavior",
      "mitigation": "This is the intended fix — E2E tests verify the corrected behavior"
    }
  ],
  "assumptions": [
    "E2E environment sets GITHUB_OWNER correctly — owner-scoped queries resolve for all test tasks",
    "The no-op PlatformProvider is the primary cause of DirectiveService silent failures",
    "PhaseRouterService not applying mode directives is the root cause of DIRECTIVE-04 E2E timeout"
  ],
  "open_questions": []
}
Plan