Skip to content

feat(templates): use {{ agent_display_name }} in all four base templates#758

Draft
Copilot wants to merge 1 commit into
mainfrom
copilot/ensure-consistent-agent-display-name
Draft

feat(templates): use {{ agent_display_name }} in all four base templates#758
Copilot wants to merge 1 commit into
mainfrom
copilot/ensure-consistent-agent-display-name

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 26, 2026

Summary

{{ agent_display_name }} was only referenced from 1es-base.yml and stage-base.yml. The standalone (base.yml) and job-target (job-base.yml) templates hard-coded displayName: "Agent" for the top-most user-facing label, so every pipeline rendered identically in the ADO UI regardless of the agent's name:.

  • Templates: Replace the literal displayName: "Agent" on the Agent job in src/data/base.yml and src/data/job-base.yml with {{ agent_display_name }}, matching the existing stage-level usage in the 1ES and stage templates.
  • Docs: Update docs/template-markers.md and site/src/content/docs/reference/template-markers.mdx to document the marker as used by all four base templates instead of a 1ES/stage-only subset.
  • Snapshots: Regenerate the 26 dogfood tests/safe-outputs/*.lock.yml fixtures; the diffs also pick up incidental drift (compiler 0.30.1 → 0.30.2, Copilot CLI v1.0.47 → v1.0.48) from recompiling against the current binary.

Example diff for the standalone template:

  - job: Agent
-   displayName: "Agent"
+   displayName: {{ agent_display_name }}

…which now renders e.g. displayName: "Daily safe-output smoke: noop" instead of displayName: "Agent".

Test plan

  • cargo test --release --test compiler_tests tricky — the YAML-escaping regression tests for tricky agent names (embedded " and :) still pass, confirming yaml_double_quoted handles the new substitution sites.
  • cargo test --release — 103 passing; the 11 pre-existing --debug-pipeline failures reproduce on a clean main and are unrelated.
  • Manually inspected git diff tests/safe-outputs/noop.lock.yml to confirm the only structural change is the Agent-job displayName flipping to the front-matter name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants