test: cover memoryview, inverted slices, and multi-window spans in ze… #493

Closed
kotekompotek wants to merge 1 commit from upstream-pr/493 into main
kotekompotek commented 2026-11-24 06:21:26 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kotekompotek on 2026-11-24T06:21:26Z.


Claimed in the coordination issue as: TEST (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7140050149)

What and why

  • Rebased onto current main.
  • Added edge-case tests for tools/zero_span.py in tests/test_zero_span_extra.py.

Tested

  • python -m pytest tests/test_zero_span_extra.py passed after rebasing onto current main.

GPUs tested: n/a

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5467207220 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/493). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-24T06:21:26Z. --- Claimed in the coordination issue as: TEST (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7140050149) ### What and why - Rebased onto current `main`. - Added edge-case tests for `tools/zero_span.py` in `tests/test_zero_span_extra.py`. ### Tested - `python -m pytest tests/test_zero_span_extra.py` passed after rebasing onto current `main`. GPUs tested: n/a AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed.
PierreEbele commented 2026-11-24 21:25:33 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-24T21:25:33Z.


Reviewed 3161ceb: ran the new test on the PR tree and copied onto main (passes both, expected
for a coverage-only change), plus test_zero_span.py and test_zero_span_negative.py on both
trees; all green. Checked the assertions against Python's own slice semantics and that the
patched multi-window case really performs 3 window reads and would catch a first-window-only
regression. Minor: the inverted/negative ranges were already covered in
test_zero_span_negative.py, so the new value is the memoryview/bytearray and small-window
coverage; please keep the AI-assisted note in the PR description per AGENTS.md.
AI-assisted review.

Recommendation: Merge

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7144913377 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/493#issuecomment-7144913377). Originally posted by [PierreEbele](https://github.com/PierreEbele) on 2026-11-24T21:25:33Z. --- Reviewed 3161ceb: ran the new test on the PR tree and copied onto main (passes both, expected for a coverage-only change), plus test_zero_span.py and test_zero_span_negative.py on both trees; all green. Checked the assertions against Python's own slice semantics and that the patched multi-window case really performs 3 window reads and would catch a first-window-only regression. Minor: the inverted/negative ranges were already covered in test_zero_span_negative.py, so the new value is the memoryview/bytearray and small-window coverage; please keep the AI-assisted note in the PR description per AGENTS.md. AI-assisted review. **Recommendation:** Merge
kotekompotek commented 2026-11-25 06:29:21 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kotekompotek on 2026-11-25T06:29:21Z.


Thanks for the review. The AI-assisted: yes note is in the PR description, so that point is covered.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7154842127 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/493#issuecomment-7154842127). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T06:29:21Z. --- Thanks for the review. The `AI-assisted: yes` note is in the PR description, so that point is covered. AI-assisted.
kotekompotek commented 2026-11-25 08:58:24 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kotekompotek on 2026-11-25T08:58:24Z.


Rebased on current ubi/main (3f81d46ac), no conflicts. The added tests pass locally on this base (python -I).

AI-assisted: yes

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7157707403 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/493#issuecomment-7157707403). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T08:58:24Z. --- Rebased on current ubi/main (3f81d46ac), no conflicts. The added tests pass locally on this base (python -I). AI-assisted: yes
kotekompotek commented 2026-11-25 09:40:19 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kotekompotek on 2026-11-25T09:40:19Z.


@PierreEbele thanks — the AI-assisted note is in the PR description.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7158645136 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/493#issuecomment-7158645136). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T09:40:19Z. --- @PierreEbele thanks — the AI-assisted note is in the PR description.
DadaCap commented 2026-11-28 10:32:45 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T10:32:45Z.


Thanks for the contribution! This PR was reviewed by the maintainers and is being closed as part of a large batch of closures.

Reason: edge-case tests only.

If this looks like a mistake, mention @DadaCap here at any time and it will be looked at again.

AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7237965558 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/493#issuecomment-7237965558). Originally posted by [DadaCap](https://github.com/DadaCap) on 2026-11-28T10:32:45Z. --- Thanks for the contribution! This PR was reviewed by the maintainers and is being closed as part of a large batch of closures. Reason: edge-case tests only. If this looks like a mistake, mention @DadaCap here at any time and it will be looked at again. AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.

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!493
No description provided.