Repository navigation
Emulator elements return full physical coordinate object (doc-certified i3 fidelity) - #37
Merged
Merged
Conversation
…tified)
Fetched the real Quantum Web Services manual (6-68185-01 Rev D) locally via
docs/reference/quantum/fetch.sh and read the actual contract. The element
coordinate is an OBJECT {frame,rack,section,column,row,type} (Figure 23), not the
reduced "frame,bay,slot" string the emulator returned. This is no longer a guess.
- routes_aml_library.py: _slot_coordinate builds a full ScalarCoordinate
(section=bay/module, row=slot, type=2 storage); ElementResource.coordinate is
now the object form.
- test_aml_diagnostics: assert the full coordinate object + section/row uniqueness
(was the old string prefix).
- docs/reference/i3-contract-notes.md: the certified values (coordinate shape +
the real moveClass bit field 0/2/4/8/16/32, with 3 deprecated) with citations —
never the copyrighted manual text.
- pyproject: ignore A002 (FastAPI path params like `id` are the wire contract; do
not rename — per docs/tech-debt.md).
Structure is doc-faithful; the specific field VALUES are the emulator's geometry
(the manual is Rev D 2019, appliance is 341G) — labeled accordingly, not claimed
as appliance-certified. 88 elements-consumer tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012K5Zjc2bggcyJtFbz2D4Pw
There was a problem hiding this comment.
Pull request overview
This PR updates the Quantum AML emulator’s /aml/physicalLibrary/elements response to return a full physical coordinate object (matching the documented Web Services “Figure 23” shape) instead of the legacy reduced "frame,bay,slot" string, and updates integration tests + compatibility notes to reflect the wire change.
Changes:
- Changed slot element
coordinatefrom a reduced string to a full{frame,rack,section,column,row,type}object derived fromScalarCoordinate. - Updated AML diagnostics integration test to validate the object shape and enforce uniqueness by
(section, row). - Documented the certified coordinate shape and moveClass bit-field notes (without vendor text), and updated a compatibility capture’s fidelity notes accordingly.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
openblade/api/routes_aml_library.py |
Switches ElementResource.coordinate to an object form and updates _slot_coordinate() to emit a full ScalarCoordinate dict. |
tests/integration/test_aml_diagnostics.py |
Updates assertions to validate the coordinate object shape and uniqueness semantics. |
docs/reference/i3-contract-notes.md |
Adds a non-copyrighted contract-notes doc capturing certified coordinate structure and moveClass bit-field guidance. |
compatibility/scalar-i3-341g/aml/elements-list-authed.json |
Updates fidelity notes to reflect the new coordinate object wire shape. |
pyproject.toml |
Adds global Ruff ignore for A002 with rationale tied to preserving wire-contract parameter names. |
Comment on lines
+76
to
+78
| # Full physical coordinate object {frame,rack,section,column,row,type} per the | ||
| # Web Services manual (Figure 23) — no longer a reduced string. | ||
| coordinate: dict[str, int] | None = None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using the emulator as the reference, upgrade the element coordinate to the real documented shape — verified against the emulator end-to-end.
Now grounded in the real spec, not a guess: fetched the actual Quantum Web Services manual (6-68185-01 Rev D) via
docs/reference/quantum/fetch.shand read the contract. The element coordinate is an object{frame,rack,section,column,row,type}(Figure 23), not the reduced"frame,bay,slot"string the emulator returned._slot_coordinatebuilds a fullScalarCoordinate(section = bay/module, row = slot, type = 2 storage);ElementResource.coordinateis the object form.test_aml_diagnosticsasserts the full object + section/row uniqueness (was the old string prefix).docs/reference/i3-contract-notes.mdrecords the certified values (coordinate shape + the real moveClass bit field 0/2/4/8/16/32, with3deprecated) with citations — never the copyrighted text.pyproject: ignore A002 (FastAPI path params likeidARE the wire contract; per docs/tech-debt.md).Honesty: the STRUCTURE is doc-faithful; the field VALUES are the emulator's geometry (manual is Rev D 2019; appliance is 341G) — labeled as such, not appliance-certified. 88 elements-consumer tests green (diagnostics, library-spec-parity, scalar_http client).
Next: apply the real moveClass values (8=unload, bit field) with the same emulator-as-reference approach.
https://claude.ai/code/session_012K5Zjc2bggcyJtFbz2D4Pw