Commit 91c87a4
feat(azure.ai.agents): enrich manual-vars Next: block with run follow-up (P5.1 C3)
Two-part fix to ResolveAfterInit's MissingManualVars branch:
1. Enrich per-var description: was "supply the agent.yaml variable" →
now "referenced by agent.yaml but not set in azd env". The command
column already shows the var name; the description should explain
WHY the var matters so users new to the project understand they
aren't just inventing values out of nowhere.
2. Append an `azd ai agent run` follow-up after the env-set lines.
Pre-C3 the post-init Next: block stopped at the env-set lines:
Next: azd env set MY_API_KEY <value> -- referenced by agent.yaml
but not set in azd env
azd deploy -- when ready to deploy to Azure
Users had to remember the run step themselves. Issue Azure#7975's
manual-vars example explicitly ends with "Then run 'azd ai agent
run' to start locally" — surface that as a concrete follow-up so
the entire "fix env, then run" loop is visible in one Next: block:
Next: azd env set MY_API_KEY <value> -- referenced by agent.yaml
but not set in azd env
azd ai agent run -- start the agent locally
once the values above
are set
azd deploy -- when ready to deploy to Azure
Gating: the run follow-up is suppressed when UnresolvedPlaceholders
are also present, preserving the existing invariant from
ResolveAfterInit's "otherwise" branch — running locally with literal
`{{NAME}}` values produces a broken agent, so the placeholder fix-ups
must be finished first. The trailing `azd deploy` reminder still
applies.
Tests:
- TestResolveAfterInit (table) — `wantManualVarKeys` cases bump
expected length from N+1 to N+2 and assert the run follow-up
immediately after the env-set lines.
- TestResolveAfterInit_ManualVarsCapAtThree — expected length 4→5,
asserts the run follow-up sits at slot 3 (between env-set lines
and trailing deploy).
- TestResolveAfterInit_ToolboxReproRendersAllCategories — asserts
the run follow-up is intentionally absent when placeholders are
also present (gating contract).
- TestResolveAfterInit_ManualVarsSingleEmitsEnrichedShape (NEW) —
locks the single-missing-var canonical case: enriched description
text + run follow-up + trailing deploy, all in order.
Source of truth: issue Azure#7975 lines 117-127. Phase 5 C3 of the
P5.8 commit plan (Tier A — core fixes).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 709e6e8 commit 91c87a4
2 files changed
Lines changed: 84 additions & 7 deletions
Lines changed: 24 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
66 | 71 | | |
67 | 72 | | |
68 | 73 | | |
| |||
111 | 116 | | |
112 | 117 | | |
113 | 118 | | |
114 | | - | |
| 119 | + | |
115 | 120 | | |
116 | 121 | | |
117 | 122 | | |
118 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
119 | 141 | | |
120 | 142 | | |
121 | 143 | | |
| |||
Lines changed: 60 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
137 | 139 | | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
141 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
142 | 152 | | |
143 | 153 | | |
144 | 154 | | |
| |||
154 | 164 | | |
155 | 165 | | |
156 | 166 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
161 | 178 | | |
162 | 179 | | |
163 | 180 | | |
164 | 181 | | |
165 | 182 | | |
166 | 183 | | |
167 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
168 | 216 | | |
169 | 217 | | |
170 | 218 | | |
| |||
191 | 239 | | |
192 | 240 | | |
193 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
194 | 249 | | |
195 | 250 | | |
196 | 251 | | |
| |||
0 commit comments