Skip to content

Commit 1f6c80b

Browse files
committed
feat/batch-changes: shorten codingAgent helper doc comments
1 parent 18a223f commit 1f6c80b

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

internal/batches/executor/run_steps.go

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -600,10 +600,8 @@ func createRunScriptFile(ctx context.Context, tempDir string, stepRun string, st
600600
}
601601

602602
// forwardCodingAgentEnv copies the model-provider auth env vars
603-
// (SRC_BATCHES_MODEL_PROVIDER_TOKEN, SRC_BATCHES_JOB_ID) from globalEnv into
604-
// stepEnv. These are placed on the v1 CliStep that runs `src batch exec` by
605-
// the Sourcegraph server; the agent CLI in the user container needs them to
606-
// reach the /.executors/model-provider/batches proxy.
603+
// (SRC_BATCHES_MODEL_PROVIDER_TOKEN, SRC_BATCHES_JOB_ID) from globalEnv
604+
// into stepEnv so they reach the user container.
607605
func forwardCodingAgentEnv(globalEnv []string, stepEnv map[string]string) {
608606
for _, key := range []string{codingagenttypes.ModelProviderTokenEnvVar, codingagenttypes.JobIDEnvVar} {
609607
for _, e := range globalEnv {
@@ -655,12 +653,10 @@ func redactSensitiveArgs(args []string) []string {
655653
return out
656654
}
657655

658-
// writeRunScriptFile writes a pre-rendered run script (e.g. a codingAgent
659-
// step desugared by the codingagent registry) verbatim to a temp file, with
660-
// the same permission semantics as createRunScriptFile. Unlike that helper,
661-
// this one does NOT pass the content through template.RenderStepTemplate:
662-
// the script is treated as opaque shell text so embedded sequences like
663-
// `{{` inside a shell-quoted prompt are not re-parsed as templates.
656+
// writeRunScriptFile writes a pre-rendered run script verbatim to a temp
657+
// file. Unlike createRunScriptFile it does NOT pass the content through
658+
// template.RenderStepTemplate, so embedded `{{` sequences in a
659+
// shell-quoted prompt are not re-parsed as templates.
664660
func writeRunScriptFile(tempDir, script string) (string, func(), error) {
665661
runScriptFile, err := os.CreateTemp(tempDir, "")
666662
if err != nil {

0 commit comments

Comments
 (0)