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

Closed
leonida/mandy
kotekompotek wants to merge 0 commits from work/zero-span-test-memoryview into main

Pull request closed

This pull request cannot be reopened because the branch was deleted.

kotekompotek commented 2026-11-24 06:21:26 +00:00

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

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

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

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

AI-assisted.

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

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

AI-assisted: yes

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

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

@PierreEbele thanks — the AI-assisted note is in the PR description.
DadaCap commented 2026-11-28 10:32:45 +00:00

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.

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.
Sign in to join this conversation.
No description provided.