Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Series autopilot "skips when disabled" test passes through the crash catch-all, not the skip guard

Đã đóng Phù hợp với người mới
#11,999 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
83/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ệ
javascript
Lĩnh vực
testing

Hướng nghiên cứu

Đọc các trường hợp trong server/services/seriesAutopilotScheduler.test.js quanh dòng 184–201 và guard trong server/services/seriesAutopilotScheduler.js quanh dòng 113–116. Cập nhật cả hai trường hợp bỏ qua để kiểm tra log bỏ qua phù hợp và xác nhận rằng console.error không được gọi. Chạy tệp kiểm thử scheduler và xác minh rằng trường hợp bị tắt sẽ thất bại khi bỏ guard.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

effort:low model:light plan planner:fable-5-1 test-quality tests

Slice audited: scheduled-work tests (test-quality audit, 2026-10-18).

Problem

server/services/seriesAutopilotScheduler.test.js:184-189 ("skips when the schedule was disabled since registration") asserts only expect(startSeriesAutopilot).not.toHaveBeenCalled(). The guard it names is server/services/seriesAutopilotScheduler.js:113-116 (if (!entry) { log; return; }).

Mutation probe (scratch worktree): deleted the four-line if (!entry) block.

Tests  18 passed (18)

Execution falls through to runOptionsFor(undefined), which throws TypeError on entry.provider; the timer callback's outer try/catch logs a ❌ … failed line and returns, so the negative spy is satisfied by the crash rather than the skip. The sibling case at :201 ("skips when the series no longer exists") has the same shape.

Impact

A scheduled multi-stage series-autopilot LLM run (provider spend) can fire while the user has it disabled if a refactor makes runOptionsFor null-tolerant and drops or moves the guard; the only signal would be a log line, and the suite stays green.

Fix (decided)

In both cases, spy on console.log and console.error, assert the disabled/removed since registration — skipping run (or no longer exists) line was logged, and assert console.error was not called. No production code change (returning a { skipped } value is acceptable if preferred, but not required).

Scope: small

Acceptance criteria

  • Deleting the if (!entry) block fails the "disabled since registration" case.
  • Both skip cases assert the skip log line and the absence of an error log.
  • No production code change required.
Ngôn ngữ chính
JavaScript
Star
38
Fork
32
Merge trung bình
40 phút
Pull request đã merge (30 ngày)
988

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của atomantic/PortOS

Tất cả issue của atomantic/PortOS

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.