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

🐛 derive corpus runner: _same compares floats with ==, so the -0.0 value pin cannot bite

Open Beginner friendly
#2,216 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
testing-qa

Research direction

Start in packages/sphinx-needs/tests/test_derive_conformance.py at the _same helper, and find the fingerprint-defaults-compared-as-text case where zero = -0.0. Run the conformance tests first to see the current green baseline. Add a runner test that expects -0.0 against a 0.0 value and watch it fail, then make float comparison bitwise with NaNs treated as equal and == kept for other values. Done when the new test is red before the change, green after, and the existing conformance tests still pass.

Written by the indexing model from the issue text.

Description

bug pkg: sphinx-needs
What

The conformance runner's _same (packages/sphinx-needs/tests/test_derive_conformance.py) compares values with ==, so a float pin cannot tell -0.0 from 0.0: the case fingerprint-defaults-compared-as-text pins zero = -0.0 (its digest differs from 0.0's, which is what the case is for), and a build storing 0.0 would pass the value pin and fail only on the hex.

ubCode's runner compares floats bit for bit (f64::to_bits) since useblocks/ubcode#4048, after exactly this had hidden a storage strip there (its contract amendment A-37).

Do

Compare floats by bits (math.copysign / struct.pack or float.hex), treat every NaN as the same value, keep == for the rest; one runner test with a -0.0 expectation against a 0.0 value, red first.

Dominant language
Python
Stars
309
Forks
103
Avg merge
4h 40m
Merged PRs (30d)
154

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 useblocks/sphinx-needs

All issues in useblocks/sphinx-needs

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.