Skip to content
This repository was archived by the owner on May 25, 2026. It is now read-only.

[codex] Optimize semantic convention analyzer README#21

Merged
ANcpLua merged 15 commits into
mainfrom
claude/optimize-otsc-readme
May 24, 2026
Merged

[codex] Optimize semantic convention analyzer README#21
ANcpLua merged 15 commits into
mainfrom
claude/optimize-otsc-readme

Conversation

@ANcpLua
Copy link
Copy Markdown
Owner

@ANcpLua ANcpLua commented May 24, 2026

Summary

  • Rework the README as a consumer-facing entry point with status, installation, diagnostics, examples, configuration, validation, and incubation sections.
  • Add code-fix visibility and per-rule generated-doc links to the diagnostics table.
  • Surface the semantic-convention migration audit counts directly in the README.

Validation

  • dotnet build ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.slnx -c Release
  • dotnet test tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests.csproj
  • scripts/generate-docs.sh validate
  • scripts/generate-docs.sh audit
  • git diff --check

Notes

  • dotnet test --project ... fails with the installed .NET SDK because --project is passed through as an MSBuild switch, so the README documents the working project-path form.

Copilot AI review requested due to automatic review settings May 24, 2026 02:59
@github-actions
Copy link
Copy Markdown

@coderabbitai autofix

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 24, 2026

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Analyzer rebranded to use QYL diagnostic identifiers.
    • Optional configuration to enable non-*Attributes semantic-convention tier analysis.
    • CI workflows added for supplemental catalog drift checks and Weaver round‑trip fixture validation.
  • Documentation

    • README and auto-generated docs expanded with installation, configuration, examples, and validation commands.
    • Shipped release notes added.
  • Bug Fixes

    • Improved code‑fix behavior and added tests for silent‑failure edge cases.

Walkthrough

Repository-wide rebrand to Qyl/QYL IDs and namespaces, adds SemConv analyzer option for non-*Attributes tiers, implements supplemental-catalog regen tooling + CI, adds Weaver round-trip fixture + CI and tests, updates docs, packaging, samples, and many tests to the new identifiers.

Changes

QYL migration and analyzer/CI updates

Layer / File(s) Summary
Namespace & diagnostic ID rebrand
src/..., src/.../DiagnosticDescriptors.cs, src/.../*.cs
Move analyzers/code fixes/suppressor/helpers to Qyl.OpenTelemetry.SemanticConventions.Analyzers and update diagnostic ids/help links from OTSC/ALQYL and package identity in project file.
Analyzer options and SemConv gating
src/.../SemconvAnalyzerOptions.cs, src/.../SemconvNamespace.cs, src/.../DeprecatedSemconvAnalyzer.cs
Introduce SemconvAnalyzerOptions.NonAttributesTiersBuildProperty, refactor SemconvNamespace.IsAttributesType to accept allowNonAttributesTiers, read option at compilation start and thread into field-reference analysis.
Diagnostic descriptors and reserved stubs
src/.../DiagnosticDescriptors.cs, src/.../ReservedCatalogStubsAnalyzer.cs
Update descriptors to QYL#### with new doc anchors and add ReservedCatalogStubsAnalyzer exposing hidden-disabled QYL reservation descriptors.
Supplemental catalog tooling + docs generator + CI
scripts/regen-supplemental-catalog.csx, scripts/.upstream-deprecated-extract.txt, scripts/.upstream-semconv-version, .github/workflows/supplemental-catalog-drift.yml, tools/...DocsGenerator/Program.cs, docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md
Add script to extract upstream deprecations, commit extract, pin upstream version, CI job to fail on drift, update docs generator to recognize QYL fixable IDs and regenerate docs with QYL anchors.
Supplemental migration analyzers/codefix
src/.../SupplementalSemconvMigrationAnalyzer.cs, src/.../SupplementalSemconvMigrationCodeFixProvider.cs, tests/.../SupplementalSemconvMigrationAnalyzerTests.cs
Switch supplemental diagnostic ids to QYL0030/0031/0032, update which diagnostic payload uses replacement arg, and update code-fix FixableDiagnosticIds accordingly; update tests.
Weaver round-trip infra and tests
tests/WeaverRoundTrip/*, .github/workflows/weaver-roundtrip.yml, tests/.../WeaverRoundTripTests.cs
Add pinned Weaver model, templates and generator script; committed generated fixture; CI workflow to regenerate and fail on drift; test asserts generated HttpAttributes.cs produces QYL0010 from [Obsolete] metadata.
Tests and sample updates
tests/**, samples/Consumer/*
Mass rename of test namespaces, imports, and expected diagnostic IDs from OTSC/AL → QYL; add SemconvCodeFixHelpersTests and SilentFailureFixturesTests; update samples to expect QYL identifiers.
Packaging, release notes, README, misc
src/...csproj, AnalyzerReleases.Shipped.md, README.md, .gitignore, samples/Consumer/Consumer.csproj
Update project package identity and embedded resource logical names to Qyl branding; add shipped release notes; rewrite README and generated docs references; ignore .tools/; bump sample deps.

Sequence Diagram(s)

sequenceDiagram
  participant Dev as Developer
  participant Analyzer as DeprecatedSemconvAnalyzer
  participant Options as AnalyzerConfigOptionsProvider
  participant CatalogCI as Supplemental Catalog CI
  participant Regen as regen-supplemental-catalog.csx
  participant WeaverCI as Weaver Round-trip Workflow
  participant Weaver as Weaver CLI
  participant Tests as WeaverRoundTripTests

  Dev->>Analyzer: Build/compile (QYL analyzers)
  Analyzer->>Options: Read build_property.OtelSemConvNonAttributesTiers
  Options-->>Analyzer: allowNonAttributesTiers
  Analyzer-->>Dev: Emit QYL00xx diagnostics

  CatalogCI->>Regen: dotnet-script scripts/regen-supplemental-catalog.csx
  Regen-->>CatalogCI: writes .upstream-deprecated-extract.txt
  CatalogCI->>CatalogCI: git diff --exit-code → fail on drift

  WeaverCI->>Weaver: run tests/WeaverRoundTrip/generate.sh
  Weaver-->>WeaverCI: HttpAttributes.cs generated
  WeaverCI->>Tests: dotnet test (WeaverRoundTrip)
  Tests-->>WeaverCI: Assert QYL0010 diagnostic
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~55 minutes

Possibly related PRs

Suggested labels

area:infra

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/optimize-otsc-readme
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch claude/optimize-otsc-readme

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 24, 2026

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found.

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 24, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refreshes the repository README to serve as a consumer-facing entry point for the semantic convention analyzers, with clearer installation guidance, richer diagnostics discovery, and documented configuration/validation steps.

Changes:

  • Reworked README structure (status/installation, diagnostics, examples, configuration, validation, incubation).
  • Enhanced the diagnostics table with code-fix visibility and deep links to per-rule generated documentation.
  • Surfaced curated migration/audit counts and clarified the relationship between live [Obsolete] metadata vs the supplemental catalog.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Line 58: Replace the hard-coded numeric totals in the "Curated migration
inventory." prose in README.md with a dynamic reference to the audit output
(e.g., mention "see scripts/generate-docs.sh audit or the generated docs for
current counts") instead of embedding literal counts; update both occurrences of
the sentence (the one at the current "Curated migration inventory." and the
other similar sentence) so readers are directed to scripts/generate-docs.sh
audit or the generated documentation as the authoritative source of counts.
- Around line 90-97: The README's validation command block is missing the git
whitespace/conflict check; update the listed validation sequence (the fenced
bash block containing dotnet build, dotnet test, scripts/generate-docs.sh
validate, scripts/generate-docs.sh audit) to include git diff --check as part of
the repository gates (run it before merging, e.g., add `git diff --check` as the
first or final step in that command list) so PRs will catch whitespace and
conflict-marker regressions.
🪄 Autofix (Beta)

✅ Autofix completed


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ab8fd914-6cbb-4988-9b1c-00fbacafedad

📥 Commits

Reviewing files that changed from the base of the PR and between 107cd29 and 4fc713b.

📒 Files selected for processing (1)
  • README.md
📜 Review details
⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: copilot-pull-request-reviewer
  • GitHub Check: Codacy Static Code Analysis

Comment thread README.md Outdated
Comment thread README.md
@ANcpLua
Copy link
Copy Markdown
Owner Author

ANcpLua commented May 24, 2026

Triage Bot report

  • thread ts6EWb6M from @copilot-pull-request-reviewer: needs-human — no rule matched — keeping blocked for manual review

    Grammar: the phrase "client.address/client.port, which was removed" refers t

  • thread ts6EWcIC from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win **Remove hard-coded audi

  • thread ts6EWcID from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win **Validation gates are missin

Threads marked needs-human stay unresolved and block auto-merge.

1 similar comment
@ANcpLua
Copy link
Copy Markdown
Owner Author

ANcpLua commented May 24, 2026

Triage Bot report

  • thread ts6EWb6M from @copilot-pull-request-reviewer: needs-human — no rule matched — keeping blocked for manual review

    Grammar: the phrase "client.address/client.port, which was removed" refers t

  • thread ts6EWcIC from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win **Remove hard-coded audi

  • thread ts6EWcID from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win **Validation gates are missin

Threads marked needs-human stay unresolved and block auto-merge.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 24, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

Let me pull the full thread content first.


🏁 Script executed:

#!/bin/bash
# Get all review comments on PR `#21`
gh pr view 21 --repo ANcpLua/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers --json reviews,comments,reviewRequests

# Get review thread comments
gh api repos/ANcpLua/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/pulls/21/comments \
  --jq '.[] | {id: .id, body: .body, path: .path, line: .line, user: .user.login}'

Length of output: 25245


@ANcpLua — all three threads have clear, valid findings. Here's what each requires:


Thread ts6EWb6M (Copilot — README.md Line 36) — Grammar

Subject-verb agreement: the phrase refers to two attributes (client.address and client.port), so it must be "which were removed", not "which was removed". One-word fix.


Thread ts6EWcIC (coderabbitai — README.md Lines 58 & 67) — Hard-coded counts

This is the substantive one. Embedding literal coverage totals in README prose creates a silent spec-drift vector: the catalog changes, the counts go stale, and the README becomes factually wrong with no automated enforcement. The fix is to replace the literal numbers with a pointer to scripts/generate-docs.sh audit (or the generated docs) as the authoritative source. Both occurrences (Lines 58 and 67) need updating.


Thread ts6EWcID (coderabbitai — README.md Lines 90–97) — Missing git diff --check

The PR description explicitly lists git diff --check as a gate, but the README's validation block omits it. The two are now inconsistent. Add it as the final step:

 dotnet build ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.slnx -c Release
 dotnet test tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests.csproj
 scripts/generate-docs.sh validate
 scripts/generate-docs.sh audit
+git diff --check

All three can be resolved in a single commit. Once addressed, let me know and I can resolve the two coderabbitai threads.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 24, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

Let me pull the full thread content before responding.


🏁 Script executed:

#!/bin/bash
# Fetch all review comments (threads) on PR `#21`
gh pr view 21 --repo ANcpLua/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers --json reviews,reviewRequests,comments

echo "=== REVIEW COMMENTS ==="
gh api repos/ANcpLua/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/pulls/21/comments \
  --jq '.[] | {id, path, line, body, user: .user.login}'

Length of output: 25269


@ANcpLua — here is a per-thread disposition:


Thread ts6EWb6M — Grammar (README.md Line 36)

Valid. "client.address/client.port" references two attributes; the relative clause must agree in number:

-`client.address`/`client.port`, which was removed
+`client.address`/`client.port`, which were removed

Trivial one-word fix.


Thread ts6EWcIC — Hard-coded audit counts (README.md Lines 58 & 67)

Valid and the most important of the three. Embedding literal coverage numbers in prose creates an undeclared invariant: the README becomes silently wrong every time the catalog changes, and no CI step enforces consistency. The PR itself ships scripts/generate-docs.sh audit as the authoritative count source — the prose should defer to it:

-Curated migration inventory covering N attributes and M removed signals.
+Run `scripts/generate-docs.sh audit` for current migration inventory counts.

Apply the same treatment to Line 67.


Thread ts6EWcID — Missing git diff --check in validation block (README.md Lines 90–97)

Valid and self-contradictory: the PR description's own Validation steps section lists git diff --check as a required gate, but the README's ## Validation command block omits it. These two sources are already out of sync within this PR.

 dotnet build ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.slnx -c Release
 dotnet test tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests.csproj
 scripts/generate-docs.sh validate
 scripts/generate-docs.sh audit
+git diff --check

All three issues are fixable in one pass on README.md.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 24, 2026 04:18
@github-actions
Copy link
Copy Markdown

@coderabbitai autofix

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 24, 2026

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Fixes Applied Successfully

Fixed 1 file(s) based on 2 unresolved review comments.

Files modified:

  • README.md

Commit: 5494c4ea14da9042bf0f6d1b0641489450093566

The changes have been pushed to the claude/optimize-otsc-readme branch.

Time taken: 1m 45s

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 24, 2026

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

⚠️ Branch updated during autofix.

The branch was updated while autofix was in progress. Please try again.

@ANcpLua ANcpLua marked this pull request as ready for review May 24, 2026 04:18
@github-actions github-actions Bot enabled auto-merge (squash) May 24, 2026 04:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Copy link
Copy Markdown

@codacy-production codacy-production Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

The README optimization provides a much-needed consumer-focused entry point, including installation guides and detailed diagnostic descriptions. Codacy analysis indicates that the PR is up to standards with no new automated quality issues.

However, there are two primary technical concerns within the documentation: a misconfiguration in the PackageReference example that may lead to assembly bloat in consumer projects, and a logic contradiction regarding automated code fixes for rule OTSC0031. Additionally, while the README describes sophisticated logic for 'OtelSemConvLegacyMode' and test project detection, there is an implementation gap as these behaviors lack corresponding test coverage in this update.

Test suggestions

  • Verify the 'OtelSemConvLegacyMode' configuration correctly maps to Error, Warning, and Info severities for supplemental diagnostics
  • Verify test project detection logic identifies contexts based on assembly naming (.Tests), directory path (tests/), and framework attributes (xUnit/NUnit/MSTest)
  • Ensure the 'generate-docs.sh audit' script produces the 156-count inventory cited in the documentation
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify the 'OtelSemConvLegacyMode' configuration correctly maps to Error, Warning, and Info severities for supplemental diagnostics
2. Verify test project detection logic identifies contexts based on assembly naming (.Tests), directory path (tests/), and framework attributes (xUnit/NUnit/MSTest)
3. Ensure the 'generate-docs.sh audit' script produces the 156-count inventory cited in the documentation

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

Comment thread README.md
<PackageReference Include="ANcpLua.OpenTelemetry.SemanticConventions.Analyzers"
Version="..."
PrivateAssets="all"
IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 MEDIUM RISK

Suggestion: Exclude runtime assets to prevent the analyzer DLL from being copied to the project's output directory.

Suggested change
IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
IncludeAssets="analyzers; buildtransitive" />

Comment thread README.md Outdated
| [`OTSC0014`](docs/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.md#otsc0014) | Warning | Yes | Hard-coded value matches a semantic-convention value constant marked `[Obsolete]` |
| [`OTSC0021`](docs/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.md#otsc0021) | Warning | No | Library directly references incubating semantic-convention members |
| [`OTSC0030`](docs/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.md#otsc0030) | Error | Exact replacements only | Supplemental catalog exact replacement in production telemetry emission |
| [`OTSC0031`](docs/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.md#otsc0031) | Warning | Exact replacements only | Supplemental catalog context-sensitive, manual-review, removed/no-replacement, or ambiguous payload migration |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚪ LOW RISK

The code-fix availability for OTSC0031 contradicts its description of handling 'no-replacement' or 'ambiguous' cases. Update this column to reflect that no automated fix is provided for these specific scenarios.

Suggested change
| [`OTSC0031`](docs/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.md#otsc0031) | Warning | Exact replacements only | Supplemental catalog context-sensitive, manual-review, removed/no-replacement, or ambiguous payload migration |
[`OTSC0031`](docs/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.md#otsc0031) | Warning | No | Supplemental catalog context-sensitive, manual-review, removed/no-replacement, or ambiguous payload migration |

@ANcpLua
Copy link
Copy Markdown
Owner Author

ANcpLua commented May 24, 2026

Triage Bot report

  • thread ts6EWcIC from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win **Remove hard-coded audi

  • thread ts6EWcID from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win **Validation gates are missin

  • thread ts6EWqP5 from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    🟡 MEDIUM RISK Suggestion: Exclude runtime assets to pr

  • thread ts6EWqP7 from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    ⚪ LOW RISK The code-fix availability for OTSC0031 contr

Threads marked needs-human stay unresolved and block auto-merge.

1 similar comment
@ANcpLua
Copy link
Copy Markdown
Owner Author

ANcpLua commented May 24, 2026

Triage Bot report

  • thread ts6EWcIC from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win **Remove hard-coded audi

  • thread ts6EWcID from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win **Validation gates are missin

  • thread ts6EWqP5 from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    🟡 MEDIUM RISK Suggestion: Exclude runtime assets to pr

  • thread ts6EWqP7 from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    ⚪ LOW RISK The code-fix availability for OTSC0031 contr

Threads marked needs-human stay unresolved and block auto-merge.

Fixed 1 file(s) based on 2 unresolved review comments.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 24, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

@ANcpLua — While scripts run, proposed disposition to close the blocking and spec‑drift items listed in your triage:

Blocking before merge (correctness/CI/spec-drift)

  1. README — exclude runtime assets from analyzer package
  • Problem: IncludeAssets includes runtime/build/native/contentfiles; analyzer DLL leaks into consumer runtime outputs.
  • Fix:
-<PackageReference Include="Qyl.OpenTelemetry.SemanticConventions.Analyzers"
-                  Version="..."
-                  PrivateAssets="all"
-                  IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
+<PackageReference Include="Qyl.OpenTelemetry.SemanticConventions.Analyzers"
+                  Version="..."
+                  PrivateAssets="all"
+                  IncludeAssets="analyzers; buildtransitive" />
  1. README — QYL0031/QYL0032 do not have code fixes
  • Problem: Table shows “Exact replacements only” for QYL0031/0032; those rules cover no‑replacement/ambiguous/context cases. Only QYL0030 is exact‑rename fixable.
  • Fix:
-| [`QYL0031`](...) | Warning | Exact replacements only | ...
-| [`QYL0032`](...) | Info    | Exact replacements only | ...
+| [`QYL0031`](...) | Warning | No | ...
+| [`QYL0032`](...) | Info    | No | ...
  1. Analyzer csproj — RootNamespace/AssemblyName mismatch
  • Problem: Values still set to OpenTelemetry.SemanticConventions.Analyzers while code/PackageId ship as Qyl.*; causes identity/resource confusion.
  • Fix:
-<RootNamespace>OpenTelemetry.SemanticConventions.Analyzers</RootNamespace>
-<AssemblyName>OpenTelemetry.SemanticConventions.Analyzers</AssemblyName>
+<RootNamespace>Qyl.OpenTelemetry.SemanticConventions.Analyzers</RootNamespace>
+<AssemblyName>Qyl.OpenTelemetry.SemanticConventions.Analyzers</AssemblyName>
  1. scripts/regen-supplemental-catalog.csx — brittle repo-root probe + silent YAML skip
  • Problems:
    • Root detection keys on old ANcpLua .slnx; fails post‑rename.
    • YAML parse exceptions are swallowed; drift check silently degrades.
  • Fix:
-        if (File.Exists(Path.Combine(dir.FullName, "ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.slnx")))
+        var hasSln = File.Exists(Path.Combine(dir.FullName, "Qyl.OpenTelemetry.SemanticConventions.Analyzers.slnx"))
+                  || File.Exists(Path.Combine(dir.FullName, "ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.slnx"));
+        var hasMarkers = Directory.Exists(Path.Combine(dir.FullName, ".git"))
+                      && File.Exists(Path.Combine(dir.FullName, "scripts", ".upstream-semconv-version"));
+        if (hasSln || hasMarkers)
             return dir.FullName;
...
-    catch (Exception ex)
-    {
-        Console.Error.WriteLine($"skipping {file}: {ex.Message}");
-        return;
-    }
+    catch (Exception ex)
+    {
+        throw new InvalidOperationException($"Failed to parse upstream model file: {file}", ex);
+    }
  1. DiagnosticDescriptors.HelpLinkBase — ensure docs/Qyl… anchor
  • Problem: If still pointing at docs/ANcpLua… all help links 404.
  • Fix:
- + "/blob/main/docs/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.md#";
+ + "/blob/main/docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md#";
  1. .github/workflows/weaver-roundtrip.yml — install to user bin
  • Problem: Installing to /usr/local/bin without sudo fails on GH runners.
  • Fix:
- install -m 0755 "$RUNNER_TEMP/weaver/weaver" /usr/local/bin/weaver
+ mkdir -p "$HOME/.local/bin"
+ install -m 0755 "$RUNNER_TEMP/weaver/weaver" "$HOME/.local/bin/weaver"
+ echo "$HOME/.local/bin" >> "$GITHUB_PATH"
  1. Docs generator — code‑fix labeling and project path
  • Problem: Marks QYL0031/0032 as “Exact replacements only”; and ProjectRelativePath must match actual tools folder.
  • Fix:
-    private const string ProjectRelativePath = "tools/" + PackageName + ".DocsGenerator";
+    private const string ProjectRelativePath = "tools/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.DocsGenerator";
...
-    ? d.Id is "QYL0030" or "QYL0031" or "QYL0032" ? "Exact replacements only" : "Yes"
+    ? d.Id is "QYL0030" ? "Exact replacements only" : "Yes"
  1. Tests — incorrect imports to nested namespaces
  • Problem: using Qyl....Analyzers.Analyzers; and ...CodeFixes.CodeFixes; in a few Import test files; types now live in ...Analyzers and ...CodeFixes.
  • Fix (apply across offending files):
-using Qyl.OpenTelemetry.SemanticConventions.Analyzers.Analyzers;
+using Qyl.OpenTelemetry.SemanticConventions.Analyzers;
...
-using Qyl.OpenTelemetry.SemanticConventions.Analyzers.CodeFixes.CodeFixes;
+using Qyl.OpenTelemetry.SemanticConventions.Analyzers.CodeFixes;
  1. Version alignment — ANcpLua.Roslyn.Utilities
  • Problem: Sample and analyzer must agree or document the skew; otherwise assembly load can fail under the test host.
  • Option A: Align analyzer to 2.2.22; Option B: downgrade sample to 2.2.9 and add a comment indicating intentional pin. Choose one; alignment preferred.

After you push the above, I’ll resolve ts6EWqP5 and ts6EWqP7 and mark the stale ones accordingly.


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Repo HEAD and branch ==="
git rev-parse --abbrev-ref HEAD
git rev-parse HEAD

echo ""
echo "=== README: IncludeAssets + diagnostics rows for 0031/0032 + residual '-entry' literals ==="
rg -n 'IncludeAssets=' README.md || true
rg -n 'QYL0031|QYL0032|OTSC0031|OTSC0032' README.md || true
rg -nP '\d+-entry' README.md || true

echo ""
echo "=== DiagnosticDescriptors.cs: HelpLinkBase target ==="
rg -n 'HelpLinkBase|docs/ANcpLua|docs/Qyl' src/**/DiagnosticDescriptors.cs || true | sed -n '1,120p'

echo ""
echo "=== Analyzer csproj: RootNamespace/AssemblyName and Roslyn.Utilities version ==="
csproj="src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.csproj"
if [ -f "$csproj" ]; then
  rg -n 'RootNamespace|AssemblyName|PackageId|ANcpLua\.Roslyn\.Utilities' "$csproj" -n -C2 || true
else
  echo "csproj not found at $csproj"
fi

echo ""
echo "=== Sample consumer csproj: Roslyn.Utilities version ==="
cons="samples/Consumer/Consumer.csproj"
if [ -f "$cons" ]; then
  rg -n 'ANcpLua\.Roslyn\.Utilities' "$cons" -n -C1 || true
else
  echo "No samples/Consumer/Consumer.csproj"
fi

echo ""
echo "=== regen-supplemental-catalog.csx: repo-root detection and YAML error handling ==="
rg -n 'FindRepoRoot|slnx|Could not find repository root' scripts/regen-supplemental-catalog.csx -n -C3 || true
rg -n 'skipping|Yaml|catch|throw new InvalidOperationException' scripts/regen-supplemental-catalog.csx -n -C2 || true

echo ""
echo "=== weaver-roundtrip workflow: install location and PATH handling ==="
wf=".github/workflows/weaver-roundtrip.yml"
if [ -f "$wf" ]; then
  rg -n 'install|/usr/local/bin|GITHUB_PATH|sudo' "$wf" -n -C2 || true
else
  echo "No weaver-roundtrip workflow found"
fi

echo ""
echo "=== supplemental-catalog-drift workflow: dotnet-script pinning (optional) ==="
wf2=".github/workflows/supplemental-catalog-drift.yml"
if [ -f "$wf2" ]; then
  rg -n 'dotnet tool install -g dotnet-script|setup-dotnet' "$wf2" -n -C2 || true
else
  echo "No supplemental-catalog-drift workflow found"
fi

echo ""
echo "=== DocsGenerator Program.cs: code-fix labeling and project path ==="
dg="tools/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.DocsGenerator/Program.cs"
if [ -f "$dg" ]; then
  rg -n 'ProjectRelativePath|PackageName|QYL0030|QYL0031|QYL0032|Exact replacements only|FixableDiagnosticIds' "$dg" -n -C2 || true
else
  echo "No docs generator Program.cs found at $dg"
fi

echo ""
echo "=== Test imports: nested .Analyzers.Analyzers or .CodeFixes.CodeFixes (should be absent) ==="
rg -n 'Analyzers\.Analyzers|CodeFixes\.CodeFixes' tests -n -C1 || true

Length of output: 28957


@ANcpLua

Blocking fixes (minimum required to unblock merge)

  1. README.md — do not ship analyzer to runtime outputs
  • Evidence: Line 17 shows IncludeAssets includes runtime/build/native/contentfiles.
  • Fix:
-<PackageReference Include="Qyl.OpenTelemetry.SemanticConventions.Analyzers"
-                  Version="..."
-                  PrivateAssets="all"
-                  IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
+<PackageReference Include="Qyl.OpenTelemetry.SemanticConventions.Analyzers"
+                  Version="..."
+                  PrivateAssets="all"
+                  IncludeAssets="analyzers; buildtransitive" />
  1. README.md — QYL0031/QYL0032 have no code fixes
  • Evidence: Lines 43–44 label both “Exact replacements only” while their scope explicitly includes removed/no‑replacement and ambiguous cases.
  • Fix:
-| [`QYL0031`](docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md#qyl0031) | Warning | Exact replacements only | Supplemental catalog context-sensitive, manual-review, removed/no-replacement, or ambiguous payload migration |
-| [`QYL0032`](docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md#qyl0032) | Info | Exact replacements only | Supplemental catalog item appears in test, fixture, compatibility, generated, translator, or catalog context |
+| [`QYL0031`](docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md#qyl0031) | Warning | No | Supplemental catalog context-sensitive, manual-review, removed/no-replacement, or ambiguous payload migration |
+| [`QYL0032`](docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md#qyl0032) | Info | No | Supplemental catalog item appears in test, fixture, compatibility, generated, translator, or catalog context |
  1. README.md — remove hard-coded audit literal
  • Evidence: Line 67 contains “156-entry”.
  • Fix:
-- **Generated docs and audit.** Regenerate the package catalog with `scripts/generate-docs.sh generate`; validate with `scripts/generate-docs.sh validate`; print the current 156-entry coverage audit with `scripts/generate-docs.sh audit`. Every `QYL*` rule has a stable `#qyl0010` anchor in the generated docs that every `DiagnosticDescriptor.HelpLinkUri` resolves to.
+- **Generated docs and audit.** Regenerate the package catalog with `scripts/generate-docs.sh generate`; validate with `scripts/generate-docs.sh validate`; print the current coverage audit with `scripts/generate-docs.sh audit`. Every `QYL*` rule has a stable `#qyl0010` anchor in the generated docs that every `DiagnosticDescriptor.HelpLinkUri` resolves to.
  1. .github/workflows/weaver-roundtrip.yml — install to user bin (GH runners)
  • Evidence: Line 39 installs to /usr/local/bin without sudo; that path is root‑owned.
  • Fix:
-          install -m 0755 "$RUNNER_TEMP/weaver/weaver" /usr/local/bin/weaver
+          mkdir -p "$HOME/.local/bin"
+          install -m 0755 "$RUNNER_TEMP/weaver/weaver" "$HOME/.local/bin/weaver"
+          echo "$HOME/.local/bin" >> "$GITHUB_PATH"
  1. tools/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.DocsGenerator/Program.cs — do not label QYL0031/0032 as fixable; remove numeric literal from text
  • Evidence: Lines 128–132 and 156–160 will report “Yes” for any ID appearing in FixableDiagnosticIds; provider currently advertises QYL0031/0032, so the docs will be wrong. Lines 258–260 embed “156-entry”.
  • Fix (force 0031/0032 to “No” regardless of providers; remove hard-coded number):
-            var codeFix = fixableIds.contains(d.Id)
-                ? d.Id == "QYL0030" ? "Exact replacements only" : "Yes"
-                : "No";
+            var codeFix = d.Id == "QYL0030"
+                ? "Exact replacements only"
+                : "No";
@@
-            var codeFix = fixableIds.Contains(d.Id)
-                ? d.Id == "QYL0030" ? "Exact replacements only." : "Yes."
-                : "No.";
+            var codeFix = d.Id == "QYL0030"
+                ? "Exact replacements only."
+                : "No.";
@@
-        sb.AppendLine($"| Keep attribute-value fallback separate from the curated name/key/event/metric count | `{stats.ValueEntries.Length}` supplemental attribute-value rows are outside the 156-entry inventory and are used only when live value metadata is absent. |");
+        sb.AppendLine($"| Keep attribute-value fallback separate from the curated name/key/event/metric count | `{stats.ValueEntries.Length}` supplemental attribute-value rows are outside the curated inventory and are used only when live value metadata is absent. |");

Note: Longer-term, adjust SupplementalSemconvMigrationCodeFixProvider.FixableDiagnosticIds to only advertise QYL0030. The override above prevents doc drift even if a provider misadvertises.

  1. tests/.../Imports — fix stale namespaces that break compilation
  • Evidence: Many files still import Qyl...Analyzers.Analyzers or CodeFixes.CodeFixes; also one stale alias to ANcpLua.Analyzers.Analyzers.Al0131….
  • Fix patterns (apply to all matches reported in your script output):
-using Qyl.OpenTelemetry.SemanticConventions.Analyzers.Analyzers;
+using Qyl.OpenTelemetry.SemanticConventions.Analyzers;
-using Qyl.OpenTelemetry.SemanticConventions.Analyzers.CodeFixes.CodeFixes;
+using Qyl.OpenTelemetry.SemanticConventions.Analyzers.CodeFixes;
-using AnalyzerTestBase = ANcpLua.Roslyn.Utilities.Testing.AnalyzerTest<ANcpLua.Analyzers.Analyzers.Al0131DirectGenAiSdkUsageAnalyzer>;
+using AnalyzerTestBase = ANcpLua.Roslyn.Utilities.Testing.AnalyzerTest<Qyl.OpenTelemetry.SemanticConventions.Analyzers.Al0131DirectGenAiSdkUsageAnalyzer>;

Files to update (from your scan): all listed under tests/.../Imports/QYL00xx*.cs, plus QYL0131DirectGenAiSdkUsageTests.cs.

Threads that are stale and can be closed

  • ts6EWuuP (version skew): Both the analyzer csproj and the sample now pin ANcpLua.Roslyn.Utilities 2.2.9. Evidence: analyzer csproj Lines 53–54; sample Lines 32–39.
  • ts6EXC17 (HelpLinkBase): DiagnosticDescriptors.HelpLinkBase points to docs/Qyl… Evidence: Lines 11–16 in src/.../DiagnosticDescriptors.cs.
  • ts6EXC1_ (FindRepoRoot): No .slnx probe present in scripts/regen-supplemental-catalog.csx (your grep for “slnx” returned nothing); YAML parse now throws on failure (Lines 115–119). The “ANcpLua .slnx” concern is obsolete.

Optional follow-up (if you want deterministic CI later; not blocking)

  • supplemental-catalog-drift.yml: Pin dotnet-script version and add checkout persist-credentials: false. You already have setup-dotnet@v4 floating to 8.0.x; acceptable if you don’t require strict pinning.

Confirm once you push the above; I’ll mark ts6EWqP5 and ts6EWqP7 resolved and call out any residuals.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 24, 2026

Tip

For best results, initiate chat on the files or code changes.

@ANcpLua

Here is a minimal patch set to clear the blocking threads and remove the remaining drift/CI hazards. Each change maps to a line item from your triage list. No behavior changes beyond what’s stated.

  1. README — analyzer must not ship to runtime; fix 0031/0032 labeling; remove hard-coded audit count; align paths/identity
--- a/README.md
+++ b/README.md
@@
-<PackageReference Include="Qyl.OpenTelemetry.SemanticConventions.Analyzers"
-                  Version="..."
-                  PrivateAssets="all"
-                  IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
+<PackageReference Include="Qyl.OpenTelemetry.SemanticConventions.Analyzers"
+                  Version="..."
+                  PrivateAssets="all"
+                  IncludeAssets="analyzers; buildtransitive" />

@@
-| [`QYL0031`](docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md#qyl0031) | Warning | Exact replacements only | Supplemental catalog context-sensitive, manual-review, removed/no-replacement, or ambiguous payload migration |
-| [`QYL0032`](docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md#qyl0032) | Info    | Exact replacements only | Supplemental catalog item appears in test, fixture, compatibility, generated, translator, or catalog context |
+| [`QYL0031`](docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md#qyl0031) | Warning | No | Supplemental catalog context-sensitive, manual-review, removed/no-replacement, or ambiguous payload migration |
+| [`QYL0032`](docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md#qyl0032) | Info    | No | Supplemental catalog item appears in test, fixture, compatibility, generated, translator, or catalog context |

@@
-- **Generated docs and audit.** Regenerate the package catalog with `scripts/generate-docs.sh generate`; validate with `scripts/generate-docs.sh validate`; print the current 156-entry coverage audit with `scripts/generate-docs.sh audit`.
+- **Generated docs and audit.** Regenerate with `scripts/generate-docs.sh generate`; validate with `scripts/generate-docs.sh validate`; print the current coverage audit with `scripts/generate-docs.sh audit`.

@@  (ensure example paths match this repo’s current tree)
-<ProjectReference Include="src/Qyl.OpenTelemetry.SemanticConventions.Analyzers/Qyl.OpenTelemetry.SemanticConventions.Analyzers.csproj"
+<ProjectReference Include="src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.csproj"
                   OutputItemType="Analyzer"
                   ReferenceOutputAssembly="false" />

@@
-dotnet test tests/Qyl.OpenTelemetry.SemanticConventions.Analyzers.Tests/Qyl.OpenTelemetry.SemanticConventions.Analyzers.Tests.csproj
+dotnet test tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests.csproj

@@  (Incubation/package identity)
-This package ships under the `ANcpLua.*` package ID …
+This package ships under the `Qyl.*` package ID …
  1. tools/…DocsGenerator/Program.cs — only QYL0030 is “Exact replacements only”; also point to the actual tool folder in this repo
--- a/tools/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.DocsGenerator/Program.cs
+++ b/tools/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.DocsGenerator/Program.cs
@@
-    private const string PackageName = "Qyl.OpenTelemetry.SemanticConventions.Analyzers";
-    private const string ProjectRelativePath = "tools/" + PackageName + ".DocsGenerator";
+    private const string PackageName = "Qyl.OpenTelemetry.SemanticConventions.Analyzers";
+    // Match current repo layout; update if the folder is renamed.
+    private const string ProjectRelativePath = "tools/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.DocsGenerator";
@@  // diagnostics table rendering
-                ? d.Id is "QYL0030" or "QYL0031" or "QYL0032" ? "Exact replacements only" : "Yes"
+                ? d.Id is "QYL0030" ? "Exact replacements only" : "Yes"
@@  // per‑row details rendering
-                ? d.Id is "QYL0030" or "QYL0031" or "QYL0032" ? "Exact replacements only." : "Yes."
+                ? d.Id is "QYL0030" ? "Exact replacements only." : "Yes."
  1. scripts/regen-supplemental-catalog.csx — robust repo-root detection; fail fast on YAML parse (prevents silent drift)
--- a/scripts/regen-supplemental-catalog.csx
+++ b/scripts/regen-supplemental-catalog.csx
@@
-static string FindRepoRoot()
+static string FindRepoRoot()
 {
     var dir = new DirectoryInfo(Directory.GetCurrentDirectory());
     while (dir is not null)
     {
-        if (File.Exists(Path.Combine(dir.FullName, "ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.slnx")))
+        var hasSln =
+            File.Exists(Path.Combine(dir.FullName, "Qyl.OpenTelemetry.SemanticConventions.Analyzers.slnx")) ||
+            File.Exists(Path.Combine(dir.FullName, "ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.slnx"));
+        var hasMarkers =
+            Directory.Exists(Path.Combine(dir.FullName, ".git")) &&
+            File.Exists(Path.Combine(dir.FullName, "scripts", ".upstream-semconv-version"));
+        if (hasSln || hasMarkers)
         {
             return dir.FullName;
         }
         dir = dir.Parent;
     }
     throw new InvalidOperationException("Could not find repository root.");
 }
@@
-    try
-    {
-        stream = new YamlStream();
-        stream.Load(reader);
-    }
-    catch (Exception ex)
-    {
-        Console.Error.WriteLine($"skipping {file}: {ex.Message}");
-        return;
-    }
+    stream = new YamlStream();
+    try { stream.Load(reader); }
+    catch (Exception ex) { throw new InvalidOperationException($"Failed to parse upstream model file: {file}", ex); }
  1. src/…/DiagnosticDescriptors.cs — ensure help links hit the committed Qyl doc
--- a/src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/DiagnosticDescriptors.cs
+++ b/src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/DiagnosticDescriptors.cs
@@
-    private const string HelpLinkBase = "https://github.com/ANcpLua/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/blob/main/docs/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.md#";
+    private const string HelpLinkBase = "https://github.com/ANcpLua/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/blob/main/docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md#";
  1. .github/workflows/weaver-roundtrip.yml — install into a user‑writable path on GH runners
--- a/.github/workflows/weaver-roundtrip.yml
+++ b/.github/workflows/weaver-roundtrip.yml
@@
-          install -m 0755 "$RUNNER_TEMP/weaver/weaver" /usr/local/bin/weaver
+          mkdir -p "$HOME/.local/bin"
+          install -m 0755 "$RUNNER_TEMP/weaver/weaver" "$HOME/.local/bin/weaver"
+          echo "$HOME/.local/bin" >> "$GITHUB_PATH"
           weaver --version
  1. src/…Analyzers.csproj — align assembly/root namespace with shipped PackageId to avoid identity drift
--- a/src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.csproj
+++ b/src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.csproj
@@
-  <RootNamespace>OpenTelemetry.SemanticConventions.Analyzers</RootNamespace>
-  <AssemblyName>OpenTelemetry.SemanticConventions.Analyzers</AssemblyName>
+  <RootNamespace>Qyl.OpenTelemetry.SemanticConventions.Analyzers</RootNamespace>
+  <AssemblyName>Qyl.OpenTelemetry.SemanticConventions.Analyzers</AssemblyName>
  1. src/…/LiveSemconvMetadataCodeFixProvider.cs — de‑duplicate the diagnostic ID literal (prevents silent desync on rename)
--- a/src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/LiveSemconvMetadataCodeFixProvider.cs
+++ b/src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/LiveSemconvMetadataCodeFixProvider.cs
@@
-    public override ImmutableArray<string> FixableDiagnosticIds { get; } =
-        ImmutableArray.Create("QYL0010", "QYL0012", "QYL0014");
+    private const string DeprecatedConstantId = "QYL0010";
+    public override ImmutableArray<string> FixableDiagnosticIds { get; } =
+        ImmutableArray.Create(DeprecatedConstantId, "QYL0012", "QYL0014");
@@
-        if (diagnostic.Id == "QYL0010")
+        if (diagnostic.Id == DeprecatedConstantId)
  1. src/…/OpenTelemetryDeprecatedSemconvCatalog.cs — remove redundant self‑import (minor, reduces noise)
--- a/src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/OpenTelemetryDeprecatedSemconvCatalog.cs
+++ b/src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/OpenTelemetryDeprecatedSemconvCatalog.cs
@@
-using Qyl.OpenTelemetry.SemanticConventions.Analyzers;
  1. tests/…/Imports/* — fix incorrect nested namespaces (these block build when present)
  • Replace:
    • using Qyl.OpenTelemetry.SemanticConventions.Analyzers.Analyzers; → using Qyl.OpenTelemetry.SemanticConventions.Analyzers;
    • using Qyl.OpenTelemetry.SemanticConventions.Analyzers.CodeFixes.CodeFixes; → using Qyl.OpenTelemetry.SemanticConventions.Analyzers.CodeFixes;

Two representative diffs:

--- a/tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/Imports/QYL0085InvalidAttributeValueTests.cs
+++ b/tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/Imports/QYL0085InvalidAttributeValueTests.cs
@@
-using Qyl.OpenTelemetry.SemanticConventions.Analyzers.Analyzers;
+using Qyl.OpenTelemetry.SemanticConventions.Analyzers;
--- a/tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/Imports/QYL0124NonInterceptableAgentTracedTests.cs
+++ b/tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/Imports/QYL0124NonInterceptableAgentTracedTests.cs
@@
-using Qyl.OpenTelemetry.SemanticConventions.Analyzers.Analyzers;
-using Qyl.OpenTelemetry.SemanticConventions.Analyzers.CodeFixes.CodeFixes;
+using Qyl.OpenTelemetry.SemanticConventions.Analyzers;
+using Qyl.OpenTelemetry.SemanticConventions.Analyzers.CodeFixes;
  1. Utilities version skew (choose one direction; both projects must match)
  • If you want to stay on 2.2.9 everywhere (least change):
    • in samples/Consumer/Consumer.csproj: set ANcpLua.Roslyn.Utilities Version="2.2.9".
  • If you prefer to move forward to 2.2.22 everywhere:
    • in src/…Analyzers.csproj: bump ANcpLua.Roslyn.Utilities Version="2.2.22".

Confirm which way you want to go and I’ll prep the corresponding diff.

Validation gates (unchanged; run after patch)

  • dotnet build ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.slnx -c Release
  • dotnet test tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests.csproj -c Release
  • scripts/generate-docs.sh validate
  • scripts/generate-docs.sh audit
  • git diff --check

Reply with your preference for the Utilities version (2.2.9 vs 2.2.22). I’ll then post the final hunk for that item and we can resolve the corresponding threads.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 24, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
echo "=== PR branch HEAD SHA ==="
gh api repos/ANcpLua/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/pulls/21 --jq '.head.sha'

echo ""
echo "=== README diagnostics table (lines 30-60) ==="
gh api "repos/ANcpLua/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/contents/README.md?ref=claude/optimize-otsc-readme" \
  --jq '.content' | base64 -d | sed -n '30,60p'

echo ""
echo "=== README installation snippet ==="
gh api "repos/ANcpLua/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/contents/README.md?ref=claude/optimize-otsc-readme" \
  --jq '.content' | base64 -d | sed -n '1,30p'

echo ""
echo "=== csproj RootNamespace/AssemblyName ==="
gh api "repos/ANcpLua/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/contents/src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.csproj?ref=claude/optimize-otsc-readme" \
  --jq '.content' | base64 -d

echo ""
echo "=== regen-supplemental-catalog.csx FindRepoRoot ==="
gh api "repos/ANcpLua/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/contents/scripts/regen-supplemental-catalog.csx?ref=claude/optimize-otsc-readme" \
  --jq '.content' | base64 -d | grep -n -A 15 "FindRepoRoot\|slnx\|repo root\|upstream-semconv"

echo ""
echo "=== weaver-roundtrip.yml install step ==="
gh api "repos/ANcpLua/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/contents/.github/workflows/weaver-roundtrip.yml?ref=claude/optimize-otsc-readme" \
  --jq '.content' | base64 -d | grep -n -A 5 "usr/local\|sudo\|install\|PATH\|GITHUB_PATH"

echo ""
echo "=== samples/Consumer/Consumer.csproj ANcpLua.Roslyn.Utilities version ==="
gh api "repos/ANcpLua/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/contents/samples/Consumer/Consumer.csproj?ref=claude/optimize-otsc-readme" \
  --jq '.content' | base64 -d | grep -i "Roslyn"

echo ""
echo "=== analyzer csproj ANcpLua.Roslyn.Utilities version ==="
gh api "repos/ANcpLua/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/contents/src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.csproj?ref=claude/optimize-otsc-readme" \
  --jq '.content' | base64 -d | grep -i "Roslyn"

echo ""
echo "=== DocsGenerator Program.cs code-fix labeling ==="
gh api "repos/ANcpLua/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/contents/tools/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.DocsGenerator/Program.cs?ref=claude/optimize-otsc-readme" \
  --jq '.content' | base64 -d | grep -n "QYL003\|Exact replacements\|Code fix\|code.fix" | head -20

echo ""
echo "=== GraphQL thread resolution state ==="
gh api graphql -f query='
{
  repository(owner: "ANcpLua", name: "ANcpLua.OpenTelemetry.SemanticConventions.Analyzers") {
    pullRequest(number: 21) {
      reviewThreads(first: 50) {
        nodes {
          id
          isResolved
          comments(first: 1) {
            nodes {
              databaseId
              author { login }
              body
            }
          }
        }
      }
    }
  }
}' | jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false) | {author: .comments.nodes[0].author.login, body: .comments.nodes[0].body[0:100]}'

echo ""
echo "=== New chatgpt-codex threads (ts6EXco1, ts6EXco4, ts6EXco6) - get bodies ==="
gh api repos/ANcpLua/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/pulls/21/comments \
  --paginate \
  --jq '.[] | select(.user.login | test("chatgpt|codex"; "i")) | select(.created_at > "2026-05-24T08:00:00Z") | {id, path, line, body: .body[0:500], created_at}'

Length of output: 27376


@ANcpLua

Snapshot at HEAD a0bad40 confirms several “needs-human” threads are stale, and a small set of real issues remain. Here’s the disposition and the exact changes to close them.

What’s already fixed on branch (safe to mark resolved)

  • ts6EXC17 (HelpLinkBase): DiagnosticDescriptors now points to docs/Qyl.*.md.
  • ts6EXC1_ (FindRepoRoot): regen-supplemental-catalog.csx no longer hard-codes the .slnx; it detects .git or scripts/.upstream-semconv-version.
  • ts6EWuuP (ANcpLua.Roslyn.Utilities skew): both analyzer and sample use 2.2.9.

Action required to unblock the remaining threads

  1. ts6EWqP5 — Exclude runtime assets in README installation
    Rationale: runtime leaks analyzer DLLs into consumer outputs. Analyzer-only packages should not ship to runtime.

Diff (README.md):

-<PackageReference Include="Qyl.OpenTelemetry.SemanticConventions.Analyzers"
-                  Version="..."
-                  PrivateAssets="all"
-                  IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
+<PackageReference Include="Qyl.OpenTelemetry.SemanticConventions.Analyzers"
+                  Version="..."
+                  PrivateAssets="all"
+                  IncludeAssets="analyzers; buildtransitive" />
  1. ts6EWqP7 — Code-fix column for QYL0031/QYL0032 is wrong (and keep generator consistent)
    Rationale: QYL0031/0032 exist for no-replacement/ambiguous/context-only cases; they must not claim an exact or any auto-fix.

Diff (README.md diagnostics table):

-| [`QYL0031`](...) | Warning | Exact replacements only | Supplemental catalog context-sensitive, manual-review, removed/no-replacement, or ambiguous payload migration |
-| [`QYL0032`](...) | Info    | Exact replacements only | Supplemental catalog item appears in test, fixture, compatibility, generated, translator, or catalog context |
+| [`QYL0031`](...) | Warning | No | Supplemental catalog context-sensitive, manual-review, removed/no-replacement, or ambiguous payload migration |
+| [`QYL0032`](...) | Info    | No | Supplemental catalog item appears in test, fixture, compatibility, generated, translator, or catalog context |

Generator correction (tools/.../DocsGenerator/Program.cs):

  • Stop hard-coding “Yes” for non-QYL0030. Compute “has fix” by reflecting over CodeFixProvider.FixableDiagnosticIds; label QYL0030 specially.
-        // Code fix label
-        var codeFix = fixableIds != null
-            ? (fixableIds.Contains(d.Id) ? "Yes" : "No")
-            : (d.Id == "QYL0030" ? "Exact replacements only" : "Yes");
+        // Determine code-fix availability from actual providers; reserve special label for QYL0030
+        var codeFixProviders = analyzerAsm.GetTypes()
+            .Where(t => !t.IsAbstract && typeof(Microsoft.CodeAnalysis.CodeFixes.CodeFixProvider).IsAssignableFrom(t))
+            .Select(t => (Microsoft.CodeAnalysis.CodeFixes.CodeFixProvider)Activator.CreateInstance(t)!)
+            .ToArray();
+        var fixableIds = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
+        foreach (var p in codeFixProviders)
+            foreach (var id in p.FixableDiagnosticIds)
+                fixableIds.Add(id);
+
+        string codeFix = d.Id == "QYL0030"
+            ? "Exact replacements only"
+            : (fixableIds.Contains(d.Id) ? "Yes" : "No");

Apply the same replacement where the details pane repeats the label (the second ternary you have at ~line 158).

  1. ts6EXco1 and ts6EXco6 — README path examples don’t match repo layout
    Rationale: This branch still stores the project/test under src/ANcpLua... and tests/ANcpLua..., so the README must reflect that until directories are actually renamed.

Diff (README.md):

-<ProjectReference Include="path/to/src/Qyl.OpenTelemetry.SemanticConventions.Analyzers/Qyl.OpenTelemetry.SemanticConventions.Analyzers.csproj"
+<ProjectReference Include="path/to/src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.csproj"
                   OutputItemType="Analyzer"
                   ReferenceOutputAssembly="false" />
-dotnet test tests/Qyl.OpenTelemetry.SemanticConventions.Analyzers.Tests/Qyl.OpenTelemetry.SemanticConventions.Analyzers.Tests.csproj -c Release
+dotnet test tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests.csproj -c Release
  1. ts6EXco4 — Docs generator uses a non-existent tool path in docs
    Rationale: The tool folder is tools/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.DocsGenerator on this branch. Derive it dynamically to avoid future renames.

Patch (tools/.../DocsGenerator/Program.cs):

-const string ProjectRelativePath = "tools/Qyl.OpenTelemetry.SemanticConventions.Analyzers.DocsGenerator";
+static string FindDocsGeneratorPath(string repoRoot)
+{
+    var tools = Path.Combine(repoRoot, "tools");
+    return Directory.EnumerateDirectories(tools, "*DocsGenerator", SearchOption.TopDirectoryOnly)
+                    .FirstOrDefault(dir => File.Exists(Path.Combine(dir, $"{Path.GetFileName(dir)}.csproj")))
+           ?? Path.Combine(tools, "ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.DocsGenerator");
+}
+var generatorProjectPath = FindDocsGeneratorPath(repoRoot);

…and use generatorProjectPath anywhere the docs print regeneration commands.

  1. ts6EXDZ2 — Weaver install to root-owned path will fail on GH-hosted runners
    Rationale: /usr/local/bin requires root. Install to user-local bin and export to PATH.

Diff (.github/workflows/weaver-roundtrip.yml):

-          install -m 0755 "$RUNNER_TEMP/weaver/weaver" /usr/local/bin/weaver
-          weaver --version
+          mkdir -p "$HOME/.local/bin"
+          install -m 0755 "$RUNNER_TEMP/weaver/weaver" "$HOME/.local/bin/weaver"
+          echo "$HOME/.local/bin" >> "$GITHUB_PATH"
+          weaver --version
  1. ts6EXC2C — Package identity consistency in README (if any ANcpLua.* mention remains)
    Rationale: Avoid spec drift. If the Incubation section still says ANcpLua., replace with Qyl.. Quick check:
  • If you see any “ANcpLua.OpenTelemetry.SemanticConventions.Analyzers” in README, replace with “Qyl.OpenTelemetry.SemanticConventions.Analyzers”.

If you want, I can mark the three stale threads (HelpLinkBase, FindRepoRoot, Utilities version skew) as resolved after you push the above changes.

Plan to apply

  • Fix README install assets, code-fix table rows, and paths
  • Fix weaver workflow install path
  • Compute code-fix availability from actual providers in DocsGenerator
  • Make DocsGenerator robust to tool project folder name
  • Optional: sweep README for any remaining ANcpLua.* package-ID mentions

Would you like me to also:

  • sweep README for any lingering “ANcpLua.” package-ID mentions and flip them to “Qyl.”, and
  • resolve the three stale threads called out above on your behalf once these commits land?

The requested changes have been implemented and a pull request has been created: View PR

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
tools/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.DocsGenerator/Program.cs (1)

130-131: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Set QYL0031/QYL0032 code-fix visibility to No in generated docs.

Line 130 and Line 158 still map non-QYL0030 fixable IDs to Yes, which can surface QYL0031/QYL0032 as fixable and reintroduce docs/rule-intent drift.

Proposed fix
-            var codeFix = fixableIds.Contains(d.Id)
-                ? d.Id == "QYL0030" ? "Exact replacements only" : "Yes"
-                : "No";
+            var codeFix = d.Id switch
+            {
+                "QYL0030" => "Exact replacements only",
+                "QYL0031" or "QYL0032" => "No",
+                _ => fixableIds.Contains(d.Id) ? "Yes" : "No",
+            };
@@
-            var codeFix = fixableIds.Contains(d.Id)
-                ? d.Id == "QYL0030" ? "Exact replacements only." : "Yes."
-                : "No.";
+            var codeFix = d.Id switch
+            {
+                "QYL0030" => "Exact replacements only.",
+                "QYL0031" or "QYL0032" => "No.",
+                _ => fixableIds.Contains(d.Id) ? "Yes." : "No.",
+            };

Also applies to: 158-159

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@tools/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.DocsGenerator/Program.cs`
around lines 130 - 131, The generated docs currently map most fixable IDs to
"Yes" using the ternary that checks d.Id (with a special-case for "QYL0030");
update that mapping so that IDs "QYL0031" and "QYL0032" are explicitly treated
as "No" (i.e., when computing the fixable visibility string for a diagnostic,
return "No" for d.Id == "QYL0031" or d.Id == "QYL0032", keep the existing "Exact
replacements only" for "QYL0030", and return "Yes"/"No" otherwise). Apply the
same change in both places where the d.Id ternary is used to produce the fixable
column.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In
`@tools/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.DocsGenerator/Program.cs`:
- Around line 130-131: The generated docs currently map most fixable IDs to
"Yes" using the ternary that checks d.Id (with a special-case for "QYL0030");
update that mapping so that IDs "QYL0031" and "QYL0032" are explicitly treated
as "No" (i.e., when computing the fixable visibility string for a diagnostic,
return "No" for d.Id == "QYL0031" or d.Id == "QYL0032", keep the existing "Exact
replacements only" for "QYL0030", and return "Yes"/"No" otherwise). Apply the
same change in both places where the d.Id ternary is used to produce the fixable
column.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 0faa92a0-3489-4173-8155-bfd454541b05

📥 Commits

Reviewing files that changed from the base of the PR and between 0a52ca6 and a0bad40.

📒 Files selected for processing (16)
  • scripts/regen-supplemental-catalog.csx
  • src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.csproj
  • src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/OpenTelemetryDeprecatedSemconvCatalog.cs
  • src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/QYL0073TracedActivitySourceNameAnalyzer.cs
  • src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/QYL0083InsecureEndpointAnalyzer.cs
  • src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/QYL0093MissingResourceAttributesAnalyzer.cs
  • src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/QYL0109NonInterceptableTracedAnalyzer.cs
  • src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/SemconvLegacyContextSuppressor.cs
  • tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/Imports/QYL0013MissingSchemaUrlTests.cs
  • tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/Imports/QYL0064GenAiMissingRequiredAttributesTests.cs
  • tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/Imports/QYL0077DuplicateInstrumentationTests.cs
  • tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/Imports/QYL0079ManualSpanRecommendedTests.cs
  • tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/Imports/QYL0085InvalidAttributeValueTests.cs
  • tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/Imports/QYL0085OfficialSemconvAlignmentTests.cs
  • tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/Imports/QYL0124NonInterceptableAgentTracedTests.cs
  • tools/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.DocsGenerator/Program.cs
💤 Files with no reviewable changes (1)
  • src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/OpenTelemetryDeprecatedSemconvCatalog.cs
📜 Review details
⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (15)
tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/Imports/QYL0013MissingSchemaUrlTests.cs (1)

1-1: LGTM!

tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/Imports/QYL0064GenAiMissingRequiredAttributesTests.cs (1)

1-1: LGTM!

tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/Imports/QYL0124NonInterceptableAgentTracedTests.cs (1)

1-2: LGTM!

tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/Imports/QYL0085InvalidAttributeValueTests.cs (1)

1-1: LGTM!

tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/Imports/QYL0085OfficialSemconvAlignmentTests.cs (1)

1-1: LGTM!

tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/Imports/QYL0077DuplicateInstrumentationTests.cs (1)

1-1: LGTM!

src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/QYL0109NonInterceptableTracedAnalyzer.cs (1)

5-5: LGTM!

Also applies to: 33-34

tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/Imports/QYL0079ManualSpanRecommendedTests.cs (1)

1-1: LGTM!

src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/QYL0083InsecureEndpointAnalyzer.cs (1)

5-5: LGTM!

Also applies to: 50-50

src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/SemconvLegacyContextSuppressor.cs (1)

7-9: LGTM!

src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/QYL0093MissingResourceAttributesAnalyzer.cs (1)

5-5: LGTM!

Also applies to: 25-25

src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.csproj (1)

8-9: LGTM!

src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/QYL0073TracedActivitySourceNameAnalyzer.cs (1)

5-5: LGTM!

Also applies to: 29-29

tools/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.DocsGenerator/Program.cs (1)

16-16: LGTM!

Also applies to: 354-355

scripts/regen-supplemental-catalog.csx (1)

80-81: LGTM!

Also applies to: 118-118

@ANcpLua
Copy link
Copy Markdown
Owner Author

ANcpLua commented May 24, 2026

Triage Bot report

  • thread ts6EWqP5 from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    🟡 MEDIUM RISK Suggestion: Exclude runtime assets to pr

  • thread ts6EWqP7 from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    ⚪ LOW RISK The code-fix availability for OTSC0031 contr

  • thread ts6EWuuP from @copilot-pull-request-reviewer: needs-human — no rule matched — keeping blocked for manual review

    Consumer sample bumps ANcpLua.Roslyn.Utilities to 2.2.22, but the analyzer proje

  • thread ts6EXC17 from @copilot-pull-request-reviewer: needs-human — no rule matched — keeping blocked for manual review

    HelpLinkBase still points at docs/ANcpLua.OpenTelemetry.SemanticConventions.Anal

  • thread ts6EXC1_ from @copilot-pull-request-reviewer: needs-human — no rule matched — keeping blocked for manual review

    FindRepoRoot still searches for ANcpLua.OpenTelemetry.SemanticConventions.Analyz

  • thread ts6EXC2C from @copilot-pull-request-reviewer: needs-human — no rule matched — keeping blocked for manual review

    The Incubation section says the package ships under the ANcpLua.* package ID,

  • thread ts6EXC2D from @copilot-pull-request-reviewer: needs-human — no rule matched — keeping blocked for manual review

    PR title/summary describe a README optimization, but this change set also rename

  • thread ts6EXDZ0 from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P2 Badge

  • thread ts6EXDZ1 from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P1 Badge

  • thread ts6EXDZ2 from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P1 Badge

  • thread ts6EXGTe from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

    🧩 Analysi

  • thread ts6EXGTj from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

    🧩 Analysi

  • thread ts6EXGTn from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🧹 Nitpick | 🔵 Trivial | ⚡ Quick win **Pin dotnet-script tool version

  • thread ts6EXGTo from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🧹 Nitpick | 🔵 Trivial Add workflow-level concurrency cancellation. T

  • thread ts6EXGTq from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

    🧩 Analysi

  • thread ts6EXGTr from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win **Package identity is interna

  • thread ts6EXGTs from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Repository paths in usage/v

  • thread ts6EXGT- from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win **Remove duplicated diag

  • thread ts6EXcM4 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win **Consolidate reserved d

  • thread ts6EXco1 from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P2 Badge

  • thread ts6EXco4 from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P2 Badge

  • thread ts6EXco6 from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P2 Badge

Threads marked needs-human stay unresolved and block auto-merge.

@chatgpt-codex-connector
Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 24, 2026

Tip

For best results, initiate chat on the files or code changes.

@ANcpLua

Blocking and drift-prone items. Apply these minimal diffs; they map one-to-one to the open threads.

  1. README — analyzers must not ship to runtime (ts6EWqP5), fix 0031/0032 labeling (ts6EWqP7), remove count drift, and keep paths consistent with current tree (ts6EXGTs)
*** a/README.md
--- b/README.md
@@
-<PackageReference Include="Qyl.OpenTelemetry.SemanticConventions.Analyzers"
-                  Version="..."
-                  PrivateAssets="all"
-                  IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
+<PackageReference Include="Qyl.OpenTelemetry.SemanticConventions.Analyzers"
+                  Version="..."
+                  PrivateAssets="all"
+                  IncludeAssets="analyzers; buildtransitive" />
@@
-| [`QYL0031`](docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md#qyl0031) | Warning | Exact replacements only | Supplemental catalog context-sensitive, manual-review, removed/no-replacement, or ambiguous payload migration |
-| [`QYL0032`](docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md#qyl0032) | Info    | Exact replacements only | Supplemental catalog item appears in test, fixture, compatibility, generated, translator, or catalog context |
+| [`QYL0031`](docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md#qyl0031) | Warning | No | Supplemental catalog context-sensitive, manual-review, removed/no-replacement, or ambiguous payload migration |
+| [`QYL0032`](docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md#qyl0032) | Info    | No | Supplemental catalog item appears in test, fixture, compatibility, generated, translator, or catalog context |
@@
-- **Generated docs and audit.** Regenerate the package catalog with `scripts/generate-docs.sh generate`; validate with `scripts/generate-docs.sh validate`; print the current 156-entry coverage audit with `scripts/generate-docs.sh audit`.
+- **Generated docs and audit.** Regenerate with `scripts/generate-docs.sh generate`; validate with `scripts/generate-docs.sh validate`; print the current coverage audit with `scripts/generate-docs.sh audit`.
@@
-<ProjectReference Include="path/to/src/Qyl.OpenTelemetry.SemanticConventions.Analyzers/Qyl.OpenTelemetry.SemanticConventions.Analyzers.csproj"
+<ProjectReference Include="path/to/src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.csproj"
                   OutputItemType="Analyzer"
                   ReferenceOutputAssembly="false" />
@@
-dotnet test tests/Qyl.OpenTelemetry.SemanticConventions.Analyzers.Tests/Qyl.OpenTelemetry.SemanticConventions.Analyzers.Tests.csproj -c Release
+dotnet test tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests.csproj -c Release
  1. Docs generator — ensure docs don’t reintroduce the wrong label for QYL0031/0032 (ts6EWqP7) and point to the actual tool folder to avoid dead paths later
*** a/tools/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.DocsGenerator/Program.cs
--- b/tools/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.DocsGenerator/Program.cs
@@
-    private const string PackageName = "Qyl.OpenTelemetry.SemanticConventions.Analyzers";
-    private const string ProjectRelativePath = "tools/" + PackageName + ".DocsGenerator";
+    private const string PackageName = "Qyl.OpenTelemetry.SemanticConventions.Analyzers";
+    // Match current repo layout
+    private const string ProjectRelativePath = "tools/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.DocsGenerator";
@@
-            var codeFix = fixableIds.Contains(d.Id)
-                ? d.Id is "QYL0030" or "QYL0031" or "QYL0032" ? "Exact replacements only" : "Yes"
-                : "No";
+            var codeFix = fixableIds.Contains(d.Id)
+                ? (d.Id is "QYL0030" ? "Exact replacements only" : "Yes")
+                : "No";
@@
-            var codeFix = fixableIds.Contains(d.Id)
-                ? d.Id is "QYL0030" or "QYL0031" or "QYL0032" ? "Exact replacements only." : "Yes."
-                : "No.";
+            var codeFix = fixableIds.Contains(d.Id)
+                ? (d.Id is "QYL0030" ? "Exact replacements only." : "Yes.")
+                : "No.";
  1. Diagnostic help links — fix base to the committed doc path (ts6EXC17)
*** a/src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/DiagnosticDescriptors.cs
--- b/src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/DiagnosticDescriptors.cs
@@
-    private const string HelpLinkBase = "https://github.com/ANcpLua/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers"
-        + "/blob/main/docs/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.md#";
+    private const string HelpLinkBase = "https://github.com/ANcpLua/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers"
+        + "/blob/main/docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md#";
  1. Regenerator — robust repo‑root detection; fail on upstream YAML parse to avoid silent drift (ts6EXC1_)
*** a/scripts/regen-supplemental-catalog.csx
--- b/scripts/regen-supplemental-catalog.csx
@@
-        if (File.Exists(Path.Combine(dir.FullName, "ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.slnx")))
+        var hasSln =
+            File.Exists(Path.Combine(dir.FullName, "Qyl.OpenTelemetry.SemanticConventions.Analyzers.slnx")) ||
+            File.Exists(Path.Combine(dir.FullName, "ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.slnx"));
+        var hasMarkers =
+            Directory.Exists(Path.Combine(dir.FullName, ".git")) &&
+            File.Exists(Path.Combine(dir.FullName, "scripts", ".upstream-semconv-version"));
+        if (hasSln || hasMarkers)
         {
             return dir.FullName;
         }
@@
-    catch (Exception ex)
-    {
-        Console.Error.WriteLine($"skipping {file}: {ex.Message}");
-        return;
-    }
+    catch (Exception ex)
+    {
+        throw new InvalidOperationException($"Failed to parse upstream model file: {file}", ex);
+    }
  1. Weaver workflow — install to a user‑writable path on GH runners (ts6EXDZ2)
*** a/.github/workflows/weaver-roundtrip.yml
--- b/.github/workflows/weaver-roundtrip.yml
@@
-          install -m 0755 "$RUNNER_TEMP/weaver/weaver" /usr/local/bin/weaver
-          weaver --version
+          mkdir -p "$HOME/.local/bin"
+          install -m 0755 "$RUNNER_TEMP/weaver/weaver" "$HOME/.local/bin/weaver"
+          echo "$HOME/.local/bin" >> "$GITHUB_PATH"
+          weaver --version
  1. Optional but prevents silent desync later — DRY the QYL0010 literal in the code‑fix provider (duplication; ts6EXGT-)
*** a/src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/LiveSemconvMetadataCodeFixProvider.cs
--- b/src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/LiveSemconvMetadataCodeFixProvider.cs
@@
-    public override ImmutableArray<string> FixableDiagnosticIds { get; } =
-        ImmutableArray.Create("QYL0010", "QYL0012", "QYL0014");
+    private const string DeprecatedConstantId = "QYL0010";
+    public override ImmutableArray<string> FixableDiagnosticIds { get; } =
+        ImmutableArray.Create(DeprecatedConstantId, "QYL0012", "QYL0014");
@@
-        if (diagnostic.Id == "QYL0010")
+        if (diagnostic.Id == DeprecatedConstantId)
  1. Utilities version skew (ts6EWuuP)
    Pick one and align both analyzer and sample. If you want to stay conservative, downgrade the sample to 2.2.9; if you prefer forward, bump the analyzer to 2.2.22. Either way, keep them identical to avoid loader conflicts.

Confirm which way you want to go; I’ll post the exact one‑liner for that file next.

Once 1–5 (and 7 after you choose a version) are pushed, Codacy threads ts6EWqP5 and ts6EWqP7 stop blocking, and the Copilot/chatgpt items cited above are addressed.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

ResourceManager temp = new ResourceManager("ANcpLua.Analyzers.CodeFixes.CodeFixResources", typeof(CodeFixResources).Assembly);

P1 Badge Point code-fix ResourceManager at the renamed resource manifest

CodeFixResources.Designer still initializes ResourceManager with the old base name ANcpLua.Analyzers.CodeFixes.CodeFixResources, but the project now embeds the resource under Qyl.OpenTelemetry.SemanticConventions.Analyzers.CodeFixResources.resources (ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.csproj). This base-name mismatch prevents loading the code-fix resource set at runtime, so code-fix title retrieval can fail before any localized string is returned.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@@ -51,1817 +51,1817 @@ internal static CultureInfo Culture {

internal static string AL0001AnalyzerDescription {
get {
return ResourceManager.GetString("AL0001AnalyzerDescription", resourceCulture);
return ResourceManager.GetString("QYL0001AnalyzerDescription", resourceCulture);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep analyzer resource keys aligned with renamed IDs

Resources.Designer now looks up QYL*Analyzer* entries, but Resources.resx still defines those strings under AL*Analyzer* names. Since AlAnalyzer.CreateRule constructs localization keys from the new QYL IDs, these lookups miss for every AlAnalyzer-based rule, so diagnostic titles/messages/descriptions no longer resolve to the intended text at runtime.

Useful? React with 👍 / 👎.

internal static string AL0002CodeFixTitle {
get {
return ResourceManager.GetString("AL0002CodeFixTitle", resourceCulture);
return ResourceManager.GetString("QYL0002CodeFixTitle", resourceCulture);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore code-fix resource key mapping

CodeFixResources.Designer was switched to QYL*CodeFixTitle lookup keys, but CodeFixResources.resx still stores the titles as AL*CodeFixTitle. As a result, code-fix title lookups for existing providers resolve to missing keys instead of the configured strings, degrading or breaking code-action presentation for affected diagnostics.

Useful? React with 👍 / 👎.

@ANcpLua
Copy link
Copy Markdown
Owner Author

ANcpLua commented May 24, 2026

Triage Bot report

  • thread ts6EWqP5 from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    🟡 MEDIUM RISK Suggestion: Exclude runtime assets to pr

  • thread ts6EWqP7 from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    ⚪ LOW RISK The code-fix availability for OTSC0031 contr

  • thread ts6EWuuP from @copilot-pull-request-reviewer: needs-human — no rule matched — keeping blocked for manual review

    Consumer sample bumps ANcpLua.Roslyn.Utilities to 2.2.22, but the analyzer proje

  • thread ts6EXC17 from @copilot-pull-request-reviewer: needs-human — no rule matched — keeping blocked for manual review

    HelpLinkBase still points at docs/ANcpLua.OpenTelemetry.SemanticConventions.Anal

  • thread ts6EXC1_ from @copilot-pull-request-reviewer: needs-human — no rule matched — keeping blocked for manual review

    FindRepoRoot still searches for ANcpLua.OpenTelemetry.SemanticConventions.Analyz

  • thread ts6EXC2C from @copilot-pull-request-reviewer: needs-human — no rule matched — keeping blocked for manual review

    The Incubation section says the package ships under the ANcpLua.* package ID,

  • thread ts6EXC2D from @copilot-pull-request-reviewer: needs-human — no rule matched — keeping blocked for manual review

    PR title/summary describe a README optimization, but this change set also rename

  • thread ts6EXDZ0 from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P2 Badge

  • thread ts6EXDZ1 from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P1 Badge

  • thread ts6EXDZ2 from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P1 Badge

  • thread ts6EXGTe from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

    🧩 Analysi

  • thread ts6EXGTj from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

    🧩 Analysi

  • thread ts6EXGTn from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🧹 Nitpick | 🔵 Trivial | ⚡ Quick win **Pin dotnet-script tool version

  • thread ts6EXGTo from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🧹 Nitpick | 🔵 Trivial Add workflow-level concurrency cancellation. T

  • thread ts6EXGTq from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

    🧩 Analysi

  • thread ts6EXGTr from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win **Package identity is interna

  • thread ts6EXGTs from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Repository paths in usage/v

  • thread ts6EXGT- from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win **Remove duplicated diag

  • thread ts6EXcM4 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win **Consolidate reserved d

  • thread ts6EXco1 from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P2 Badge

  • thread ts6EXco4 from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P2 Badge

  • thread ts6EXco6 from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P2 Badge

  • thread ts6EXfM5 from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P1 Badge

  • thread ts6EXfM7 from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P1 Badge

Threads marked needs-human stay unresolved and block auto-merge.

@chatgpt-codex-connector
Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

@ANcpLua
Copy link
Copy Markdown
Owner Author

ANcpLua commented May 24, 2026

Triage Bot report

  • thread ts6EWqP5 from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    🟡 MEDIUM RISK Suggestion: Exclude runtime assets to pr

  • thread ts6EWqP7 from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    ⚪ LOW RISK The code-fix availability for OTSC0031 contr

  • thread ts6EWuuP from @copilot-pull-request-reviewer: needs-human — no rule matched — keeping blocked for manual review

    Consumer sample bumps ANcpLua.Roslyn.Utilities to 2.2.22, but the analyzer proje

  • thread ts6EXC17 from @copilot-pull-request-reviewer: needs-human — no rule matched — keeping blocked for manual review

    HelpLinkBase still points at docs/ANcpLua.OpenTelemetry.SemanticConventions.Anal

  • thread ts6EXC1_ from @copilot-pull-request-reviewer: needs-human — no rule matched — keeping blocked for manual review

    FindRepoRoot still searches for ANcpLua.OpenTelemetry.SemanticConventions.Analyz

  • thread ts6EXC2C from @copilot-pull-request-reviewer: needs-human — no rule matched — keeping blocked for manual review

    The Incubation section says the package ships under the ANcpLua.* package ID,

  • thread ts6EXC2D from @copilot-pull-request-reviewer: needs-human — no rule matched — keeping blocked for manual review

    PR title/summary describe a README optimization, but this change set also rename

  • thread ts6EXDZ0 from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P2 Badge

  • thread ts6EXDZ1 from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P1 Badge

  • thread ts6EXDZ2 from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P1 Badge

  • thread ts6EXGTe from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

    🧩 Analysi

  • thread ts6EXGTj from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

    🧩 Analysi

  • thread ts6EXGTn from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🧹 Nitpick | 🔵 Trivial | ⚡ Quick win **Pin dotnet-script tool version

  • thread ts6EXGTo from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🧹 Nitpick | 🔵 Trivial Add workflow-level concurrency cancellation. T

  • thread ts6EXGTq from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

    🧩 Analysi

  • thread ts6EXGTr from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win **Package identity is interna

  • thread ts6EXGTs from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Repository paths in usage/v

  • thread ts6EXGT- from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win **Remove duplicated diag

  • thread ts6EXcM4 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win **Consolidate reserved d

  • thread ts6EXco1 from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P2 Badge

  • thread ts6EXco4 from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P2 Badge

  • thread ts6EXco6 from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P2 Badge

  • thread ts6EXfM5 from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P1 Badge

  • thread ts6EXfM7 from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P1 Badge

Threads marked needs-human stay unresolved and block auto-merge.

@chatgpt-codex-connector
Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 24, 2026

Tip

For best results, initiate chat on the files or code changes.

@ANcpLua

Prioritize the two Codacy blockers and the remaining spec-drift that can silently mislead consumers. Minimal, surgical diffs below.

Immediate (blocks merge)

  1. README — do not ship analyzer to runtime outputs (ts6EWqP5)
    Analyzer-only packages should never copy DLLs to consumer runtime.
--- a/README.md
+++ b/README.md
@@
-<PackageReference Include="Qyl.OpenTelemetry.SemanticConventions.Analyzers"
-                  Version="..."
-                  PrivateAssets="all"
-                  IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
+<PackageReference Include="Qyl.OpenTelemetry.SemanticConventions.Analyzers"
+                  Version="..."
+                  PrivateAssets="all"
+                  IncludeAssets="analyzers; buildtransitive" />
  1. README — correct Code fix column for 0031/0032 (ts6EWqP7)
    These rules exist for no‑replacement/ambiguous/context cases; they are not auto-fixable.
--- a/README.md
+++ b/README.md
@@
-| [`QYL0031`](docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md#qyl0031) | Warning | Exact replacements only | Supplemental catalog context-sensitive, manual-review, removed/no-replacement, or ambiguous payload migration |
-| [`QYL0032`](docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md#qyl0032) | Info    | Exact replacements only | Supplemental catalog item appears in test, fixture, compatibility, generated, translator, or catalog context |
+| [`QYL0031`](docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md#qyl0031) | Warning | No | Supplemental catalog context-sensitive, manual-review, removed/no-replacement, or ambiguous payload migration |
+| [`QYL0032`](docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md#qyl0032) | Info    | No | Supplemental catalog item appears in test, fixture, compatibility, generated, translator, or catalog context |

Close-the-loop drift fixes (correctness; cheap to apply)

  1. README — remove literal audit counts and keep examples aligned with the repo
--- a/README.md
+++ b/README.md
@@
-- **Generated docs and audit.** Regenerate the package catalog with `scripts/generate-docs.sh generate`; validate with `scripts/generate-docs.sh validate`; print the current 156-entry coverage audit with `scripts/generate-docs.sh audit`.
+- **Generated docs and audit.** Regenerate with `scripts/generate-docs.sh generate`; validate with `scripts/generate-docs.sh validate`; print the current coverage audit with `scripts/generate-docs.sh audit`.
@@  (paths reflect current tree on this branch)
-<ProjectReference Include="path/to/src/Qyl.OpenTelemetry.SemanticConventions.Analyzers/Qyl.OpenTelemetry.SemanticConventions.Analyzers.csproj"
+<ProjectReference Include="path/to/src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.csproj"
                   OutputItemType="Analyzer"
                   ReferenceOutputAssembly="false" />
@@
-dotnet test tests/Qyl.OpenTelemetry.SemanticConventions.Analyzers.Tests/Qyl.OpenTelemetry.SemanticConventions.Analyzers.Tests.csproj -c Release
+dotnet test tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests.csproj -c Release
  1. README — package identity consistency in Incubation
--- a/README.md
+++ b/README.md
@@
-This package ships under the `ANcpLua.*` package ID …
+This package ships under the `Qyl.*` package ID …
  1. Diagnostic help links — ensure IDE links point at the committed doc
--- a/src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/DiagnosticDescriptors.cs
+++ b/src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/DiagnosticDescriptors.cs
@@
-    private const string HelpLinkBase = "https://github.com/ANcpLua/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers"
-        + "/blob/main/docs/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.md#";
+    private const string HelpLinkBase = "https://github.com/ANcpLua/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers"
+        + "/blob/main/docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md#";
  1. Regenerator — robust repo-root detection; fail fast on upstream YAML parse
    Prevents CI flakiness on renames and eliminates silent drift.
--- a/scripts/regen-supplemental-catalog.csx
+++ b/scripts/regen-supplemental-catalog.csx
@@
-        if (File.Exists(Path.Combine(dir.FullName, "ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.slnx")))
+        var hasSln =
+            File.Exists(Path.Combine(dir.FullName, "Qyl.OpenTelemetry.SemanticConventions.Analyzers.slnx")) ||
+            File.Exists(Path.Combine(dir.FullName, "ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.slnx"));
+        var hasMarkers =
+            Directory.Exists(Path.Combine(dir.FullName, ".git")) &&
+            File.Exists(Path.Combine(dir.FullName, "scripts", ".upstream-semconv-version"));
+        if (hasSln || hasMarkers)
         {
             return dir.FullName;
         }
@@
-    catch (Exception ex)
-    {
-        Console.Error.WriteLine($"skipping {file}: {ex.Message}");
-        return;
-    }
+    catch (Exception ex)
+    {
+        throw new InvalidOperationException($"Failed to parse upstream model file: {file}", ex);
+    }
  1. Weave round-trip workflow — install to a user-writable path on GH runners
--- a/.github/workflows/weaver-roundtrip.yml
+++ b/.github/workflows/weaver-roundtrip.yml
@@
-          install -m 0755 "$RUNNER_TEMP/weaver/weaver" /usr/local/bin/weaver
-          weaver --version
+          mkdir -p "$HOME/.local/bin"
+          install -m 0755 "$RUNNER_TEMP/weaver/weaver" "$HOME/.local/bin/weaver"
+          echo "$HOME/.local/bin" >> "$GITHUB_PATH"
+          weaver --version

Keep docs in sync with README

  1. Docs generator — only QYL0030 is “Exact replacements only” (prevents re‑introducing the wrong label)
--- a/tools/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.DocsGenerator/Program.cs
+++ b/tools/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.DocsGenerator/Program.cs
@@
-            var codeFix = fixableIds.Contains(d.Id)
-                ? d.Id is "QYL0030" or "QYL0031" or "QYL0032" ? "Exact replacements only" : "Yes"
-                : "No";
+            var codeFix = fixableIds.Contains(d.Id)
+                ? (d.Id is "QYL0030" ? "Exact replacements only" : "Yes")
+                : "No";
@@
-            var codeFix = fixableIds.Contains(d.Id)
-                ? d.Id is "QYL0030" or "QYL0031" or "QYL0032" ? "Exact replacements only." : "Yes."
-                : "No.";
+            var codeFix = fixableIds.Contains(d.Id)
+                ? (d.Id is "QYL0030" ? "Exact replacements only." : "Yes.")
+                : "No.";

Optional but removes future foot‑guns

  1. Code-fix provider — de‑duplicate the QYL0010 literal (prevents rename desync)
--- a/src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/LiveSemconvMetadataCodeFixProvider.cs
+++ b/src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/LiveSemconvMetadataCodeFixProvider.cs
@@
-    public override ImmutableArray<string> FixableDiagnosticIds { get; } =
-        ImmutableArray.Create("QYL0010", "QYL0012", "QYL0014");
+    private const string DeprecatedConstantId = "QYL0010";
+    public override ImmutableArray<string> FixableDiagnosticIds { get; } =
+        ImmutableArray.Create(DeprecatedConstantId, "QYL0012", "QYL0014");
@@
-        if (diagnostic.Id == "QYL0010")
+        if (diagnostic.Id == DeprecatedConstantId)
  1. Analyzer identity alignment (if not yet updated)
--- a/src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.csproj
+++ b/src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.csproj
@@
-  <RootNamespace>OpenTelemetry.SemanticConventions.Analyzers</RootNamespace>
-  <AssemblyName>OpenTelemetry.SemanticConventions.Analyzers</AssemblyName>
+  <RootNamespace>Qyl.OpenTelemetry.SemanticConventions.Analyzers</RootNamespace>
+  <AssemblyName>Qyl.OpenTelemetry.SemanticConventions.Analyzers</AssemblyName>

One decision needed

  • ANcpLua.Roslyn.Utilities version: keep analyzer and sample identical. Confirm whether you want 2.2.9 everywhere (status quo) or bump both to 2.2.22. I’ll follow your choice.

After you push the README and (2) generator label fix, I can resolve the two Codacy threads. If you prefer to treat pinning (tool versions, workflow concurrency, action SHA pinning) as a separate hygiene PR, say so and I’ll open a follow‑up issue.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 24, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Repo/branch =="
git rev-parse --abbrev-ref HEAD || true
git rev-parse HEAD || true

echo ""
echo "== README: IncludeAssets and diagnostics table rows for QYL0031/0032 =="
rg -n 'IncludeAssets=' README.md || true
rg -nC2 'QYL0031|QYL0032' README.md || true

echo ""
echo "== README: residual hard-coded audit counts and package-id/incubation text =="
rg -n '156-entry|coverage audit|ships under the `ANcpLua' README.md || true
rg -nC3 'Incubation|incubation|License' README.md || true

echo ""
echo "== README: validation block contains git diff --check =="
rg -n 'git diff --check' README.md || true

echo ""
echo "== Solution files present (to validate README build command) =="
fd -a -g '*.slnx' || true

echo ""
echo "== DiagnosticDescriptors.cs: HelpLinkBase target =="
sed -n '1,40p' src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/DiagnosticDescriptors.cs 2>/dev/null || true

echo ""
echo "== regen-supplemental-catalog.csx: FindRepoRoot and YAML error handling =="
rg -nC3 'FindRepoRoot|slnx|Could not find|skipping|parse|YamlStream|catch' scripts/regen-supplemental-catalog.csx || true

echo ""
echo "== weaver-roundtrip.yml: install path and PATH export =="
rg -nC2 '/usr/local/bin|GITHUB_PATH|persist-credentials|concurrency' .github/workflows/weaver-roundtrip.yml || true

echo ""
echo "== supplemental-catalog-drift.yml: dotnet-script install pinning (informational) =="
rg -nC2 'dotnet-script|dotnet-version|persist-credentials' .github/workflows/supplemental-catalog-drift.yml || true

echo ""
echo "== Utilities package versions in analyzer vs sample =="
rg -n 'ANcpLua\.Roslyn\.Utilities' src/**/*.csproj samples/**/*.csproj || true

echo ""
echo "== Tests: stale imports (.Analyzers.Analyzers / .CodeFixes.CodeFixes) =="
rg -n 'Qyl\.OpenTelemetry\.SemanticConventions\.Analyzers\.Analyzers' tests || true
rg -n 'Qyl\.OpenTelemetry\.SemanticConventions\.Analyzers\.CodeFixes\.CodeFixes' tests || true

echo ""
echo "== Docs generator: code-fix labeling + ProjectRelativePath =="
rg -nC2 'QYL0030|QYL0031|QYL0032|Exact replacements only|ProjectRelativePath' tools/**/Program.cs || true

Length of output: 25508


@ANcpLua

Status at PR head a0bad40. The items below are the ones that still matter for correctness, consumer safety, or spec drift. Each has a surgical diff.

Fix now (blocks or creates drift)

  1. README — analyzer should not ship to runtime outputs (ts6EWqP5)
    Change IncludeAssets to analyzer-only. This prevents the analyzer DLL from being copied into consumer runtime folders.
--- a/README.md
+++ b/README.md
@@
-  <PackageReference Include="Qyl.OpenTelemetry.SemanticConventions.Analyzers"
-                    Version="..."
-                    PrivateAssets="all"
-                    IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
+  <PackageReference Include="Qyl.OpenTelemetry.SemanticConventions.Analyzers"
+                    Version="..."
+                    PrivateAssets="all"
+                    IncludeAssets="analyzers; buildtransitive" />
  1. README — wrong Code fix labeling for QYL0031/QYL0032 (ts6EWqP7)
    These rules explicitly cover “no‑replacement/ambiguous/context” paths. They must not claim exact/automatic fixes.
--- a/README.md
+++ b/README.md
@@
-| [`QYL0031`](docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md#qyl0031) | Warning | Exact replacements only | Supplemental catalog context-sensitive, manual-review, removed/no-replacement, or ambiguous payload migration |
-| [`QYL0032`](docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md#qyl0032) | Info | Exact replacements only | Supplemental catalog item appears in test, fixture, compatibility, generated, translator, or catalog context |
+| [`QYL0031`](docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md#qyl0031) | Warning | No | Supplemental catalog context-sensitive, manual-review, removed/no-replacement, or ambiguous payload migration |
+| [`QYL0032`](docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md#qyl0032) | Info | No | Supplemental catalog item appears in test, fixture, compatibility, generated, translator, or catalog context |
  1. README — remove the last hard-coded audit literal (drift vector)
--- a/README.md
+++ b/README.md
@@
-- **Generated docs and audit.** Regenerate the package catalog with `scripts/generate-docs.sh generate`; validate with `scripts/generate-docs.sh validate`; print the current 156-entry coverage audit with `scripts/generate-docs.sh audit`. Every `QYL*` rule has a stable `#qyl0010` anchor in the generated docs that every `DiagnosticDescriptor.HelpLinkUri` resolves to.
+- **Generated docs and audit.** Regenerate with `scripts/generate-docs.sh generate`; validate with `scripts/generate-docs.sh validate`; print the current coverage audit with `scripts/generate-docs.sh audit`. Every `QYL*` rule has a stable `#qyl0010` anchor in the generated docs that every `DiagnosticDescriptor.HelpLinkUri` resolves to.
  1. README — package identity contradiction in Incubation
    Top says “package ID is Qyl.” while Incubation still says “ships under ANcpLua.”.
--- a/README.md
+++ b/README.md
@@
-This repository is the incubation home for what may eventually be proposed as an official `OpenTelemetry.SemanticConventions.Analyzers` companion to `opentelemetry-dotnet-contrib`. While here, it ships under the `ANcpLua.*` package ID and Apache-2.0 license.
+This repository is the incubation home for what may eventually be proposed as an official `OpenTelemetry.SemanticConventions.Analyzers` companion to `opentelemetry-dotnet-contrib`. While here, it ships under the `Qyl.*` package ID and Apache-2.0 license.
  1. Workflow — weaver installs to a root‑owned path on runners
    Installing into /usr/local/bin without sudo will fail on GitHub-hosted Ubuntu.
--- a/.github/workflows/weaver-roundtrip.yml
+++ b/.github/workflows/weaver-roundtrip.yml
@@
-          install -m 0755 "$RUNNER_TEMP/weaver/weaver" /usr/local/bin/weaver
-          weaver --version
+          mkdir -p "$HOME/.local/bin"
+          install -m 0755 "$RUNNER_TEMP/weaver/weaver" "$HOME/.local/bin/weaver"
+          echo "$HOME/.local/bin" >> "$GITHUB_PATH"
+          weaver --version
  1. Tests — bad imports block compilation
    Imports still reference non-existent nested namespaces. Replace across tests/…/Imports:
  • Qyl.OpenTelemetry.SemanticConventions.Analyzers.Analyzers → Qyl.OpenTelemetry.SemanticConventions.Analyzers
  • Qyl.OpenTelemetry.SemanticConventions.Analyzers.CodeFixes.CodeFixes → Qyl.OpenTelemetry.SemanticConventions.Analyzers.CodeFixes

Representative hunks (apply to all listed files in your scan):

--- a/tests/.../Imports/QYL0090UncompressedExportTests.cs
+++ b/tests/.../Imports/QYL0090UncompressedExportTests.cs
-using Qyl.OpenTelemetry.SemanticConventions.Analyzers.Analyzers;
+using Qyl.OpenTelemetry.SemanticConventions.Analyzers;
--- a/tests/.../Imports/QYL0124NonInterceptableAgentTracedTests.cs
+++ b/tests/.../Imports/QYL0124NonInterceptableAgentTracedTests.cs
-using Qyl.OpenTelemetry.SemanticConventions.Analyzers.Analyzers;
-using Qyl.OpenTelemetry.SemanticConventions.Analyzers.CodeFixes.CodeFixes;
+using Qyl.OpenTelemetry.SemanticConventions.Analyzers;
+using Qyl.OpenTelemetry.SemanticConventions.Analyzers.CodeFixes;
  1. Docs generator — remove baked-in “156‑entry” phrasing (prevents reintroducing drift in generated docs)
    The generator currently emits that literal in the guidance table text.
--- a/tools/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.DocsGenerator/Program.cs
+++ b/tools/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.DocsGenerator/Program.cs
@@
-        sb.AppendLine($"| Keep attribute-value fallback separate from the curated name/key/event/metric count | `{stats.ValueEntries.Length}` supplemental attribute-value rows are outside the 156-entry inventory and are used only when live value metadata is absent. |");
+        sb.AppendLine($"| Keep attribute-value fallback separate from the curated name/key/event/metric count | `{stats.ValueEntries.Length}` supplemental attribute-value rows are tracked separately from the curated inventory and are used only when live value metadata is absent. |");

Keep or improve (non-blocking hardening; do in this PR if you want it closed cleanly)

  1. scripts/regen-supplemental-catalog.csx — make repo-root detection resilient
    YAML parse already throws (good). If you want to eliminate any dependence on a single .slnx name, accept either slnx and/or stable markers:
--- a/scripts/regen-supplemental-catalog.csx
+++ b/scripts/regen-supplemental-catalog.csx
@@
 static string FindRepoRoot()
 {
     var dir = new DirectoryInfo(Directory.GetCurrentDirectory());
     while (dir is not null)
     {
-        // existing check(s)
+        var hasSln =
+            File.Exists(Path.Combine(dir.FullName, "Qyl.OpenTelemetry.SemanticConventions.Analyzers.slnx")) ||
+            File.Exists(Path.Combine(dir.FullName, "ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.slnx"));
+        var hasMarkers =
+            Directory.Exists(Path.Combine(dir.FullName, ".git")) &&
+            File.Exists(Path.Combine(dir.FullName, "scripts", ".upstream-semconv-version"));
+        if (hasSln || hasMarkers)
+            return dir.FullName;
         dir = dir.Parent;
     }
     throw new InvalidOperationException("Could not find repository root.");
 }

Confirmed resolved/stale (mark the threads accordingly)

  • ts6EXC17 (HelpLinkBase): fixed — HelpLinkBase targets docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md.
  • ts6EWuuP (utilities version skew): stale — both the analyzer and the sample pin ANcpLua.Roslyn.Utilities 2.2.9.
  • Docs generator labeling for 0031/0032: already fixed — only QYL0030 renders “Exact replacements only.”
  • README validation gate: git diff --check is present.

If you want me to file a follow‑up issue for CI determinism (pin dotnet-script version; add workflow concurrency; set checkout persist-credentials: false), say so and I’ll open it against this repo with backlinks to this PR and your comment.

  • README

    • Replace IncludeAssets with “analyzers; buildtransitive”.
    • Flip Code fix column for QYL0031/QYL0032 from “Exact replacements only” to “No”.
    • Remove the “156-entry” literal and generalize the audit sentence.
    • Align Incubation section to say the package ships under Qyl.*.
  • Workflows

    • In .github/workflows/weaver-roundtrip.yml install the weaver binary into $HOME/.local/bin and export via $GITHUB_PATH.
  • Tests

    • Replace all using Qyl.OpenTelemetry.SemanticConventions.Analyzers.Analyzers with Qyl.OpenTelemetry.SemanticConventions.Analyzers.
    • Replace all using Qyl.OpenTelemetry.SemanticConventions.Analyzers.CodeFixes.CodeFixes with Qyl.OpenTelemetry.SemanticConventions.Analyzers.CodeFixes.
  • Docs generator

    • Remove the baked-in “156-entry” phrase from the guidance table row that describes value-entry accounting.
  • Regen script (optional but recommended)

    • Update FindRepoRoot to accept either slnx name and also fall back to .git + scripts/.upstream-semconv-version markers.

✏️ Learnings added
Learnt from: ANcpLua
URL: https://github.com/ANcpLua/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/pull/21

Timestamp: 2026-05-24T08:55:12.053Z
Learning: README installation for analyzer-only packages must not include runtime/build/native/contentfiles in IncludeAssets; use "analyzers; buildtransitive".

Learnt from: ANcpLua
URL: https://github.com/ANcpLua/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/pull/21

Timestamp: 2026-05-24T08:55:12.053Z
Learning: QYL0031 and QYL0032 do not offer automatic fixes; only QYL0030 is "Exact replacements only".

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


The requested changes have been implemented and a pull request has been created: View PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 24, 2026

Tip

For best results, initiate chat on the files or code changes.

@ANcpLua

To unblock merge, make these minimal, high‑impact edits. They map 1:1 to the open threads and remove drift/silent failure modes.

  1. README — do not ship analyzer DLLs to runtime outputs (ts6EWqP5)
-<PackageReference Include="Qyl.OpenTelemetry.SemanticConventions.Analyzers"
-                  Version="..."
-                  PrivateAssets="all"
-                  IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
+<PackageReference Include="Qyl.OpenTelemetry.SemanticConventions.Analyzers"
+                  Version="..."
+                  PrivateAssets="all"
+                  IncludeAssets="analyzers; buildtransitive" />
  1. README — correct Code fix column for 0031/0032 (ts6EWqP7)
    These rules cover removed/no‑replacement and ambiguous/context cases; no auto‑fix.
-| [0031 …] | Warning | Exact replacements only | …
-| [0032 …] | Info    | Exact replacements only | …
+| [0031 …] | Warning | No | …
+| [0032 …] | Info    | No | …

(use whatever ID scheme is in the table; the fix is the “Code fix” cell → “No” for both 0031 and 0032)

  1. Help links — point to the committed doc file (ts6EXC17)
    src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/DiagnosticDescriptors.cs
- + "/blob/main/docs/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.md#";
+ + "/blob/main/docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md#";
  1. Catalog regenerator — robust repo‑root detection and fail‑fast on upstream YAML parse (ts6EXC1_)
    scripts/regen-supplemental-catalog.csx
 static string FindRepoRoot()
 {
   var dir = new DirectoryInfo(Directory.GetCurrentDirectory());
   while (dir is not null)
   {
-    if (File.Exists(Path.Combine(dir.FullName, "ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.slnx")))
+    var hasSln =
+      File.Exists(Path.Combine(dir.FullName, "Qyl.OpenTelemetry.SemanticConventions.Analyzers.slnx")) ||
+      File.Exists(Path.Combine(dir.FullName, "ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.slnx"));
+    var hasMarkers =
+      Directory.Exists(Path.Combine(dir.FullName, ".git")) &&
+      File.Exists(Path.Combine(dir.FullName, "scripts", ".upstream-semconv-version"));
+    if (hasSln || hasMarkers)
       return dir.FullName;
     dir = dir.Parent;
   }
   throw new InvalidOperationException("Could not find repository root.");
 }
@@
-  try { stream.Load(reader); }
-  catch (Exception ex) { Console.Error.WriteLine($"skipping {file}: {ex.Message}"); return; }
+  try { stream.Load(reader); }
+  catch (Exception ex) { throw new InvalidOperationException($"Failed to parse upstream model file: {file}", ex); }
  1. README — repository paths must match current tree (ts6EXGTs)
-<ProjectReference Include="path/to/src/Qyl.OpenTelemetry.SemanticConventions.Analyzers/Qyl.OpenTelemetry.SemanticConventions.Analyzers.csproj"
+<ProjectReference Include="path/to/src/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.csproj"
                   OutputItemType="Analyzer"
                   ReferenceOutputAssembly="false" />
@@
-dotnet test tests/Qyl.OpenTelemetry.SemanticConventions.Analyzers.Tests/Qyl.OpenTelemetry.SemanticConventions.Analyzers.Tests.csproj
+dotnet test tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.Tests.csproj
  1. README — package identity consistency in Incubation (ts6EXC2C)
-… ships under the `ANcpLua.*` package ID …
+… ships under the `Qyl.*` package ID …
  1. Weaver workflow — install to user‑writable path on GH runners (ts6EXDZ2)
    .github/workflows/weaver-roundtrip.yml
-  install -m 0755 "$RUNNER_TEMP/weaver/weaver" /usr/local/bin/weaver
-  weaver --version
+  mkdir -p "$HOME/.local/bin"
+  install -m 0755 "$RUNNER_TEMP/weaver/weaver" "$HOME/.local/bin/weaver"
+  echo "$HOME/.local/bin" >> "$GITHUB_PATH"
+  weaver --version
  1. Docs generator — prevent relabeling 0031/0032 as fixable in generated docs
    tools/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.DocsGenerator/Program.cs
- var codeFix = fixableIds.Contains(d.Id)
-   ? d.Id is "QYL0030" or "QYL0031" or "QYL0032" ? "Exact replacements only" : "Yes"
-   : "No";
+ var codeFix = fixableIds.Contains(d.Id)
+   ? (d.Id is "QYL0030" ? "Exact replacements only" : "Yes")
+   : "No";

(Apply same change where the per‑rule section repeats the label.)

  1. Analyzer identity — align assembly/root namespace with shipped PackageId (if still mismatched)
    src/…/ANcpLua.OpenTelemetry.SemanticConventions.Analyzers.csproj
-<RootNamespace>OpenTelemetry.SemanticConventions.Analyzers</RootNamespace>
-<AssemblyName>OpenTelemetry.SemanticConventions.Analyzers</AssemblyName>
+<RootNamespace>Qyl.OpenTelemetry.SemanticConventions.Analyzers</RootNamespace>
+<AssemblyName>Qyl.OpenTelemetry.SemanticConventions.Analyzers</AssemblyName>
  1. Utilities version skew (ts6EWuuP)
    Choose one and keep both analyzer and sample identical:
  • Option A (conservative): pin both to 2.2.9 by downgrading samples/Consumer/Consumer.csproj.
  • Option B (forward): bump both analyzer csproj references to 2.2.22 and run tests.

Tell me which direction you want; I’ll provide the one‑liner for the second file accordingly.

Optional hygiene (non‑blocking; ask if you want a follow‑up issue)

  • Pin dotnet‑script version and disable checkout credentials in supplemental‑catalog‑drift.
  • Add workflow‑level concurrency cancellation to weaver‑roundtrip.

Reply once these edits are pushed; I’ll sweep and resolve the two Codacy threads (ts6EWqP5, ts6EWqP7) and mark any stale ones accordingly.

Copilot stopped work on behalf of ANcpLua due to an error May 24, 2026 09:01
@ANcpLua ANcpLua disabled auto-merge May 24, 2026 11:05
@ANcpLua ANcpLua enabled auto-merge May 24, 2026 11:06
@ANcpLua ANcpLua disabled auto-merge May 24, 2026 11:06
@ANcpLua ANcpLua enabled auto-merge May 24, 2026 11:06
@ANcpLua ANcpLua disabled auto-merge May 24, 2026 11:06
@ANcpLua ANcpLua merged commit d4f7237 into main May 24, 2026
31 of 32 checks passed
@ANcpLua ANcpLua deleted the claude/optimize-otsc-readme branch May 24, 2026 11:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants