You've already forked agentic-coding-workflow
原型阶段
This commit is contained in:
+3
-1
@@ -92,6 +92,7 @@ func New(ctx context.Context, cfg *config.Config, dist embed.FS) (*App, error) {
|
||||
projectSvc := project.NewProjectService(projectRepo, wrappedAudit)
|
||||
requirementSvc := project.NewRequirementService(projectRepo, wrappedAudit)
|
||||
issueSvc := project.NewIssueService(projectRepo, wrappedAudit)
|
||||
prototypeSvc := project.NewPrototypeService(projectRepo, wrappedAudit)
|
||||
|
||||
notifyRepo := notify.NewPostgresRepository(pool)
|
||||
notifyDispatcher := notify.NewDispatcher(notifyRepo, log)
|
||||
@@ -121,7 +122,7 @@ func New(ctx context.Context, cfg *config.Config, dist embed.FS) (*App, error) {
|
||||
// userSvc 直接满足 middleware.SessionResolver(ResolveSession 同名同签名)。
|
||||
user.NewHandler(userSvc).Mount(r)
|
||||
notify.NewHandler(notifyRepo, userSvc).Mount(r)
|
||||
project.NewHandler(projectSvc, requirementSvc, issueSvc, userSvc, userAdminAdapter{svc: userSvc}).Mount(r)
|
||||
project.NewHandler(projectSvc, requirementSvc, issueSvc, prototypeSvc, userSvc, userAdminAdapter{svc: userSvc}).Mount(r)
|
||||
|
||||
// ===== workspace 模块装配 =====
|
||||
// 依赖图:
|
||||
@@ -267,6 +268,7 @@ func New(ctx context.Context, cfg *config.Config, dist embed.FS) (*App, error) {
|
||||
Projects: projectSvc,
|
||||
Reqs: requirementSvc,
|
||||
Issues: issueSvc,
|
||||
Prototypes: prototypeSvc,
|
||||
Workspaces: wsSvc,
|
||||
Templates: chatTplSvc,
|
||||
Messages: chatMsgSvc,
|
||||
|
||||
@@ -158,6 +158,7 @@ func TestEndToEnd_ProjectClosedLoop(t *testing.T) {
|
||||
projectSvc := project.NewProjectService(projectRepo, auditRec)
|
||||
requirementSvc := project.NewRequirementService(projectRepo, auditRec)
|
||||
issueSvc := project.NewIssueService(projectRepo, auditRec)
|
||||
prototypeSvc := project.NewPrototypeService(projectRepo, auditRec)
|
||||
|
||||
adminUser, err := userSvc.Bootstrap(ctx, "admin@local", "password123")
|
||||
require.NoError(t, err)
|
||||
@@ -166,7 +167,7 @@ func TestEndToEnd_ProjectClosedLoop(t *testing.T) {
|
||||
r := chi.NewRouter()
|
||||
r.Use(middleware.RequestID)
|
||||
user.NewHandler(userSvc).Mount(r)
|
||||
project.NewHandler(projectSvc, requirementSvc, issueSvc, userSvc, userAdminAdapterTest{svc: userSvc}).Mount(r)
|
||||
project.NewHandler(projectSvc, requirementSvc, issueSvc, prototypeSvc, userSvc, userAdminAdapterTest{svc: userSvc}).Mount(r)
|
||||
|
||||
srv := httptest.NewServer(r)
|
||||
t.Cleanup(srv.Close)
|
||||
@@ -325,6 +326,7 @@ func TestPlan3_WorkspaceClosedLoop(t *testing.T) {
|
||||
projectSvc := project.NewProjectService(projectRepo, auditRec)
|
||||
requirementSvc := project.NewRequirementService(projectRepo, auditRec)
|
||||
issueSvc := project.NewIssueService(projectRepo, auditRec)
|
||||
prototypeSvc := project.NewPrototypeService(projectRepo, auditRec)
|
||||
|
||||
adminUser, err := userSvc.Bootstrap(ctx, "admin@local", "password123")
|
||||
require.NoError(t, err)
|
||||
@@ -366,7 +368,7 @@ func TestPlan3_WorkspaceClosedLoop(t *testing.T) {
|
||||
r := chi.NewRouter()
|
||||
r.Use(middleware.RequestID)
|
||||
user.NewHandler(userSvc).Mount(r)
|
||||
project.NewHandler(projectSvc, requirementSvc, issueSvc, userSvc, userAdminAdapterTest{svc: userSvc}).Mount(r)
|
||||
project.NewHandler(projectSvc, requirementSvc, issueSvc, prototypeSvc, userSvc, userAdminAdapterTest{svc: userSvc}).Mount(r)
|
||||
workspace.NewHandler(wsSvc, wtSvc, gopSvc, userSvc, userAdminAdapterTest{svc: userSvc}).Mount(r)
|
||||
|
||||
srv := httptest.NewServer(r)
|
||||
|
||||
@@ -444,7 +444,7 @@ func (s *mcpIntegrationSuite) testStreamableHTTPFullFlow(t *testing.T) {
|
||||
// List tools — assert >= 17 tools registered
|
||||
toolsResult, err := session.ListTools(ctx, &mcpsdk.ListToolsParams{})
|
||||
require.NoError(t, err, "ListTools failed")
|
||||
assert.Len(t, toolsResult.Tools, 17, "expected at least 17 tools registered")
|
||||
assert.GreaterOrEqual(t, len(toolsResult.Tools), 17, "expected at least 17 tools registered")
|
||||
|
||||
// Call list_issues — verify response structure
|
||||
callResult, err := session.CallTool(ctx, &mcpsdk.CallToolParams{
|
||||
|
||||
Reference in New Issue
Block a user