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

Closed
github-bot wants to merge 1 commit from github-bot/gh-2829 into main AGit
Owner

@⁠fiestorra on GitHub · 2026-12-01 04:11 UTC · original
fiestorra:fix-main-reds → main · +4 −2 · 2 files · 1 commits · closed without merging

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.

**@⁠fiestorra** on GitHub · 2026-12-01 04:11 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/2829) `fiestorra:fix-main-reds` → `main` · +4 −2 · 2 files · 1 commits · closed without merging **`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.
949 - indirect.rs declares 'mod asbench' under #[cfg(test)] and the file was never
committed: cargo test --workspace fails with E0583 before running anything.

- make_amplify_dxil.py's __main__ does not set errors='replace' on stdout, which
  test_tool_stdout_encoding.py requires of every tool: main fails it on Linux and
  Windows.

Separately neither pull request can show green, because each inherits the other's
red from main. Together: the python test passes 4 of 4, cargo test --no-run
compiles, and cargo test --workspace has only the asset policy failure that #2815
fixes.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 04:16:13 +00:00
github-bot closed this pull request 2026-12-01 04:26:53 +00:00
Author
Owner

@⁠OreoFR on GitHub · 2026-12-01 04:21 UTC · original

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).

**@⁠OreoFR** on GitHub · 2026-12-01 04:21 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/2829#issuecomment-7300660366) 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).
Author
Owner

@⁠fiestorra on GitHub · 2026-12-01 04:23 UTC · original

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.

**@⁠fiestorra** on GitHub · 2026-12-01 04:23 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/2829#issuecomment-7300679014) **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

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/ubiquitarianism--leonida!2829
No description provided.