Repository navigation
test: make the runner-up floor check pass on jq 1.6 - #8304
kunchenguid merged 1 commit into
Conversation
[Low impact] This test-only change appears safe to merge. Reviews (2) · Last reviewed commit: "test: accept jq's shortest spelling of t..." · Reviewed by Greptile |
|
Speaking as Kun's firstmate: thank you @lockhartheavyindustries. The fix is right. I checked it with the official jq 1.6 binary, which prints Contract-class (my own read): restore. It's test-only, and the suite now passes on jq 1.6 the way it already should. VISION: aligns on every rule. This is waiting on you for one thing: the PR body has no no-mistakes attestation. Please raise it through |
The runner-up floor check already treats a probability of 0.3 as clearing a declared floor of 0.3. jq 1.6 prints the JSON literal 0.30 as 0.3, while jq 1.7 and 1.8 keep the trailing zero, so the assertion failed only on that spelling. The canned probability is now 0.3, which jq 1.6, 1.7, and 1.8 all print the same way.
12d1af1 to
f00b829
Compare
|
Speaking as Kun's firstmate: thank you @lockhartheavyindustries. The no-mistakes raise answers my only ask. What I checked on head Gates: the attestation binds this head with every step completed, and the "PR must be raised via no-mistakes" check passes. Coverage guard and repo invariants pass. Greptile is 5/5 with no threads. It merges cleanly. Contract class (my read): restore (test-only, no product behavior change). I've queued the full suite ( |
|
Speaking as Kun's firstmate: this is merged. Thank you @lockhartheavyindustries — really appreciate you taking the time on this. |
Intent
tests/fm-dispatch-resolve.test.sh 'the runner-up clears the same floor it would need as the pick' fails on jq 1.6, which prints the JSON literal 0.30 as 0.3. The resolver logic is correct (probability 0.3 clears floor 0.3 with >=). The change is a small test-only fix accepting either spelling (fixes issue #8303). Maintainer asked for the PR to be raised through no-mistakes so the attestation binds the current head. Nothing beyond that test change is wanted.
What Changed
tests/fm-dispatch-resolve.test.sh, the "runner-up clears the same floor it would need as the pick" case now feeds the runner-up probability as0.3instead of0.30. It also expectsprobability 0.3 clears its floor 0.3in the fallback line.0.30as0.3, so the old expected string failed there. The value0.3prints the same on jq 1.6 through 1.8. (Fixes#8303.)🤖 Generated with Claude Code
Risk Assessment
✅ Low: Test-only change swaps the fixture probability 0.30 for 0.3 (same double, so the >= floor-equality boundary at bin/fm-dispatch-resolve.sh:766 is still exercised) and updates the expected fallback line to the spelling every jq version prints, matching the stated intent with no source changes.
Testing
I ran the changed test file against the real bin/fm-dispatch-resolve.sh with two jq versions. The first was the system jq 1.8.2. The second was jq 1.6, built locally from its release tarball in a throwaway temp dir. At the base commit, jq 1.6 reproduces issue #8303: the runner-up assertion is missing 'probability 0.30'. At head, the file passes on jq 1.6 and on jq 1.8.2. The transcripts are saved as evidence. The temp build was removed and the worktree is clean.
Evidence: Base test fails on jq 1.6 (reproduces #8303)
Source: Base test fails on jq 1.6 (reproduces #8303)
not ok - the runner-up clears the same floor it would need as the pick (missing: ' fallback: rule_4 (A simple bug fix with a stated root cause.) probability 0.30 clears its floor 0.3; rule_2 probability 0.55 is below its floor 0.9') base_exit=1Evidence: Head test passes on jq 1.6
Source: Head test passes on jq 1.6
jq on PATH: .../jq-1.6/jq jq-1.6 ok - per-rule confidence floors fall to the most probable runner-up that clears its own floor # all fm-dispatch-resolve tests passed head_exit=0Evidence: Head test passes on jq 1.8.2
Source: Head test passes on jq 1.8.2
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
bash tests/fm-dispatch-resolve.test.shwith system jq-1.8.2 at head (exit 0)Built jq-1.6 from the official release tarball with oniguruma in a throwaway temp dir; confirmedecho '{"p":0.30}' | jq -r .pprints0.3on 1.6 and0.30on 1.8.2PATH=<jq-1.6>:$PATH bash tests/fm-dispatch-resolve.test.shat head (exit 0, all tests passed)PATH=<jq-1.6>:$PATH bash <base a9ae3c0c copy of tests/fm-dispatch-resolve.test.sh>(exit 1: 'not ok - the runner-up clears the same floor it would need as the pick (missing ... probability 0.30 ...)')✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.
Issues
Closes #8303