Skip to content

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
feature/ITGen-RIVfrom
karsraja/ITGen-RIV-test-order
Open

Rajanna-Karthik wants to merge 1 commit into
feature/ITGen-RIVfrom
karsraja/ITGen-RIV-test-order

Conversation

@Rajanna-Karthik

Copy link
Copy Markdown
Contributor

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

  • Amazon-Q-Developer/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: Merge main into feature/smus-iam-test #3011 works without this (the field arrives in
    request.json either way), and this is types only.

…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.
@Rajanna-Karthik
Rajanna-Karthik requested a review from a team as a code owner November 6, 2026 00:36
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

3 participants