Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Probe golden 34_auto_harvest_smoke is stale: CharacterSet.isDisjoint(with: inverted) now prints true on macOS

Open Beginner friendly
#22 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
67/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
swift
Domain
testing

Research direction

Start by reading Examples/llm_probes/expected/34_auto_harvest_smoke.out alongside Examples/llm_probes/34_auto_harvest_smoke.swift, then run probeMatchesStockSwift("34_auto_harvest_smoke") and compare the output on the target macOS environment. The issue identifies the differing CharacterSet.isDisjoint(with:) assertion and the golden-generation script, Tools/regen-probe-expectations.sh. Done means the probe expectation and test behavior are consistent with the intended OS support.

Written by the indexing model from the issue text.

Description

probeMatchesStockSwift("34_auto_harvest_smoke") fails on current macOS (Darwin 27, Swift 6.4 / swiftlang-6.4.0.34.1), on untouched main (d298d01):

probe 34_auto_harvest_smoke diverged from stock Swift
normalizedOut == normalizedExpected → false

The only differing line is the 14th, print(allLetters.isDisjoint(with: nonLetters)) where nonLetters = allLetters.inverted:

value
golden Examples/llm_probes/expected/34_auto_harvest_smoke.out false
stock swift Examples/llm_probes/34_auto_harvest_smoke.swift on this machine true
SwiftScript interpreter true

So the interpreter agrees with stock Swift here; it's the checked-in golden that was captured against an older Foundation where CharacterSet.isDisjoint(with:) returned false for a set and its inverse (likely a bitmap-vs-inverted-flag quirk that Apple fixed). The suite is documented as Darwin-only and goldens come from Tools/regen-probe-expectations.sh, which makes it OS-version dependent.

Options:

  • Regenerate the golden on the current OS and accept that CI's macos-15 runner may disagree until it moves to a newer image, or
  • Drop that one line from the probe (the inverse/disjoint pair is the only OS-sensitive assertion in the file), or
  • Make the harness tolerant of a per-OS golden.

Found while moving ShellKit to a version requirement in #21; unrelated to that change.

Dominant language
Swift
Stars
75
Forks
6
Avg merge
25m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Cocoanetics/SwiftScript

All issues in Cocoanetics/SwiftScript

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.