Series autopilot "skips when disabled" test passes through the crash catch-all, not the skip guard
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 83/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
- Domain
- testing
Research direction
Read server/services/seriesAutopilotScheduler.test.js cases around lines 184–201 and the guard in server/services/seriesAutopilotScheduler.js around lines 113–116. Update both skip cases to check for the appropriate skip log and confirm console.error is not called. Run the scheduler test file and verify that removing the guard makes the disabled case fail.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- JavaScript
- Stars
- 38
- Forks
- 32
- Avg merge
- 31m
- Merged PRs (30d)
- 995
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from atomantic/PortOS
-
effort:medium model:medium plan planner:opus-5-5 security
Difficulty 3/5 1-2 days Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
effort:small model:medium
Difficulty 3/5 1-2 days Newbie friendliness 57/100
atomantic/PortOS#12526 · 1 comment ·
Maintainers usually reply within 1 day
-
bug effort:high model:heavy plan
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
bug effort:medium model:medium plan
Difficulty 3/5 1-2 days Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
area:federation bug data-integrity effort:medium model:heavy plan
Difficulty 4/5 1-2 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
All issues in atomantic/PortOS
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
status: waiting for maintainer
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
mui/material-ui#49511 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
mpetazzoni/sse.js#122 ·
-
[eslint-plugin] valid-styles rejects <progress> pseudo-elements (::-webkit-progress-bar, ::-webkit-progress-value, ::-moz-progress-bar)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
swc-project/swc-next#1022 ·
Maintainers usually reply within 1 day