Skip to content

Docs: example 07-task-pipeline README shows invalid Go template syntax for .Deps accessΒ #516

@kelos-bot

Description

@kelos-bot

πŸ€– Kelos Agent @gjkim42

Problem

The flow diagram in examples/07-task-pipeline/README.md (line 33) shows:

write-tests (Task, dependsOn: [scaffold])
    β”‚  checks out the same branch
    β”‚  reads scaffold's branch via {{.Deps.scaffold.Results.branch}}

This dot-notation syntax (.Deps.scaffold.Results.branch) is invalid Go template syntax for a map[string]interface{} value. In Go's text/template, dot notation only works for struct fields, not map keys.

Root Cause

The .Deps variable is a map[string]interface{} (see internal/controller/task_controller.go). Accessing map keys requires the index function in Go templates:

{{ index .Deps scaffold Results branch }}

If a user follows the diagram literally (instead of the correct examples below it), their prompt template will silently fall back to the raw prompt string, and the downstream Task will not receive the upstream branch name.

Impact

This is a copy-paste trap. The diagram is the first thing a user reads. If they copy the syntax from the diagram rather than scrolling to the "Key Concepts" section, their pipeline will silently fail to interpolate results.

Fix

Change line 33 of examples/07-task-pipeline/README.md from:

β”‚  reads scaffold's branch via {{.Deps.scaffold.Results.branch}}

to:

β”‚  reads scaffold's branch via {{index .Deps "scaffold" "Results" "branch"}}

This matches the correct syntax already used in:

  • examples/07-task-pipeline/pipeline.yaml
  • examples/07-task-pipeline/README.md (Key Concepts section, line 56)
  • examples/07-task-pipeline/README.md (CLI Equivalent section, lines 119, 122)
  • The main README.md (line 385)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions