fix(automations): pass companyId into resolveExecutableActionNodes to scope round-robin user assignment
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- postgresql, typescript
Hướng nghiên cứu
Bắt đầu từ apps/api/src/instagram/services/instagram-automation-runner.service.ts và đọc ba vị trí gọi được nêu cùng với resolveExecutableActionNodes. Theo dõi cách mỗi lời gọi lấy ID công ty của tài khoản Instagram, sau đó kiểm tra cách phân công round-robin xử lý trường hợp thiếu ID. Công việc hoàn tất khi cả ba lời gọi đều truyền ID công ty và việc phân công không thể truy vấn người dùng ở các công ty khác nhau; payload không nêu tên tệp kiểm thử nào.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem Description
In apps/api/src/instagram/services/instagram-automation-runner.service.ts (resolveExecutableActionNodes, lines 1027-1035), ACTION_SET_VARIABLE round-robin user assignment checks:
context.companyId ? { companyId: context.companyId } : { companyId: { not: null } }
However, companyId is never passed in context at any of the 3 call sites (resumeWaitingExecution line 379, triggerMatchingAutomations line 748, executeAutomationBranchPath line 1728). As a result, context.companyId is always undefined, causing round-robin assignment to query users across all companies instead of only the current workspace.
Expected Behavior
companyIdmust always be passed intoresolveExecutableActionNodesfrom all runner call sites.- Round-robin assignment must fail closed (skip/error) if
context.companyIdis missing, rather than falling back to{ companyId: { not: null } }.
Where to Look
apps/api/src/instagram/services/instagram-automation-runner.service.ts(resumeWaitingExecution,triggerMatchingAutomations,executeAutomationBranchPath,resolveExecutableActionNodes)
Solution / Implementation Guide
- Pass
companyId: instagramAccount.companyIdin thecontextobject atresumeWaitingExecution(L379),triggerMatchingAutomations(L748), andexecuteAutomationBranchPath(L1728). - Inside
resolveExecutableActionNodes(L1027-1035), remove the{ companyId: { not: null } }fallback and requirecontext.companyId(or resolveassignToUserIdsscoped strictly to{ companyId: context.companyId }).
- Ngôn ngữ chính
- TypeScript
- Star
- 2
- Fork
- 1
- Merge trung bình
- 6 phút
- Pull request đã merge (30 ngày)
- 27
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của sumamakhan761/tryinstance
-
backend good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
sumamakhan761/tryinstance#65 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
backend good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
sumamakhan761/tryinstance#64 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
backend good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
sumamakhan761/tryinstance#63 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
backend good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
sumamakhan761/tryinstance#62 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
backend good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
sumamakhan761/tryinstance#60 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của sumamakhan761/tryinstance
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
makecindy/cindy#15342 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
kwitsch/claude-code-plugin-tooling#219 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
no-repo-link tool-submission
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 74/100
BraveOPotato/NoSignups#2618 ·
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100