Own turn lifecycle in durable-queue tests
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- redis, sql, typescript
- Lĩnh vực
- backend, databases, distributed-systems, testing-qa
Hướng nghiên cứu
Bắt đầu với packages/junior/tests/integration/durable-queue.test.ts và đọc thêm packages/junior/src/chat/task-execution/README.md cùng policies/testing.md. Chạy các bài kiểm thử tích hợp durable-queue hiện có, sau đó bao phủ các kết quả Slack-to-worker trực tiếp được liệt kê mà không khởi tạo checkpoint hoặc thay thế các thành phần runtime do Junior sở hữu; được xem là hoàn tất khi trạng thái cuối, lịch sử SQL, các phản hồi và các lượt mention sau đó đều được assert.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Turn lifecycle coverage is split across durable-queue, agent-continue-slack, heartbeat, and large component suites. Several “integration” cases seed Redis/SQL or replace the agent runner, so they miss path bugs (accept-then-timeout, multi-slice continue).
packages/junior/tests/integration/durable-queue.test.ts should own the product outcomes below. Drive live Slack ingress → worker → real agent. Fake only the model stream and Slack HTTP. Assert user-visible replies, turn terminal state, SQL history, and that a later mention still works.
Product outcomes
| Outcome | User-visible result | Live drive |
|---|---|---|
| Happy path | One mention → one reply → turn completed → mailbox empty | Mention → run |
| Long turn survives host limit | Deadline mid-work parks at a safe boundary; fresh wake finishes with one final reply; history kept | Model does tool work, spend deadline, next queue wake finishes |
| Accepted reply is terminal | After Slack accepts a tool-free reply, turn completes once; no second post; assistant stays in SQL | Hold chat.postMessage past deadline (and/or lose lease after accept) |
| Worker dies mid-run (no accept) | Turn fails once; committed history kept; next mention works | Start run, expire lease before accept |
| Transient agent failure | Fail before input commit → retry, no Slack post; retry limit → at most one fallback | Throw before commit / until limit |
| Mid-turn steer | Second @ mention folds into the same turn; still one final reply |
Hold active run, second mention, release |
Every terminal case must leave the conversation able to take a new user mention.
Harness rules
- Start from webhook ingress or a real queue wake after a live park. Do not seed turn checkpoints for these product contracts once the live path can create the state.
- Do not replace Junior-owned runtime, resume, checkpoint, worker, lease, mailbox, or queue routing.
- Custom
agentRunneronly for edges the model stream cannot express (e.g. throw before input commit). Prefer stream + real durability otherwise. - Disrupt from outside: hold Slack HTTP, spend the host deadline, expire the lease, send a second mention.
Out of scope here
- Reply chunking / fallback copy →
finalized-reply-behavior - Cross-actor steer policy →
conversation-turn-steering-behavior - OAuth link UX / credential copy →
oauth-resume-slack - Heartbeat only enqueueing a wake for stale paused rows →
heartbeat - Cursor schema / append-only history rules → component tests
Current gaps (as of #1397)
- Have live: happy path; accept during deadline (first slice); retry / retry-limit; steer (agent hold).
- Missing live spine: long turn that times out mid-work, parks, resumes on a fresh wake, and finishes (production multi-slice shape).
- Still seeded: lease loss after accept; worker disappear mid-run; timeout-pause “leave host request.”
- Owned elsewhere / weak here: auth park+resume.
Related
- https://github.com/getsentry/junior/pull/1397 — accepted tool-free reply completes the turn
- https://github.com/getsentry/junior/pull/1381 — timeout slice gets a fresh host request
- https://github.com/getsentry/junior/issues/1114 — resume fallback after an earlier reply (related policy, separate issue)
- Sentry JUNIOR-7Y: https://sentry.sentry.io/issues/7664050472/
- Contract docs:
packages/junior/src/chat/task-execution/README.md,policies/testing.md
Requested by David Cramer.
--
- Ngôn ngữ chính
- TypeScript
- Star
- 397
- Fork
- 43
- Merge trung bình
- 7 giờ 42 phút
- Pull request đã merge (30 ngày)
- 650
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 getsentry/junior
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ 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
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/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 72/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 65/100
getsentry/junior#335 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của getsentry/junior
Issue tương tự
-
Waiting for: Product Owner
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
getsentry/sentry-javascript#26203 · 1 bình luận ·
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 76/100
bytedance/flowgram.ai#1235 ·
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 76/100
devswha/herdr-web-ui#3325 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/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 78/100