[auto] docs: add reviewer-derived instructions for teardown identity and telemetry tests
- Dominant language
- Go
- Stars
- 569
- Forks
- 364
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 136
Description
Proposed by the [Update Instructions From PR Reviews](.github/workflows/update-instructions-from-pr-reviews.lock.yml) workflow.
**Settings**
- Repo mined: `Azure/azure-dev`
- Range: PRs merged since `2026-08-10T09:00:53Z` (last successful run)
- Branch: `automated/update-instructions-from-pr-reviews` @ `5411e83`
**Stats**
- Signal ratio: ~15 genuine reviewer asks kept from ~40 inline review threads (bot comments, author acknowledgements, and short replies dropped)
- Resolved PRs examined: 26 merged PRs (15 substantive PRs reviewed for comments)
**PR comment themes promoted**
- **Teardown must resolve the same runtime-stored identity as deploy** (e.g. `AGENT__NAME`) — using the static `svc.Name` leaves custom-named resources behind on `azd down` or deletes wrong resources — _[#9332](https://github.com/Azure/azure-dev/pull/9332), [#9497](https://github.com/Azure/azure-dev/pull/9497)_ (reviewers: `jongio`, `huimiu`)
- **Telemetry span-recorder tests and accurate feature-telemetry-matrix** — tests that only assert RPC response pass silently when span attributes are dropped; matrix must distinguish Command-Specific Attrs from Feature Events — _[#9174](https://github.com/Azure/azure-dev/pull/9174), [#9452](https://github.com/Azure/azure-dev/pull/9452)_ (reviewer: `jongio` × 5+ flags)
> Generated by [Update Instructions From PR Reviews](https://github.com/Azure/azure-dev/actions/runs/32012315936) · 123.2 AIC · ⌖ 12.1 AIC · ⊞ 8.1K · [◷](https://github.com/search?q=repo%3AAzure%2Fazure-dev+%22gh-aw-workflow-id%3A+update-instructions-from-pr-reviews%22&type=pullrequests)
---
> [!NOTE]
> This was originally intended as a pull request, but GitHub Actions is not permitted to create or approve pull requests in this repository.
> The changes have been pushed to branch `automated/update-instructions-from-pr-reviews`.
>
> **[Click here to create the pull request](https://github.com/Azure/azure-dev/compare/main...automated/update-instructions-from-pr-reviews?expand=1&title=%5Bauto%5D%20docs%3A%20add%20reviewer-derived%20instructions%20for%20teardown%20identity%20and%20telemetry%20tests)**
To fix the permissions issue, go to **Settings** → **Actions** → **General** and enable **Allow GitHub Actions to create and approve pull requests**. See also: [gh-aw FAQ](https://github.github.com/gh-aw/reference/faq/#why-is-my-create-pull-request-workflow-failing-with-github-actions-is-not-permitted-to-create-or-approve-pull-requests)
Show patch preview (71 of 71 lines)
```diff
From 5411e83e05be002208354517df8667a57b9564b8 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Mon, 17 Aug 2026 08:57:49 +0000
Subject: [PATCH] docs: add reviewer-derived instructions for teardown identity
and telemetry tests
Add two rules distilled from recurring PR review feedback:
1. extensions.instructions.md: teardown/lifecycle commands must resolve
the same runtime-stored env var (e.g. AGENT__NAME) used by
deploy, not recompute from the static azure.yaml service key.
2. go.instructions.md: telemetry tests must use span-recorder assertions
to verify attributes are actually emitted; feature-telemetry-matrix.md
must distinguish Command-Specific Attrs from Feature Events accurately.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
.../instructions/extensions.instructions.md | 10 ++++++++++
.github/instructions/go.instructions.md | 19 +++++++++++++++++++
2 files changed, 29 insertions(+)
diff --git a/.github/instructions/extensions.instructions.md b/.github/instructions/extensions.instructions.md
index f46a73d..910139e 100644
--- a/.github/instructions/extensions.instructions.md
+++ b/.github/instructions/extensions.instructions.md
@@ -16,3 +16,13 @@ applyTo:
- Follow extension guidelines in: cli/azd/docs/extensions/extensions-style-guide.md. If the work
violates any of these principles, include a link to the guide so the user can read it and get
ahead of some of the problems.
+
+- When an extension deploys a resource whose runtime name may differ from the azure.yaml service
+ key (e.g., Foundry agents persist the deployed name in `AGENT__NAME`), every lifecycle
+ command that references that resource — teardown, pack, publish, listen — must resolve the same
+ runtime-stored env var instead of recomputing from `svc.Name`. Using the static service key in
+ teardown when deploy wrote a different name to the environment leaves cust
... (truncated)
```
Contributor guide
Research direction
Read .github/instructions/extensions.instructions.md and .github/instructions/go.instructions.md, then review the proposed branch automated/update-instructions-from-pr-reviews at commit 5411e83. Done means both reviewer-derived rules are documented accurately, including runtime-stored teardown identity and span-recorder telemetry assertions with the correct matrix categories.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100