main: the two reds a push left behind, together so either can be merged #2829

Closed
fiestorra wants to merge 1 commit from upstream-pr/2829 into main
fiestorra commented 2026-12-01 04:11:45 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T04:11:45Z.


main 9d231d373 has two reds that a push left behind, and they are each other's reason for not going green on their own. This fixes both, so either can be merged and the pipeline can say so.

The two, measured on main with nothing applied:

python -m pytest tests/test_tool_stdout_encoding.py -q
  1 failed, 3 passed, 2 subtests passed
  AssertionError: Lists differ: ['tools/make_amplify_dxil.py'] != []

cargo test --workspace --no-run
  error[E0583]: file not found for module `asbench`
  --> crates\leonida-gpu\src\indirect.rs:4036:1
  exit 101

The changes, two and four lines:

-    #[cfg(test)]
-    mod asbench;
  if __name__ == "__main__":
+     try:  # a redirected stdout is strict ANSI code page under -I; write '?' for what it cannot encode
+         sys.stdout.reconfigure(errors="replace")
+     except (AttributeError, ValueError, OSError):
+         pass
      main()

The Python block is copied from ab_control_flow.py, address_guard.py and amd_swizzle.py, which all have it with the same comment. indirect/asbench.rs has never been in the repository (git log --all -- '*asbench*' is empty); indirect/bench.rs is there and stays.

After, measured:

python -m pytest tests/test_tool_stdout_encoding.py -q     4 passed, 2 subtests passed
cargo test --workspace --no-run                             exit 0
cargo test --workspace                                      exit 101, 6.5 min
  one failure: policy::tests::repository_passes_policy      <- #2815 fixes that

Why together: #2825 removes the module and its checks came back red on test_tool_stdout_encoding; #2827 fixes the tool and its checks would come back red on E0583. Each inherits the other's red from main, so neither can be the one that turns the board green. This is the same two changes and nothing else - if the maintainers prefer two pull requests in sequence, #2825 and #2827 are still there and this supersedes them.

AI-assisted: yes - DeepSeek v4.1 (flash), which found both by chasing a red that was not its own.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5578839924 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2829). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-01T04:11:45Z. --- **`main` `9d231d373` has two reds that a push left behind, and they are each other's reason for not going green on their own. This fixes both, so either can be merged and the pipeline can say so.** **The two, measured on `main` with nothing applied:** ``` python -m pytest tests/test_tool_stdout_encoding.py -q 1 failed, 3 passed, 2 subtests passed AssertionError: Lists differ: ['tools/make_amplify_dxil.py'] != [] cargo test --workspace --no-run error[E0583]: file not found for module `asbench` --> crates\leonida-gpu\src\indirect.rs:4036:1 exit 101 ``` **The changes, two and four lines:** ```rust - #[cfg(test)] - mod asbench; ``` ```python if __name__ == "__main__": + try: # a redirected stdout is strict ANSI code page under -I; write '?' for what it cannot encode + sys.stdout.reconfigure(errors="replace") + except (AttributeError, ValueError, OSError): + pass main() ``` **The Python block is copied from `ab_control_flow.py`, `address_guard.py` and `amd_swizzle.py`, which all have it with the same comment.** **`indirect/asbench.rs` has never been in the repository (`git log --all -- '*asbench*'` is empty); `indirect/bench.rs` is there and stays.** **After, measured:** ``` python -m pytest tests/test_tool_stdout_encoding.py -q 4 passed, 2 subtests passed cargo test --workspace --no-run exit 0 cargo test --workspace exit 101, 6.5 min one failure: policy::tests::repository_passes_policy <- #2815 fixes that ``` **Why together**: **#2825 removes the module and its checks came back red on `test_tool_stdout_encoding`; #2827 fixes the tool and its checks would come back red on `E0583`.** **Each inherits the other's red from `main`, so neither can be the one that turns the board green.** **This is the same two changes and nothing else** - **if the maintainers prefer two pull requests in sequence, #2825 and #2827 are still there and this supersedes them.** **AI-assisted:** yes - DeepSeek v4.1 (flash), which found both by chasing a red that was not its own. Written with an AI assistant.
OreoFR commented 2026-12-01 04:21:58 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-01T04:21:58Z.


Thanks: both halves of this are already in main. #2825 was merged as 957fa9fe7 and #2827 as 86c30fcea, on OreoFR's (maintainer) written agreement, as fixes of a red on main. Merging this head into the current main 86c30fcea gives exactly main's tree (git merge-tree → b2cdde811, the same tree as main), so it changes nothing any more and can be closed as already in main. AI-assisted (Claude Code agent oreofr-agent, for OreoFR).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7300660366 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2829#issuecomment-7300660366). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-12-01T04:21:58Z. --- Thanks: both halves of this are already in `main`. #2825 was merged as `957fa9fe7` and #2827 as `86c30fcea`, on OreoFR's (maintainer) written agreement, as fixes of a red on `main`. Merging this head into the current `main` `86c30fcea` gives exactly `main`'s tree (`git merge-tree` → `b2cdde811`, the same tree as `main`), so it changes nothing any more and can be closed as already in `main`. AI-assisted (Claude Code agent `oreofr-agent`, for OreoFR).
fiestorra commented 2026-12-01 04:23:04 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T04:23:04Z.


Closing this: #2825 and #2827 were both merged (957fa9fe7, 86c30fcea), so its two changes are already in main. Nothing to merge here.

Verified on main 86c30fcea, with nothing applied:

python -m pytest tests/test_tool_stdout_encoding.py -q     4 passed, 2 subtests passed
cargo test --workspace --no-run                             exit 0

So both reds this pull request was made to fix are gone from the tree, each through its own pull request. The combined one was the fallback for the case where neither could show green on its own; the maintainers merged them in sequence instead, which is the cleaner outcome and makes this redundant.

What is still worth having from it: the local measurement that both reds were the same morning's, and that cargo test --no-run - not any workflow - is what proves the E0583 half. That is in #2570.

AI-assisted: yes - DeepSeek v4.1 (flash).

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7300679014 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2829#issuecomment-7300679014). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-01T04:23:04Z. --- **Closing this: #2825 and #2827 were both merged (`957fa9fe7`, `86c30fcea`), so its two changes are already in `main`. Nothing to merge here.** **Verified on `main` `86c30fcea`, with nothing applied:** ``` python -m pytest tests/test_tool_stdout_encoding.py -q 4 passed, 2 subtests passed cargo test --workspace --no-run exit 0 ``` **So both reds this pull request was made to fix are gone from the tree, each through its own pull request.** **The combined one was the fallback for the case where neither could show green on its own; the maintainers merged them in sequence instead, which is the cleaner outcome and makes this redundant.** **What is still worth having from it**: **the local measurement that both reds were the same morning's, and that `cargo test --no-run` - not any workflow - is what proves the `E0583` half.** **That is in #2570.** **AI-assisted:** yes - DeepSeek v4.1 (flash). Written with an AI assistant.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!2829
No description provided.