Skip to content

Revert extension of -1 for None-like tags#159047

Merged
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
workingjubilee:revert-enum-tag-change
Jul 10, 2026
Merged

Revert extension of -1 for None-like tags#159047
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
workingjubilee:revert-enum-tag-change

Conversation

@workingjubilee

@workingjubilee workingjubilee commented Jul 10, 2026

Copy link
Copy Markdown
Member

Note that I am not marking this as resolving the inciting issue in question as it addresses the symptom without curing the disease.

This reverts #155850

r? @scottmcm

Said issue in question: #159035

This reverts commit 569ad99.

The PR widened the effect of this from enums with the 0..=1 range to
those with any range if they had more than 1 byte.

Unfortunately, our LLVMIR now incurs miscompilations, so revert until
we find a better fix.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 10, 2026
@scottmcm scottmcm added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jul 10, 2026
@theemathas theemathas added the stable-nominated Nominated for backporting to the compiler in the stable channel. label Jul 10, 2026
@scottmcm

Copy link
Copy Markdown
Member

I think I've convinced myself that there's an x86-backend-specific issue here: opened llvm/llvm-project#208611

This is tiny revert that seems to help, so let's do it. (It's plausible that the underlying issue is related to i1-able things specifically.) And notably the part being reverted here wasn't the most important part of the underlying change.

@bors r+ p=1 rollup=never (workaround for stable-to-stable regression causing segfaults in safe code)

@rust-bors

rust-bors Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 71d2d3d has been approved by scottmcm

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 10, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 10, 2026
…tmcm

Revert extension of `-1` for `None`-like tags

Note that I am not marking this as resolving the inciting issue in question as it addresses the symptom without curing the disease.

This reverts #155850




Said issue in question: #159035
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-various failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test [debuginfo-gdb] tests/debuginfo/zst-interferes-with-prologue.rs ... ok

failures:

---- [debuginfo-gdb] tests/debuginfo/function-call.rs stdout ----
NOTE: compiletest thinks it is using GDB version 12001000
------gdb stdout------------------------------
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Breakpoint 1 at 0x9532: file /checkout/tests/debuginfo/function-call.rs, line 36.

Breakpoint 1, function_call::main () at /checkout/tests/debuginfo/function-call.rs:36
36     zzz(); // #break

------gdb stderr------------------------------
/checkout/obj/build/x86_64-unknown-linux-gnu/test/debuginfo/function-call.gdb/function-call.debugger.script:11: Error in sourced command file:
Couldn't write extended state status: Bad address.

------------------------------------------

error: gdb failed to execute
status: exit status: 1
command: PYTHONPATH="/checkout/src/etc" "/usr/bin/gdb" "-quiet" "-batch" "-nx" "-command=/checkout/obj/build/x86_64-unknown-linux-gnu/test/debuginfo/function-call.gdb/function-call.debugger.script"
--- stdout -------------------------------
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Breakpoint 1 at 0x9532: file /checkout/tests/debuginfo/function-call.rs, line 36.

Breakpoint 1, function_call::main () at /checkout/tests/debuginfo/function-call.rs:36
36     zzz(); // #break
------------------------------------------
--- stderr -------------------------------
/checkout/obj/build/x86_64-unknown-linux-gnu/test/debuginfo/function-call.gdb/function-call.debugger.script:11: Error in sourced command file:
Couldn't write extended state status: Bad address.
------------------------------------------

@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 10, 2026
@rust-bors

rust-bors Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

💔 Test for c2fddf2 failed: CI. Failed job:

@workingjubilee

workingjubilee commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

nervous laughter this isn't like a bad sign, right? right...?

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

That's spurious
@bors retry

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 10, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 10, 2026
…tmcm

Revert extension of `-1` for `None`-like tags

Note that I am not marking this as resolving the inciting issue in question as it addresses the symptom without curing the disease.

This reverts #155850




Said issue in question: #159035
@apiraino

Copy link
Copy Markdown
Contributor

pinging @rust-lang/wg-llvm for an additional opinion, thanks!

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job x86_64-gnu-distcheck failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
.iiii....ii...i......ii..i......i......................i..i..ii......................

failures:

---- [debuginfo-gdb] tests/debuginfo/function-call.rs stdout ----
NOTE: compiletest thinks it is using GDB version 12001000
------gdb stdout------------------------------
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Breakpoint 1 at 0x1b42: file tests/debuginfo/function-call.rs, line 36.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, function_call::main () at tests/debuginfo/function-call.rs:36
36     zzz(); // #break

------gdb stderr------------------------------
/tmp/distcheck/distcheck-rustc-src/build/x86_64-unknown-linux-gnu/test/debuginfo/function-call.gdb/function-call.debugger.script:11: Error in sourced command file:
Couldn't write extended state status: Bad address.

------------------------------------------

error: gdb failed to execute
status: exit status: 1
command: PYTHONPATH="/tmp/distcheck/distcheck-rustc-src/src/etc" "/usr/bin/gdb" "-quiet" "-batch" "-nx" "-command=/tmp/distcheck/distcheck-rustc-src/build/x86_64-unknown-linux-gnu/test/debuginfo/function-call.gdb/function-call.debugger.script"
--- stdout -------------------------------
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Breakpoint 1 at 0x1b42: file tests/debuginfo/function-call.rs, line 36.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, function_call::main () at tests/debuginfo/function-call.rs:36
36     zzz(); // #break
------------------------------------------
--- stderr -------------------------------
/tmp/distcheck/distcheck-rustc-src/build/x86_64-unknown-linux-gnu/test/debuginfo/function-call.gdb/function-call.debugger.script:11: Error in sourced command file:
Couldn't write extended state status: Bad address.
------------------------------------------
---
test result: FAILED. 148 passed; 1 failed; 24 ignored; 0 measured; 0 filtered out; finished in 7.28s

Some tests failed in compiletest suite=debuginfo mode=debuginfo host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
Build completed unsuccessfully in 0:34:54
make: *** [Makefile:49: check] Error 1
Command `make check [workdir=/tmp/distcheck/distcheck-rustc-src]` failed with exit code 2
Created at: src/bootstrap/src/core/build_steps/test.rs:3766:5
Executed at: src/bootstrap/src/core/build_steps/test.rs:3772:10

--- BACKTRACE vvv
   0: <bootstrap::utils::exec::DeferredCommand>::finish_process
             at /checkout/src/bootstrap/src/utils/exec.rs:938:17
   1: <bootstrap::utils::exec::DeferredCommand>::wait_for_output::<&bootstrap::utils::exec::ExecutionContext>
             at /checkout/src/bootstrap/src/utils/exec.rs:830:21
   2: <bootstrap::utils::exec::ExecutionContext>::run
             at /checkout/src/bootstrap/src/utils/exec.rs:740:45
   3: <bootstrap::utils::exec::BootstrapCommand>::run::<&bootstrap::core::builder::Builder>
             at /checkout/src/bootstrap/src/utils/exec.rs:338:27
   4: bootstrap::core::build_steps::test::distcheck_plain_source_tarball
             at /checkout/src/bootstrap/src/core/build_steps/test.rs:3772:10
   5: <bootstrap::core::build_steps::test::Distcheck as bootstrap::core::builder::Step>::run
             at /checkout/src/bootstrap/src/core/build_steps/test.rs:3735:9
   6: <bootstrap::core::builder::Builder>::ensure::<bootstrap::core::build_steps::test::Distcheck>
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1618:36
   7: <bootstrap::core::build_steps::test::Distcheck as bootstrap::core::builder::Step>::make_run
             at /checkout/src/bootstrap/src/core/build_steps/test.rs:3718:21
   8: <bootstrap::core::builder::StepDescription>::maybe_run
             at /checkout/src/bootstrap/src/core/builder/mod.rs:480:13
   9: bootstrap::core::builder::cli_paths::match_paths_to_steps_and_run
             at /checkout/src/bootstrap/src/core/builder/cli_paths.rs:232:18
  10: <bootstrap::core::builder::Builder>::run_step_descriptions
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1145:9
  11: <bootstrap::core::builder::Builder>::execute_cli
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1124:14
  12: <bootstrap::Build>::build
             at /checkout/src/bootstrap/src/lib.rs:802:25
  13: bootstrap::main
             at /checkout/src/bootstrap/src/bin/main.rs:149:11
  14: <fn() as core::ops::function::FnOnce<()>>::call_once
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/core/src/ops/function.rs:250:5
  15: std::sys::backtrace::__rust_begin_short_backtrace::<fn(), ()>
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/sys/backtrace.rs:166:18
  16: std::rt::lang_start::<()>::{closure#0}
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/rt.rs:206:18
  17: <&dyn core::ops::function::Fn<(), Output = i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe as core::ops::function::FnOnce<()>>::call_once
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/core/src/ops/function.rs:287:21
  18: std::panicking::catch_unwind::do_call::<&dyn core::ops::function::Fn<(), Output = i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32>
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/panicking.rs:581:40
  19: std::panicking::catch_unwind::<i32, &dyn core::ops::function::Fn<(), Output = i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe>
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/panicking.rs:544:19
  20: std::panic::catch_unwind::<&dyn core::ops::function::Fn<(), Output = i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32>
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/panic.rs:359:14
  21: std::rt::lang_start_internal::{closure#0}
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/rt.rs:175:24
  22: std::panicking::catch_unwind::do_call::<std::rt::lang_start_internal::{closure#0}, isize>
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/panicking.rs:581:40
---
  29: __libc_start_main
  30: _start


Command has failed. Rerun with -v to see more details.
Bootstrap failed while executing `test distcheck`
Currently active steps:
test::Distcheck {  } at src/bootstrap/src/core/build_steps/test.rs:3718
Build completed unsuccessfully in 0:41:51
  local time: Fri Jul 10 11:07:32 UTC 2026

@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 10, 2026
@rust-bors

rust-bors Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 4677cb9 failed: CI. Failed job:

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

@bors retry
Why is this spurious failure happening so often now?

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 10, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor

@bors p=6
Scheduling this before the rollup

@rust-bors rust-bors Bot mentioned this pull request Jul 10, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 10, 2026
@rust-bors

rust-bors Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: scottmcm
Duration: 3h 14m 1s
Pushing 31e4b84 to main...

@rust-bors rust-bors Bot merged commit 31e4b84 into rust-lang:main Jul 10, 2026
14 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Jul 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing cb014fc (parent) -> 31e4b84 (this PR)

Test differences

Show 3 test diffs

Stage 1

  • [ui (polonius)] tests/ui/codegen/dont-miscompile-enums.rs: [missing] -> pass (J1)
  • [ui] tests/ui/codegen/dont-miscompile-enums.rs: [missing] -> pass (J2)

Stage 2

  • [ui] tests/ui/codegen/dont-miscompile-enums.rs: [missing] -> pass (J0)

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 31e4b8481fec5ae856d786ff3b75a5bccaf33725 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-mingw-2: 1h 31m -> 2h 39m (+75.3%)
  2. dist-android: 22m 44s -> 29m 46s (+30.9%)
  3. arm-android: 1h 38m -> 1h 8m (-30.8%)
  4. dist-apple-various: 1h 39m -> 2h 7m (+28.0%)
  5. x86_64-rust-for-linux: 36m 25s -> 46m 27s (+27.6%)
  6. x86_64-gnu-llvm-22-2: 1h 40m -> 2h 6m (+25.5%)
  7. optional-x86_64-gnu-parallel-frontend: 1h 51m -> 1h 24m (-24.8%)
  8. dist-x86_64-apple: 1h 36m -> 1h 59m (+23.1%)
  9. x86_64-gnu-llvm-22-3: 1h 54m -> 1h 28m (-22.6%)
  10. dist-ohos-aarch64: 1h 19m -> 1h 2m (-21.3%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (31e4b84): comparison URL.

Overall result: ❌ regressions - please read:

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.2% [0.0%, 0.7%] 16
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 2.2%, secondary -1.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.2% [2.2%, 2.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.4% [-1.4%, -1.4%] 1
All ❌✅ (primary) 2.2% [2.2%, 2.2%] 1

Cycles

Results (secondary -3.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.8% [-3.8%, -3.8%] 1
All ❌✅ (primary) - - 0

Binary size

Results (primary 0.0%, secondary 0.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.0% [0.0%, 0.1%] 8
Regressions ❌
(secondary)
0.0% [0.0%, 0.1%] 19
Improvements ✅
(primary)
-0.0% [-0.0%, -0.0%] 3
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.0% [-0.0%, 0.1%] 11

Bootstrap: 490.017s -> 488.684s (-0.27%)
Artifact size: 389.92 MiB -> 389.90 MiB (-0.01%)

@rustbot rustbot added the perf-regression Performance regression. label Jul 10, 2026
@workingjubilee workingjubilee deleted the revert-enum-tag-change branch July 10, 2026 17:11
KedoKudo added a commit to ornlneutronimaging/NEREIDS that referenced this pull request Jul 10, 2026
…ile in 1.97.0

Review round 1 (cross-family, Codex-found + Claude-verified against primary
sources): rust-lang/rust#159035 is an OPEN P-critical / I-miscompile /
O-x86_64 LLVM regression in 1.97.0 — optimized safe code segfaults; 1.96.1
is unaffected; the upstream revert (rust-lang/rust#159047, reverting
#155850) merged 2026-07-10 and is in no stable release. Release wheels for
the ORNL x86-64 RHEL fleet build under this pin, so 1.97.0 is unacceptable
until a fixed stable ships.

- rust-toolchain.toml: channel 1.96.1 + rationale; precedence comment
  narrowed per rustup override docs (cargo +toolchain / RUSTUP_TOOLCHAIN /
  nearer overrides win over the file).
- workflows: all 11 'toolchain:' inputs 1.97.0 -> 1.96.1.
- CONTRIBUTING.md: '(stable toolchain)' -> pinned-by-rust-toolchain.toml.

The 37 Rust-1.97 lint fixes in the previous commit are kept: they are
valid 1.96 code and future-proof the bump to the first fixed stable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
KedoKudo added a commit to ornlneutronimaging/NEREIDS that referenced this pull request Jul 11, 2026
…1 Dependabot PRs) (#707)

* chore: pin task contract for bot-PR triage (clippy 1.97 + egui 0.35 + majors)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix: clear Rust 1.97 lints (clippy::question_mark + float_literal_f32_fallback)

Rust 1.97.0 landed on CI runners (CI floated `stable`) and its new lints
fail `cargo clippy -- -D warnings` on every PR:

- clippy::question_mark at nereids-fitting/src/poisson.rs:1457 — the
  if-let-else-return-None collapses to `inner_jac.as_ref()?` (exact
  semantics-preserving rewrite; FD fallback comment retained).
- 36x float_literal_f32_fallback (rust-lang/rust#154024) in apps/gui:
  bare float literals feeding egui `impl Into<f32>` params now need an
  explicit `_f32` suffix (machine-applied via cargo clippy --fix).
- +1 proactive suffix in the cfg(linux) block darwin clippy cannot see:
  file_dialog.rs:505 anchor offset array.

Gate evidence (rustup 1.97.0): clippy -D warnings exit 0; cargo test
workspace 1264 passed / 0 failed; pixi run test-python 212 passed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* ci: repin orphaned action SHAs + pin Rust toolchain 1.97.0

Two action pins pointed at commits on no branch, which crashes
Dependabot's github_actions update job on main (find_container_branch:
'no such commit', see failing 'Dependabot Updates' runs):

- taiki-e/install-action was pinned to the orphan per-tool tag SHA
  `cargo-llvm-cov` (ci.yml) -> repinned to release tag v2.83.0
  (c7eb1735), matching security.yml's style; security.yml aligned from
  v2.82.9 to the same.
- dtolnay/rust-toolchain was pinned to a force-pushed-away `stable`
  branch head (29eef336, unreachable from every current ref) -> all 11
  steps repinned to the permanent master branch head (fa04a145), the
  README-sanctioned shape when passing an explicit `toolchain:` input.

Also pin the Rust toolchain (rust-toolchain.toml, channel 1.97.0) so a
new stable release can no longer redden all open PRs at once; workflow
`toolchain:` inputs aligned from `stable` to `1.97.0` (pre-install
optimization — rustup proxies enforce the file regardless).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: record PR #707 in task contract

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: contract — R2 CI-arbitrated green; PR2/PR3 items blocked on user checkpoint

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(ci): repin toolchain 1.97.0 -> 1.96.1 — P-critical x86-64 miscompile in 1.97.0

Review round 1 (cross-family, Codex-found + Claude-verified against primary
sources): rust-lang/rust#159035 is an OPEN P-critical / I-miscompile /
O-x86_64 LLVM regression in 1.97.0 — optimized safe code segfaults; 1.96.1
is unaffected; the upstream revert (rust-lang/rust#159047, reverting
#155850) merged 2026-07-10 and is in no stable release. Release wheels for
the ORNL x86-64 RHEL fleet build under this pin, so 1.97.0 is unacceptable
until a fixed stable ships.

- rust-toolchain.toml: channel 1.96.1 + rationale; precedence comment
  narrowed per rustup override docs (cargo +toolchain / RUSTUP_TOOLCHAIN /
  nearer overrides win over the file).
- workflows: all 11 'toolchain:' inputs 1.97.0 -> 1.96.1.
- CONTRIBUTING.md: '(stable toolchain)' -> pinned-by-rust-toolchain.toml.

The 37 Rust-1.97 lint fixes in the previous commit are kept: they are
valid 1.96 code and future-proof the bump to the first fixed stable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(fitting): analytic Jacobian for background-only KL fits + FD-fallback tests

Review round 1 P2s:

- TransmissionKLBackgroundModel::analytical_jacobian returned None (whole-
  model FD fallback) whenever the inner Jacobian was absent — including the
  background-only case (inner params fixed, just b0/b1 free) whose columns
  are trivially analytic (dT/db0 = 1, dT/db1 = 1/sqrt(E)). Mirror the
  sibling CountsBackgroundScaleModel guard: fall back to FD only when inner
  params are actually free without an analytical inner Jacobian.
- Add the two missing coverage points: FD fallback when the inner model
  lacks analytical_jacobian (wrapper returns None, fit converges via FD)
  and the background-only analytic path (exact column values + fit
  convergence).
- .harness/TASK.md: correct R1's recorded evidence command to the loop
  actually run; add R21-R25 requirement lines omitted from plan coverage.

Gates (rustup 1.96.1): clippy -D warnings exit 0; cargo test 1266 passed
0 failed (+2 new); pixi run test-python 212 passed 1 skipped.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(fitting): accumulate aliased background-column derivatives (+= not =)

Review round 2 (Codex-found, Claude-verified with an independent runtime
FD reproduction): neither TransmissionKLBackgroundModel nor its sibling
CountsBackgroundScaleModel forbids the two background/scale indices from
aliasing (pub fields, no constructor). evaluate() reads the aliased
parameter for both roles, so its true derivative is the SUM of the two
column contributions (1 + 1/sqrt(E), resp. f*T + B) — but both column
fills ASSIGNED, so the second overwrote the first (e.g. 0.5 vs correct
1.5 at E=4). Pre-existing defect; the round-1 background-only analytic
path extended its exposure. Accumulate with += instead: identical for
distinct indices (each column touched once on a zeroed matrix), correct
for aliased ones.

Adds one aliased-index regression test per model, checked against an
in-test central finite-difference oracle computed directly from
evaluate() — independent of the analytic path under test.

Gates (1.96.1): clippy -D warnings exit 0; cargo test 1268 passed
0 failed (+2); pixi run test-python 212 passed 1 skipped.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* ci: schedule wheel-policy gate on rust-toolchain.toml changes + refresh contract evidence

Review round 2 VERIFIED P1: maturin-action resolves the in-container
manylinux compiler from the repo-root rust-toolchain.toml (verified in
the pinned action source, getRustToolchain -> rustup override), so a
pin-only bump PR would change the release-wheel compiler WITHOUT
scheduling the manylinux_2_28 gate — exactly the tag-time breakage class
(0.2.0 yank) the gate exists to catch at PR time. Add the file to the
wheel-policy paths filter.

Also refresh .harness/TASK.md evidence that went stale after the
1.97.0 -> 1.96.1 repin (R5 records the deviation + its P1 rationale;
R6 re-evidenced with the final-tree gate run; R23 made count-free).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs(fitting): document background/scale index disjointness invariant

Review round 3 (cross-confirmed by both LLM families at find time): the
background-only analytic path returns Some for free sets of b0/b1 only —
if such an index ALSO designates a parameter the inner dyn FitModel
reads, the analytic column carries only the background contribution and
silently omits dT_inner/dp (undetectable through dyn FitModel; the
background indices are excluded from the inner free set by
construction). On main the same misuse fell back to FD and was correct.
No shipped configuration collides (pipeline appends kl_b0/kl_b1 as
fresh indices), so per both reviewers the fix is the API contract:
document the disjointness invariant on the pub index fields of BOTH
wrappers; the supported b0==b1 aliasing (accumulating columns) is called
out explicitly.

Also: .harness/TASK.md now follows its own supersession protocol for the
1.97.0->1.96.1 repin — R5/R6 flipped to [?] pending explicit user
approval, new R26 records the superseding 1.96.1 requirement + evidence.

Gates (1.96.1): fmt OK; clippy -D warnings exit 0; nereids-fitting lib
tests 193/0; cargo doc -D warnings exit 0 (doc-comment-only code diff —
full workspace suite unchanged from previous run at 1268/0).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(fitting): harden remaining wrapper Jacobians against aliased role indices

Review round 4 P2 (parallel-path audit of the aliased-index class fixed
in poisson.rs): NormalizedTransmissionModel and MultiplicativeBaselineModel
filled their role columns via first-match if/else-if chains, so two role
indices sharing one parameter (accepted by the pub constructors without
validation) silently kept only the first role's derivative. Convert both
chains to independent role checks that ACCUMULATE (+=) into the zeroed
matrix — identical for distinct indices, correct for aliased ones — and
document the index invariant on both structs (role-inner collisions stay
undetectable through the filtered inner free set, same as the poisson
wrappers).

The two resolution-coupled fill sites (TransmissionModelMulti density/
temperature; EnergyScale t0/L_scale FD arms) keep their first-match
layout — restructuring them for a degenerate case the pipeline cannot
construct is not worth the risk — and now carry explicit
distinct-indices-assumed comments pointing at the hardened pattern.

Adds one aliased-index FD-oracle regression test per hardened wrapper
(BackA==BackB pinned to exactly 1 + 1/sqrt(E); b0==b1 vs central FD).

Gates (1.96.1): clippy -D warnings exit 0; cargo test 1270 passed
0 failed (+2); pixi run test-python 212 passed 1 skipped.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: untrack .harness/ — session-local dev state, not repo content

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs(toolchain): correct miscompile-scope rationale for the 1.96.1 pin

rust-lang/rust#159035's underlying LLVM codegen issue predates 1.97
(LLVM 20 era); 1.97.0's enum-tag change (rust-lang/rust#155850) makes
the trigger condition far more common, and the issue's reproducer
passes on 1.96.1. The previous comment overclaimed '1.96.1 is not
affected'. Pin choice unchanged: 1.96.1 matches what main already
shipped with and avoids the widened 1.97 trigger.

Correction prompted by external review on the PR (thanks @riking).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs(claude): require concise professional PR descriptions

Root-cause fix for essay-style PR bodies: no description-style rule
existed, and the docs-hygiene section directed audit/investigation
memos INTO the PR body. New Commit Style rule: short what/why +
validation + risk; no per-edit inventories (the diff shows those), no
review-round narratives. Long-form memos move to PR comments or commit
messages; docs-hygiene pointers updated accordingly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-nominated Nominated for backporting to the compiler in the beta channel. merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. stable-nominated Nominated for backporting to the compiler in the stable channel. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants