[AIR Validation to Backend] Pre-flight config against ValidateConfig before submit - #6205
Open
riddhibhagwat-db wants to merge 1 commit into
Open
[AIR Validation to Backend] Pre-flight config against ValidateConfig before submit#6205riddhibhagwat-db wants to merge 1 commit into
riddhibhagwat-db wants to merge 1 commit into
Conversation
`air run` now checks the config server-side before uploading anything, so a bad config fails fast with the backend's field-level errors instead of after the code snapshot is packaged and uploaded. The same rules back the submit gate, so the pre-flight can't disagree with what submission enforces. Fails open: the endpoint is behind a SAFE flag and older workspaces don't have it, so a disabled or missing endpoint skips the check and lets submission proceed (where the config is validated again, authoritatively). Only a populated error list -- a config the server actively rejected -- blocks. --dry-run stays local-only and needs no workspace; the pre-flight is on the submit path, where it saves the wasted upload.
riddhibhagwat-db
requested review from
ben-hansen-db,
maggiewang-db and
vinchenzo-db
August 7, 2026 23:42
riddhibhagwat-db
marked this pull request as ready for review
August 7, 2026 23:43
Contributor
Approval status: pending
|
Collaborator
Integration test reportCommit: 3fa0ddb
8 interesting tests: 4 RECOVERED, 4 SKIP
Top 3 slowest tests (at least 2 minutes):
|
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.
What & why
air runnow pre-flights the config against the backendValidateConfigRPC before uploading anything, so a bad config fails fast with the server's field-level errors instead of after the code snapshot is packaged and uploaded. The same rules back the submit gate, so the pre-flight can't disagree with what submission enforces.(See 1DD: https://docs.google.com/document/d/1xWKHisVk9YbsnmWyHE1J5OOTZTIHx2DSiyrkuTNM0NA/edit?tab=t.0#heading=h.culzh2kyug09 )
How do you know it works?
validateconfig_test.gocovers valid→pass, errors→blocking message (each pointing at its config field), fail-open on bothFEATURE_DISABLEDand 404, and the request-shape mapping (incl. omitting unset options). The submit acceptance tests (run-submit,run-submit-deps) exercise the pre-flight end-to-end: it fires, is served, and submission proceeds.go test ./experimental/air/...and the air acceptance tests pass.How to review
validateconfig.go:preflightValidatebuilds the{task, run_options}body fromrunConfig, POSTs to/api/2.0/ai-training/config:validate(rawclient.Do, since the SDK doesn't model AiTrainingService, matchingaitraining.go), and renders anyFieldErrors.FEATURE_DISABLED/ 404 / 501 skip the check and let submission proceed and only a populated error list blocks.runsubmit.gothe call is the first thingsubmitWorkloaddoes, before token/policy resolution and any upload.--dry-runis unchanged since it stays local-only and needs no workspace