Skip to content

Encode i3/i6 moveClass support boundary (reject Import/Export) + restore lost #38 fixes - #39

Merged
github-actions[bot] merged 2 commits into
masterfrom
feat/i3-supported-features
Jul 20, 2026
Merged

github-actions[bot] merged 2 commits into
masterfrom
feat/i3-supported-features

Conversation

@Amantux

@Amantux Amantux commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Encodes the i3/i6 supported-feature boundary you asked for: the Web Services manual marks moveClass Import(2)/Export(4) as 'not supported on i3/i6' (only Normal/Unload/No-Eject/Closest-slot apply). The emulator models an i3, so it now returns 422 for import/export instead of silently doing a normal move.

  • MoveClass.is_supported_on_i3; moveMedium route rejects import/export.
  • Tests: unit boundary + route rejection of moveClass 2/4.

Also restores lost fixes: #38 auto-merged only its first commit before the review-fix commit was pushed, so master was missing the reviewer-proven unload-destination misroute guard + the refreshed docstrings + the specific-slot/drive-destination tests. This branch re-applies them (commit 6f55ea7).

14 moveClass/move_medium tests green.

https://claude.ai/code/session_012K5Zjc2bggcyJtFbz2D4Pw

Amantux and others added 2 commits July 20, 2026 19:28
- routes_aml_move_medium.py: the unload branch now rejects a non-slot destination
  (422). Slot and drive addresses overlap, so a moveClass=8 request with a DRIVE
  destination would otherwise silently misroute the cartridge (reviewer-proven).
- Refresh the two now-stale docstrings (module docstring in scalar_coordinate.py
  and the moveMedium route header) that still called moveClass values UNVERIFIED /
  "3=unload" — they now describe the documented bit field.
- tests/i3/test_scalar_http_move_medium.py: assert unload lands in the SPECIFIC
  target slot (was only "some slot" — a misroute gap), and that a drive
  destination is rejected with 422.

12 move_medium/moveClass tests green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012K5Zjc2bggcyJtFbz2D4Pw
The Web Services manual marks moveClass Import(2) and Export(4) as "Currently not
supported" on Scalar i3/i6 (only Normal/Unload/No-Eject/Closest-slot apply). The
emulator models an i3, so it now rejects them (422) like a real appliance instead
of silently doing a normal move.

- MoveClass.is_supported_on_i3 (false when IMPORT or EXPORT bit set).
- moveMedium route returns 422 for import/export.
- Tests: unit boundary + route rejection of moveClass 2/4.

NOTE: this branch also re-applies the #38 review fixes (unload destination guard +
refreshed docstrings + specific-slot/drive-destination tests) that were LOST when
auto-merge squashed only #38's first commit before the fix commit was pushed —
so master was missing the reviewer-proven misroute guard. Restored here.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012K5Zjc2bggcyJtFbz2D4Pw
Copilot AI review requested due to automatic review settings July 20, 2026 19:29
@github-actions
github-actions Bot merged commit b7b45fd into master Jul 20, 2026
10 of 17 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tightens the Scalar i3/i6 emulator’s AML moveMedium behavior to match the Web Services manual’s supported moveClass boundary, rejecting Import (2) and Export (4) operations instead of silently treating them as normal moves. It also restores previously-reviewed moveClass=8 unload-path fixes and adds regression coverage to ensure unload destination handling remains correct.

Changes:

  • Add MoveClass.is_supported_on_i3 and enforce it in the AML moveMedium route (422 on Import/Export).
  • Reinstate unload-path safeguards/behavior (specific-slot unload + reject drive destinations) and expand integration tests.
  • Add unit + i3 integration tests covering the i3-supported moveClass boundary and route-level rejection.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
openblade/domain/scalar_coordinate.py Adds MoveClass.is_supported_on_i3 and updates moveClass documentation/comments.
openblade/api/routes_aml_move_medium.py Rejects unsupported Import/Export moveClass values and strengthens unload destination handling.
tests/unit/test_scalar_coordinate.py Adds unit test for i3/i6 moveClass support boundary.
tests/i3/test_scalar_http_move_medium.py Adds regression/integration tests for unload destination semantics and Import/Export rejection.

Comment on lines 79 to 80
except (TypeError, ValueError):
move_class = MoveClass.NORMAL
Comment on lines 105 to +109
# slot is supplied (client hint), honor it, else the library picks an
# empty/home slot (Web Services manual).
# empty/home slot (Web Services manual). Guard the destination type:
# slot and drive addresses overlap, so an accidental drive destination
# would otherwise silently misroute the cartridge.
if destination is not None and destination[0] != "slot":
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants