Repository navigation
feat(amazonq): model the 1.1 testOrder field on the test-run request and summary - #3032
Open
Rajanna-Karthik wants to merge 1 commit into
Open
Rajanna-Karthik wants to merge 1 commit into
Rajanna-Karthik wants to merge 1 commit into
Conversation
…and summary ## Problem `atxModels.ts` says its ITGen interfaces "match C# AtxTestRunRequest / AtxTestRunSummary ... in the VS extension", but neither has the `testOrder` field schema 1.1 sends, and the `AtxTestRunRequest` docblock still lists only `AB_BASE_URL`, `AB_SIDE` and `AB_RUN_ID` as the variables the IDE sets. Nothing breaks today: the agent's `request.json` is downloaded and handed to the IDE by path, and a TS interface is compile-time only, so `JSON.parse` keeps `testOrder` whether it's declared or not. But the two copies of the contract that claim to match each other now differ, so the next change here that types or validates these payloads would drop a field the agent relies on. ## Changes - `AtxTestRunRequest.testOrder?: string` — optional, added in 1.1. `pre_run_loop.py` sends it as `default`, `reverse` or `shuffle:<seed>`; the agent asks for a second order before it freezes a suite, so the IDE sets `AB_TEST_ORDER` from it. - `AtxTestRunSummary.testOrder?: string` — echoed back. `evaluate-pre-run-request.schema.json` says "Write testOrder in summary.json when the run used AB_TEST_ORDER", and EVALUATE_PRE_RUN tells the two orders of a suite apart by it. - The `AtxTestRunRequest` docblock now lists `AB_SCREENSHOTS_DIR` and `AB_TEST_ORDER` alongside the three it already named. Types only — no handler reads or writes these fields, and `completeHitlWithTestResults` is untouched. ## Testing - New `atxModels.test.ts` case: a request with `testOrder: 'reverse'` round-trips through JSON with the field, and one without it serializes no `testOrder` key (a 1.0 payload). - `atxModels.test.ts`: 11 passing. - `tsc --noEmit` on `aws-lsp-codewhisperer`: clean. ## Related - aws-toolkit-visual-studio-staging#3011 is the IDE side that reads `testOrder` and sets `AB_TEST_ORDER`, `AB_SCREENSHOTS_DIR` and the corrected `AB_SIDE`. The two are independent: #3011 works without this (the field arrives in `request.json` either way), and this is types only.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
xueningl-az
approved these changes
Nov 6, 2026
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.
Problem
atxModels.tssays its ITGen interfaces "match C# AtxTestRunRequest /AtxTestRunSummary ... in the VS extension", but neither has the
testOrderfield schema 1.1 sends, and theAtxTestRunRequestdocblockstill lists only
AB_BASE_URL,AB_SIDEandAB_RUN_IDas thevariables the IDE sets.
Nothing breaks today: the agent's
request.jsonis downloaded and handedto the IDE by path, and a TS interface is compile-time only, so
JSON.parsekeepstestOrderwhether it's declared or not. But the twocopies of the contract that claim to match each other now differ, so the
next change here that types or validates these payloads would drop a
field the agent relies on.
Changes
AtxTestRunRequest.testOrder?: string— optional, added in 1.1.pre_run_loop.pysends it asdefault,reverseorshuffle:<seed>;the agent asks for a second order before it freezes a suite, so the IDE
sets
AB_TEST_ORDERfrom it.AtxTestRunSummary.testOrder?: string— echoed back.evaluate-pre-run-request.schema.jsonsays "Write testOrder insummary.json when the run used AB_TEST_ORDER", and EVALUATE_PRE_RUN
tells the two orders of a suite apart by it.
AtxTestRunRequestdocblock now listsAB_SCREENSHOTS_DIRandAB_TEST_ORDERalongside the three it already named.Types only — no handler reads or writes these fields, and
completeHitlWithTestResultsis untouched.Testing
atxModels.test.tscase: a request withtestOrder: 'reverse'round-trips through JSON with the field, and one without it serializes
no
testOrderkey (a 1.0 payload).atxModels.test.ts: 11 passing.tsc --noEmitonaws-lsp-codewhisperer: clean.Related
side that reads
testOrderand setsAB_TEST_ORDER,AB_SCREENSHOTS_DIRand the correctedAB_SIDE. The two areindependent: Merge main into feature/smus-iam-test #3011 works without this (the field arrives in
request.jsoneither way), and this is types only.