fix(integrations): stop simulated GitLab merge request iids repeating
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
- 78/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ệ
- typescript
- Lĩnh vực
- backend
Hướng nghiên cứu
Mở src/lib/adapters/simulated/gitlab.ts và đọc eventsInSlot, bắt đầu với nhánh merge request trong đó iid là (slot % 10_000) + 1, rồi đến nhánh release tag bên cạnh và các lane laneSerial từ #383. Suy ra iid và tag từ chính slot để chúng vẫn duy nhất trong 30 ngày mô phỏng đồng thời vẫn là số nguyên dương mà adapter thật chấp nhận, và giữ cho dải lane lưu lượng cao không bị trùng. Thêm assertion về dedupe key nhiều ngày vào src/lib/adapters/simulated/index.test.ts, sau đó chạy npm test -- src/lib/adapters/simulated/index.test.ts, npm run typecheck và npm run lint. Hoàn thành nghĩa là không có dedupe key lặp lại ở lưu lượng mặc định hay MAX_EVENT_VOLUME, với các sự kiện GitLab mô phỏng khác và các metric không thay đổi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Context
Found by the Fable review of #384 (round 1, review https://github.com/eddiejaoude/DevMacro/pull/384#pullrequestreview-5887811699). It exists on main and is not caused by #383.
The simulated GitLab profile numbers its merged merge requests (slot % 10_000) + 1 (src/lib/adapters/simulated/gitlab.ts, the merge request branch of eventsInSlot). Slots are 10 seconds, so the iid repeats every 10,000 slots (about 27.8 hours). The real GitLab adapter builds the merge request event's dedupe key from the iid, so a later merge request that lands on a repeated iid in the same project produces the same dedupe key, and the store's upsert drops it as a duplicate. The timeline then silently loses an occasional merged event. Release tags (v1.<minor>.<patch>) have only about 500 possible values and repeat the same way.
Plan
- Give default-volume merge requests an iid that does not repeat within any realistic window, for example one derived from the slot itself rather than the slot modulo 10,000, keeping it a positive integer the real adapter accepts.
- Do the same for release tags, or include enough of the slot to keep the tag unique per project.
- Keep the higher-volume lanes added in #383 (
laneSerial) clear of the new default range. - Add a test that runs the simulated GitLab profile over several UTC days and asserts no dedupe key repeats.
Acceptance criteria
- Over at least 30 simulated days, no simulated GitLab merge request or release event repeats a dedupe key at the default volume or at
MAX_EVENT_VOLUME. - Other simulated GitLab events and metrics are unchanged.
- Playwright e2e coverage is not needed: this is pure simulated-adapter generation with no browser flow.
Files and areas
In scope: src/lib/adapters/simulated/gitlab.ts, src/lib/adapters/simulated/index.test.ts.
Non-goals: the real GitLab adapter, other simulated providers, event volume.
Verification
npm test -- src/lib/adapters/simulated/index.test.ts
npm run typecheck
npm run lint
Branch: <issue-number>-simulated-gitlab-unique-ids
Closes with a Closes #<issue-number> footer on the commit or pull request.
Model: anthropic/claude-opus-5-5 | Reasoning effort: low
- Ngôn ngữ chính
- TypeScript
- Star
- 1
- Fork
- 1
- Merge trung bình
- 6 giờ 56 phút
- Pull request đã merge (30 ngày)
- 136
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- 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 eddiejaoude/StackDash
-
area: docs documentation priority: P3 size: S
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
eddiejaoude/StackDash#462 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: web bug priority: P3 size: XS
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
eddiejaoude/StackDash#432 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: database bug priority: P3 size: S
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
eddiejaoude/StackDash#419 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: docs bug priority: P2 size: XS
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
eddiejaoude/StackDash#418 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
accessibility area: timeline bug priority: P3 size: XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
eddiejaoude/StackDash#389 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của eddiejaoude/StackDash
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
open-webui/tether#52 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`void platform install --app-access public` fails when Cloudflare reports Access is disabledĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
voidzero-dev/void#835 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
AykutSarac/jsoncrack.com#616 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
melgarafael/DeskcommCRM#4679 ·
Maintainer thường phản hồi trong vòng 1 ngày