Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/aw/actions-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"entries": {
"actions/github-script@v9.0.0": {
"repo": "actions/github-script",
"version": "v9.0.0",
"sha": "3a2844b7e9c422d3c10d287c895573f7108da1b3"
},
"github/gh-aw-actions/setup@v0.80.9": {
"repo": "github/gh-aw-actions/setup",
"version": "v0.80.9",
"sha": "8c7d04ebf1ece56cd381446125da3e0f6896294a"
}
}
}
6 changes: 3 additions & 3 deletions .github/skills/update-otel-genai-conventions/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ Search using the requested release version, CHANGELOG ref, date range, or upstre

Do not silently ignore search failures. If GitHub search/listing is unavailable, report the problem and ask the user whether to proceed without the preflight.

A standing **upstream-scan tracking PR** (one carrying the `otel-genai-tracking` state block) is the exception: it is the durable scan record, not a blocking duplicate. When the preflight surfaces it, refresh it per **Refreshing the tracking PR** in [references/pr-description.md](references/pr-description.md#refreshing-the-tracking-pr) instead of stopping.
A standing **upstream-scan tracking PR** (one carrying the `otel-genai-tracking` state block) is the exception: it is the durable scan record, not a blocking duplicate. When the preflight surfaces it, continue rather than stopping -- the maintaining workflow owns how that PR is created and incremented.

### Analyzing the Release / PRs

Expand All @@ -221,7 +221,7 @@ For Step 4, read the source files listed in [references/file-inventory.md](refer

### PR Title and Description Guidance

When creating or updating a PR after implementing GenAI semantic-conventions changes (from either repo), follow [references/pr-description.md](references/pr-description.md) for the title format and the changes-table shape. For a recurring **upstream-scan tracking PR** (the kind carrying the `otel-genai-tracking` state block), that reference also defines the full body template -- the implemented-changes table, the merged and in-flight applicability tables, and, at the very bottom, the machine-readable tracking state block (the body ends there). The refresh procedure for that PR lives in the skill itself, not in the PR body.
When creating or updating a PR after implementing GenAI semantic-conventions changes (from either repo), follow [references/pr-description.md](references/pr-description.md) for the title format and the changes-table shape. For a recurring **upstream-scan tracking PR** (the kind carrying the `otel-genai-tracking` state block), that reference also defines the full body template -- the implemented-changes table, the merged and in-flight applicability tables, and, at the very bottom, the machine-readable tracking state block (the body ends there).

---

Expand Down Expand Up @@ -353,7 +353,7 @@ Critical knowledge from past PR reviews that should inform all modes:
- **No CHANGELOGs**: This repository no longer maintains per-library CHANGELOG.md files. Do NOT create or update any CHANGELOG files.
- **Source-generated JSON**: Adding new OTel part types requires: (1) new inner class, (2) `[JsonSerializable]` registration on `OtelContext`, (3) switch case in `SerializeChatMessages()`.
- **LoggerMessage text**: When using `[LoggerMessage]`, the message text should match the OTel event name for console logger readability.
- **No orphan constants**: Never add a constant to `OpenTelemetryConsts.cs` unless the same PR also adds at least one emission site for it. If the convention defines an attribute that no current client populates, classify the change as 🟒 *Constant not yet emitted* and defer the constant β€” do not add it ahead of emission. Verify with `grep -rn NewConstantName src/Libraries/Microsoft.Extensions.AI/` before submitting.
- **No orphan constants**: Never add a constant to `OpenTelemetryConsts.cs` unless the same PR also adds at least one emission site for it. If the convention defines an attribute that no current client populates, classify the change as 🟒 *Constant not yet emitted* and defer the constant β€” do not add it ahead of emission. Verify with `grep -rn NewConstantName src/Libraries/Microsoft.Extensions.AI/` before submitting. This defer rule applies **only** to brand-new attributes/metrics that have no emission site. A change to a convention item the code **already emits** β€” a type/unit change (e.g. `gen_ai.request.top_k` `double` β†’ `int`), a requiredness/scope change, a rename, a sampling-relevance change, or a new well-known value for an already-emitted attribute β€” is actionable and must be applied in the same pass, not deferred. Deferral marks individual constants; it is never a reason to skip the overall update.
- **Area-aware constants**: Pick the nested class in `OpenTelemetryConsts.cs` based on the upstream area: `GenAI.*` for `gen-ai/*`, `MCP.*` for `mcp/*`. Provider-specific attributes (`openai.*`, `anthropic.*`, `aws-bedrock.*`, `azure-ai-inference.*`) generally belong in the **provider package's** constants file, not in `Microsoft.Extensions.AI/OpenTelemetryConsts.cs`. See [references/implementation-patterns.md Β§Area placement guidance](references/implementation-patterns.md#area-placement-guidance).

## Validation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Keep release-specific findings in the PR description or implementation summary;

## Upstream-scan tracking PR body template

A recurring **upstream-scan tracking PR** records the state of the last upstream scan and lists every merged `Unreleased` change and every open upstream PR with its applicability to this repo. This skill is responsible for producing that PR's full title and body. Assemble the body in the order below, and **keep the machine-readable tracking state and the refresh instructions at the very bottom** so the human-facing content (what shipped, then the applicability tables) leads.
A recurring **upstream-scan tracking PR** records the state of the last upstream scan and lists every merged `Unreleased` change and every open upstream PR with its applicability to this repo. This skill is responsible for producing that PR's full title and body. Assemble the body in the order below, and **keep the machine-readable tracking state at the very bottom** so the human-facing content (what shipped, then the applicability tables) leads.

### 1. Status note (optional)

Expand Down Expand Up @@ -90,7 +90,7 @@ Legend: πŸ”΄ implemented here Β· βœ… already aligned Β· 🟑 watch/deferred Β·

### In-flight upstream changes (open PRs) -- applicability if merged

Filter: open PRs proposing convention changes (exclude pure dependency / CI / chore PRs; list the excluded numbers).
List **every** open PR in `open-telemetry/semantic-conventions-genai`, each assessed for applicability to this repo using the same columns and indicators as the merged table (dependency / CI / chore PRs are 🟒 *no convention impact*). If there are **no** open PRs, replace the table with the single line `No open PRs.`

| Upstream PR | Area | Change | Applicability | Status |
|---|---|---|:---:|---|
Expand All @@ -112,30 +112,19 @@ Applicability legend (symbol-only in the Applicability column):

### 4. Tracking state -- very bottom

Place the machine-readable scan state at the **very bottom** of the body, after the applicability tables. The body **ends with this block** -- do not append a refresh procedure or any other section after it. The state lives in an HTML-comment-delimited block so the next run can parse it:
Place the machine-readable scan state at the **very bottom** of the body, after the applicability tables. The body **ends with this block** -- do not append a refresh procedure or any other section after it. The state lives in a fenced `yaml` block whose first and last lines are `# otel-genai-tracking:begin` / `# otel-genai-tracking:end` sentinel comments so the next run can locate and parse it. Do **not** wrap it in HTML comments (`<!-- -->`) -- GitHub Actions safe-output processing strips HTML comments from PR/issue bodies, so the delimiters must live inside the code fence as `yaml` comments:

````markdown
## Tracking state

<!-- otel-genai-tracking:begin -->
```yaml
# otel-genai-tracking:begin
Upstream-Repo: open-telemetry/semantic-conventions-genai
Upstream-Scan-Ref: <commit-sha> # optional inline note on what changed since the prior ref
Upstream-Scan-Date: <ISO-8601 UTC>
Upstream-Release: none # Unreleased; Towncrier fragments under changelog.d/
Core-Semconv-Dependency: vX.Y.Z # versions.env SEMCONV_VERSION (core dep, NOT the GenAI version)
DotnetExtensions-Implemented-Version: vX.Y # doc-comment version reference currently in source
# otel-genai-tracking:end
```
<!-- otel-genai-tracking:end -->
````

## Refreshing the tracking PR

The PR body carries only the tracking state block; the refresh logic lives in **this skill**, not in the PR body. During the skill's **Existing dotnet/extensions PR Preflight**, treat the tracking PR as the **scan record** -- not a blocking duplicate -- and refresh it as follows:

1. Invoke the skill in **Mode 1: Audit** -- the skill owns this PR's title and body.
2. Read the `otel-genai-tracking` state block; take `Upstream-Scan-Ref` as the prior scan point.
3. Per the skill's **Input Handling**, run `git log Upstream-Scan-Ref..main` on `open-telemetry/semantic-conventions-genai` and re-list the `changelog.d/` fragments and the open PRs.
4. Classify each new or changed item with the [change-classification](change-classification.md) framework against the current `Microsoft.Extensions.AI` instrumentation, and update both applicability tables.
5. Advance `Upstream-Scan-Ref` / `Upstream-Scan-Date` (and `Core-Semconv-Dependency` / `DotnetExtensions-Implemented-Version` if they moved) in the state block.
6. If the GenAI repo cut a release, follow the skill's version-reference migration (Gotchas + [file-inventory.md Β§Version References](file-inventory.md#version-references)) to bump and migrate the doc-comment version in lockstep.
Loading
Loading