Add code_source block in ai_runtime_task to provide cleaner UX - #6217
Open
ben-hansen-db wants to merge 5 commits into
Open
Add code_source block in ai_runtime_task to provide cleaner UX#6217ben-hansen-db wants to merge 5 commits into
ben-hansen-db wants to merge 5 commits into
Conversation
ben-hansen-db
marked this pull request as draft
August 10, 2026 16:24
Contributor
Approval status: pending
|
Collaborator
Integration test reportCommit: 0bb32f3
8 interesting tests: 4 RECOVERED, 4 SKIP
Top 6 slowest tests (at least 2 minutes):
|
ben-hansen-db
marked this pull request as ready for review
August 10, 2026 17:39
The "failed to rewrite <file>" wrapper interpolated the raw OS-native path, so the Windows acceptance runner emitted a backslash and the code_source_errors golden mismatched. Forward-slash it with filepath.ToSlash, matching the repo's stable-across-OSes path convention. Co-authored-by: Isaac
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.
Changes
Adds a DABs-native
code_sourceblock toai_runtime_task, givingtrain.yamlparity for code delivery inside a bundle:
At
bundle deploy, the CLI packages the directory into a content-addressed tarball(honoring
.gitignore+ sync include/exclude, narrowing toinclude_paths, orarchiving a pinned
gitbranch/commit), uploads it via normal file sync, and setsthe SDK field
ai_runtime_task.code_source_path. No proto/API change.How it works
code_sourceis not a field on the SDKjobs.AiRuntimeTask, and confignormalization drops unknown fields. A pre-normalize rewrite
(
rewriteAiRuntimeCodeSourceinbundle/config/root.go) extracts each block into aninternal
Root.AiRuntimeExtrasstash keyed by(job, task_key)so it survives thetask reordering
MergeJobTasksdoes. The build-phaseaicodemutator lowers it intocode_source_path, reusing the existing overlay-on-sync-root packaging. The stringform
code_source_path: ./diris unchanged; the two are mutually exclusive per task.Scope / follow-ups
remote_volumeis rejected as not-yet-supported (needs a deploy-phase Volume uploadbundle destroycleanup decision). Fast-follow, not a blocker.code_sourceunder atargets.*override is rejected (stash can't representper-target overrides).
air convert-to-dabsto emit this block is a separate PR.Testing
Tested e2e via
Unit tests (rewrite, validation,
filterIncludePaths) plus acceptance tests underacceptance/bundle/ai_runtime_task/(code_source_block,code_source_include_paths,code_source_git,code_source_errors) � passing on bothterraformanddirect.