Skip to content

test(scheduler): cover Tasks snapshot isolation - Testing Hunter - #82

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
code-hunters/testing-hunter/tasks-snapshot-isolation-82ae3283bb570045
Draft

github-actions[bot] wants to merge 1 commit into
mainfrom
code-hunters/testing-hunter/tasks-snapshot-isolation-82ae3283bb570045

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Adds TestTasksReturnsIsolatedSnapshot. Tasks() documents that it returns copies; no test protected that mutating the returned map or its tasks leaves scheduler state untouched.

Evidence: replacing v.Clone() with v in Tasks() makes the new test fail ("expected interval 25ms to be unchanged, got 1h0m0s"); it passes with the intended code.

Validation: gofmt -l . (clean), go vet ./..., go test -race -count=1 ./... all pass. Open PRs checked: only release PR #72, no overlap.

Code-Hunters-Finding: tasks.go::Scheduler.Tasks::missing-snapshot-isolation-test
Code-Hunters-Origin: github-actions

Generated by Run Testing Hunter · auto · 20.2 AIC · ⊞ 12K · ◷

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1c4b0c25-33ec-434f-90f0-e582fb48cfaf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants