Repository navigation
feat(amazonq): add ITGen test-run and app-launch models (contract v0 draft) - #2967
Conversation
…t v0 draft) TypeScript mirror of the VS extension's AtxTestRunRequest / AtxTestRunSummary for the ITGen integration-test HITL payloads (ITGen–IDE contract v0, schema 1.0). Not wired into any handler yet. - AtxTestRunRequest: top-level artifactId (repo artifact holding the generated test projects, re-downloaded per request) and localFolder; side decides where the app starts (original: upload copy, transformed: solution), so no source code is downloaded. ATX_TEST_RUN_BASE_URL_ENV = AB_BASE_URL is set by the IDE on the port it picks. - AtxTestRunSummary: status, appUrl, startedAt/finishedAt, durationSeconds, counts, failingTests. - isSupportedAtxTestRunSchemaVersion: accepts the same major version as ATX_TEST_RUN_SCHEMA_VERSION (1.x); rejects other majors and malformed values. - Unit tests with a real Bob's Used Bookstore run reshaped to the contract.
…ct v0 draft)
TypeScript mirror of the VS extension's AtxAppLaunchRequest / AtxAppLaunchResult
for the integ-app-launch HITL (transformed-code run contract, Taskei P541522260,
merged into P541522201).
- AtxTestRunApp extracted so the test-run and app-launch requests share it.
- AtxAppLaunchRequest: side, project, attempt, app (proposal; contract v0 §6
defines only the result). Like LBV's rounds, the number of attempts is the
agent's decision, so there's no limit field.
- AtxAppLaunchResult: status STARTED | APP_NOT_STARTED, appUrl,
healthCheck {path, httpStatus}, error, logFile, durationSeconds.
- Unit tests with Bob's Used Bookstore's real first launch.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
… fields the IDE needs
Mirror of the VS extension change (contract v0 review, 10/23):
- AtxTestRunRequest: schemaVersion, runId, side, project, artifactId,
tests.projectPath, limits.projectTimeoutSeconds. Dropped round, localFolder,
app, env and limits.maxResultZipMB.
- AtxAppLaunchRequest: app is now AtxAppLaunchApp {webProject,
healthCheckPaths?, startTimeoutSeconds?}; dropped host.
ashishrp-aws
left a comment
There was a problem hiding this comment.
🤖 AI-assisted review at e522ee1.
Approving for feature/ITGen-RIV. These are type-only additions plus isSupportedAtxTestRunSchemaVersion. The interfaces match the C# models in VS staging #2965 field for field, including which fields are optional. The version check accepts only the same major version (^(\d+)\.\d+$) and rejects non-strings and malformed values, and the tests cover that. CI is green.
Non-blocking: see my note on #2965 about what the follow-up PRs that consume these should enforce (loopback-only appUrl/AB_BASE_URL, no extra credentials in the test process environment, ZIP extraction confined to the chosen folder).
Problem
The VS extension and the language server need a shared shape for the ITGen integration-test HITL payloads before the HITL handling is built. That means the test-run request and result summary, and the app-launch request and result. The contract is ITGen–IDE contract v0, schema 1.0 (https://chorus.aws.dev/doc/Mih152AhKXxa, §4–§6; Taskei P541522201 and P541522260). Replaces #2965:
feature/*branches can't take new commits.Solution
atxModels.tsgets TypeScript interfaces that match the VS extension's C# models. Nothing uses them yet.AtxTestRunRequest:schemaVersion,runId,side,project,artifactId,tests.projectPath,limits.projectTimeoutSeconds. Only what the IDE can't work out itself.artifactIdis the repo artifact that holds the generated test projects, re-downloaded per request.sidedecides where the app starts, so no source code is downloaded.ATX_TEST_RUN_BASE_URL_ENV(AB_BASE_URL) is set by the IDE on the port it picks.AtxTestRunSummary:status,appUrl,startedAt/finishedAt,durationSeconds,counts,failingTests.AtxAppLaunchRequest(one per attempt):side,project,attempt,app {webProject, healthCheckPaths?, startTimeoutSeconds?}. There's no host: the IDE picks it from the project type. This is a proposal, since v0 §6 defines only the result. There's no limit field, because the agent decides when to stop, as with LBV.AtxAppLaunchResult:status(STARTEDorAPP_NOT_STARTED),appUrl,healthCheck {path, httpStatus},error,logFile,durationSeconds.isSupportedAtxTestRunSchemaVersion: accepts the same major version asATX_TEST_RUN_SCHEMA_VERSION(1.x), and rejects other major versions and missing or malformed values.This is a draft against contract v0, frozen 10/23, so names may still change.
Testing: new
tests/atxModels.test.ts, with 10 tests:All 501 netTransform tests pass, and tsc and prettier are clean.
Matching VS extension change: https://github.com/Amazon-Q-Developer/aws-toolkit-visual-studio-staging/pull/2965
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.