🐛 derive corpus runner: _same compares floats with ==, so the -0.0 value pin cannot bite
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
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
- 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 useblocks/sphinx-needs
-
documentation pkg: sphinx-needs
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
useblocks/sphinx-needs#2379 ·
Maintainers usually reply within 1 day
-
bug pkg: sphinx-needs
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
useblocks/sphinx-needs#2338 ·
Maintainers usually reply within 1 day
-
bug pkg: sphinx-needs
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
useblocks/sphinx-needs#2335 ·
Maintainers usually reply within 1 day
-
bug pkg: sphinx-needs
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
useblocks/sphinx-needs#2332 ·
Maintainers usually reply within 1 day
-
📚 the "own service" example in docs/services/index.rst cannot be registeredPossibly taken @chrisjsewell claimed this 10 days ago. Opendocumentation pkg: sphinx-needs
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
useblocks/sphinx-needs#2327 ·
Maintainers usually reply within 1 day
All issues in useblocks/sphinx-needs
Similar issues
-
area/profiles comp/cli P3 type/feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NousResearch/hermes-agent#146372 ·
Maintainers usually reply within 1 day
-
[BUG] OpenAI-compatible embedding model alias breaks embedder constructionPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
[oblt-aw][autodoc] Document obs-aw-automerge contract and fix automerge doc inconsistenciesPossibly taken @github-actions claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
GeoSeries scale and skew tests fail with pytest 9.2.0Possibly taken @jiayuasu claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
admission-deferred priority: medium status: ready work-class: scoped
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
melodic-software/claude-code-plugins#10887 · 4 comments ·
Maintainers usually reply within 1 day