From 2cd351e9531187b8c5618ede96ebcd25329fd8ee Mon Sep 17 00:00:00 2001 From: Daniel Petty Date: Thu, 19 Nov 2026 20:37:32 +0000 Subject: [PATCH 1/6] docs(openspec): plan the weaver install hint with no version (#6423) --- .../.openspec.yaml | 2 ++ .../6423-drop-weaver-version-hint/design.md | 10 +++++++ .../6423-drop-weaver-version-hint/proposal.md | 28 +++++++++++++++++++ .../specs/telemetry-semconv/spec.md | 13 +++++++++ .../6423-drop-weaver-version-hint/tasks.md | 28 +++++++++++++++++++ 5 files changed, 81 insertions(+) create mode 100644 openspec/changes/6423-drop-weaver-version-hint/.openspec.yaml create mode 100644 openspec/changes/6423-drop-weaver-version-hint/design.md create mode 100644 openspec/changes/6423-drop-weaver-version-hint/proposal.md create mode 100644 openspec/changes/6423-drop-weaver-version-hint/specs/telemetry-semconv/spec.md create mode 100644 openspec/changes/6423-drop-weaver-version-hint/tasks.md diff --git a/openspec/changes/6423-drop-weaver-version-hint/.openspec.yaml b/openspec/changes/6423-drop-weaver-version-hint/.openspec.yaml new file mode 100644 index 0000000000..ce56180a94 --- /dev/null +++ b/openspec/changes/6423-drop-weaver-version-hint/.openspec.yaml @@ -0,0 +1,2 @@ +schema: spec-driven +created: 2026-11-19 diff --git a/openspec/changes/6423-drop-weaver-version-hint/design.md b/openspec/changes/6423-drop-weaver-version-hint/design.md new file mode 100644 index 0000000000..fa7fc76c75 --- /dev/null +++ b/openspec/changes/6423-drop-weaver-version-hint/design.md @@ -0,0 +1,10 @@ +# Design + +## Decisions +- The hint names the devtools image `ghcr.io/dan-petty/devtools`, which has weaver in `/usr/local/bin`, and the weaver releases page. It names no version: the version lives in the mise files of dan-petty/devtools, which Renovate bumps. +- The hint text is `MESSAGES.telemetry.weaver_missing_hint`, as the install hints of npm and OpenSpec are in `MESSAGES`. The image name is the constant `CONST_DEVTOOLS_IMAGE` next to the other image names in `constants.py`. + +## Rejected alternatives +- Keep the version and add a Renovate regex manager on the constant. The owner rule of 2026-11-19 forbids a tool version in `src/` that a dependency update must change. +- Read the version from weaver at run time for the hint. The hint shows only when no weaver is on PATH, so no weaver can report a version. +- Add a version file under `src/` that the code reads. It puts a tool version back in `src/` that a dependency update must change. diff --git a/openspec/changes/6423-drop-weaver-version-hint/proposal.md b/openspec/changes/6423-drop-weaver-version-hint/proposal.md new file mode 100644 index 0000000000..09f1e2a2b7 --- /dev/null +++ b/openspec/changes/6423-drop-weaver-version-hint/proposal.md @@ -0,0 +1,28 @@ +# Proposal: #6423 + +## Why +`src/devops_cli/config/constants.py` holds a copy of the weaver version, `CONST_SEMCONV_WEAVER_VERSION = "0.26.1"`. Only the install hint of `devops telemetry semconv refresh` uses it. No Renovate manager updates this copy, so each weaver release makes the hint wrong. The owner rule of 2026-11-19 says that devops-cli is not a package manager: no tool version stays in `src/` that a dependency update must change. Closes #6423. + +## What Changes +- Delete `CONST_SEMCONV_WEAVER_VERSION`. +- The hint of the `DependencyError` that `devops telemetry semconv refresh` raises when weaver is not on PATH names the devtools image `ghcr.io/dan-petty/devtools` and the weaver releases page, with no version number. The hint text moves to `MESSAGES.telemetry.weaver_missing_hint`, and the image name becomes the constant `CONST_DEVTOOLS_IMAGE`. +- `weaver_package_argv` and its test stay: they test the argv that the code builds, not a version value. +- The hint is a message that a user sees, so the change has a spec delta. + +The change fits one pull request. + +## Capabilities +- `telemetry-semconv` (new): the GenAI semantic conventions snapshot and its refresh command. + +## Impact +- A user with no weaver on PATH gets a hint that stays correct after each weaver release. +- The weaver version lives only in `mise.toml` and `mise.lock` of dan-petty/devtools, which Renovate's `mise` manager bumps. + +## Feasibility +- `git grep -n SEMCONV_WEAVER_VERSION origin/main -- src` finds the constant at `src/devops_cli/config/constants.py:2134` and its only use at `src/devops_cli/telemetry/semconv.py:207`. +- `mise.toml` of dan-petty/devtools holds `"github:open-telemetry/weaver" = "0.28.0"`, and its `mise.lock` holds the URL and checksum of weaver for `linux-x64` and `linux-arm64`. Its README names the image `ghcr.io/dan-petty/devtools` and lists weaver among the tools that Renovate's `mise` manager updates. +- An anonymous request for the manifest of `ghcr.io/dan-petty/devtools:latest` returns HTTP 200, so the image is public. +- dan-petty/devtools#1, the dependency of this item, is closed. + +## Existing Tool Considered +Renovate's `mise` manager is the open, maintained tool that covers the need: it bumps weaver in `mise.toml` and `mise.lock` of dan-petty/devtools. This change builds nothing. It deletes the internal constant `CONST_SEMCONV_WEAVER_VERSION` and its use in the install hint. diff --git a/openspec/changes/6423-drop-weaver-version-hint/specs/telemetry-semconv/spec.md b/openspec/changes/6423-drop-weaver-version-hint/specs/telemetry-semconv/spec.md new file mode 100644 index 0000000000..e78c3fd0b0 --- /dev/null +++ b/openspec/changes/6423-drop-weaver-version-hint/specs/telemetry-semconv/spec.md @@ -0,0 +1,13 @@ +## Purpose +The pinned GenAI semantic conventions snapshot of devops-cli and its refresh command `devops telemetry semconv refresh`, which resolves the conventions with weaver. + +## ADDED Requirements + +### Requirement: The weaver install hint names no version +When no `weaver` is on PATH, the `DependencyError` of `devops telemetry semconv refresh` SHALL name the devtools image `ghcr.io/dan-petty/devtools` and the weaver releases page. The hint SHALL hold no weaver version number, because Renovate updates the version only in the devtools image. + +#### Scenario: Weaver is absent from PATH +- **WHEN** `devops telemetry semconv refresh --commit ` runs and no `weaver` is on PATH +- **THEN** the command exits 1 +- **AND** the message names `ghcr.io/dan-petty/devtools` and `https://github.com/open-telemetry/weaver/releases` +- **AND** the message holds no version number diff --git a/openspec/changes/6423-drop-weaver-version-hint/tasks.md b/openspec/changes/6423-drop-weaver-version-hint/tasks.md new file mode 100644 index 0000000000..8e2427be64 --- /dev/null +++ b/openspec/changes/6423-drop-weaver-version-hint/tasks.md @@ -0,0 +1,28 @@ +# Tasks + +## 1. The install hint names the devtools image and no version + +Kind: behavior. Changes: `src/devops_cli/telemetry/semconv.py`, `src/devops_cli/lang/en/messages.py`, `src/devops_cli/config/constants.py`, `tests/telemetry/test_telemetry_semconv.py`. + +- [ ] 1.1 Test that with no weaver on PATH, the refusal names `ghcr.io/dan-petty/devtools` and the weaver releases page, and holds no version number + - Verification: `$ uv run devops ci test tests/telemetry/test_telemetry_semconv.py` +- [ ] 1.2 Move the hint to `MESSAGES.telemetry.weaver_missing_hint` with the image `CONST_DEVTOOLS_IMAGE` and no version, and delete `CONST_SEMCONV_WEAVER_VERSION` + - Verification: `$ uv run devops ci test tests/telemetry/test_telemetry_semconv.py` + +## 2. No copied weaver version is left + +Kind: deletion. + +- [ ] 2.1 Confirm that no code under `src/` or `tests/` names the deleted constant + - Verification: `$ ! git grep -n SEMCONV_WEAVER_VERSION -- src/ tests/` + +## 3. Documents + +Kind: documents. + +- [ ] 3.1 Regenerate the reference documents for the changed message + - Verification: `$ uv run devops docs generate --check` + +## Workflow follow-up + +- Pending a person: review the diff in tuicr (tuicr -r origin/main..HEAD). From dff287429171691bdce36cc988a1cd42fae0234a Mon Sep 17 00:00:00 2001 From: Daniel Petty Date: Thu, 19 Nov 2026 20:38:49 +0000 Subject: [PATCH 2/6] test(telemetry): the weaver install hint names the devtools image and no version (#6423) --- .../6423-drop-weaver-version-hint/tasks.md | 2 +- tests/telemetry/test_telemetry_semconv.py | 24 +++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/openspec/changes/6423-drop-weaver-version-hint/tasks.md b/openspec/changes/6423-drop-weaver-version-hint/tasks.md index 8e2427be64..4b4c31dc7b 100644 --- a/openspec/changes/6423-drop-weaver-version-hint/tasks.md +++ b/openspec/changes/6423-drop-weaver-version-hint/tasks.md @@ -4,7 +4,7 @@ Kind: behavior. Changes: `src/devops_cli/telemetry/semconv.py`, `src/devops_cli/lang/en/messages.py`, `src/devops_cli/config/constants.py`, `tests/telemetry/test_telemetry_semconv.py`. -- [ ] 1.1 Test that with no weaver on PATH, the refusal names `ghcr.io/dan-petty/devtools` and the weaver releases page, and holds no version number +- [x] 1.1 Test that with no weaver on PATH, the refusal names `ghcr.io/dan-petty/devtools` and the weaver releases page, and holds no version number - Verification: `$ uv run devops ci test tests/telemetry/test_telemetry_semconv.py` - [ ] 1.2 Move the hint to `MESSAGES.telemetry.weaver_missing_hint` with the image `CONST_DEVTOOLS_IMAGE` and no version, and delete `CONST_SEMCONV_WEAVER_VERSION` - Verification: `$ uv run devops ci test tests/telemetry/test_telemetry_semconv.py` diff --git a/tests/telemetry/test_telemetry_semconv.py b/tests/telemetry/test_telemetry_semconv.py index 1f67422f8e..cbe86409e9 100644 --- a/tests/telemetry/test_telemetry_semconv.py +++ b/tests/telemetry/test_telemetry_semconv.py @@ -3,6 +3,7 @@ from __future__ import annotations import json +import re import shutil import subprocess from collections.abc import Callable @@ -18,12 +19,14 @@ from devops_cli.commands.telemetry import app from devops_cli.config.constants import CONST_GIT_COMMIT_SHA_PATTERN from devops_cli.dry_run import set_dry_run +from devops_cli.exceptions import DependencyError from devops_cli.telemetry.semconv import ( GENAI_SNAPSHOT_PATH, current_genai_names, find_unknown_genai_literals, load_genai_snapshot, reduce_resolved_registry, + refresh_genai_snapshot, render_genai_snapshot, weaver_package_argv, ) @@ -186,8 +189,7 @@ def test_reducer_drops_deprecated_names_and_is_byte_stable( None, PINNED_COMMIT, _package_writes_fixture, - "Required dependency 'weaver' is not installed or not available in PATH. Install " - "weaver 0.26.1 from https://github.com/open-telemetry/weaver/releases", + "Required dependency 'weaver' is not installed or not available in PATH.", id="weaver-not-on-path", ), pytest.param( @@ -235,6 +237,24 @@ def test_refresh_refuses_and_leaves_the_snapshot_unchanged( assert snapshot_copy.read_bytes() == before +def test_missing_weaver_hint_names_the_devtools_image_and_no_version( + monkeypatch: pytest.MonkeyPatch, tmp_path: Path +) -> None: + """The hint names where weaver comes from, and no copied version that a weaver release makes wrong.""" + monkeypatch.setattr(shutil, "which", lambda name: None) + monkeypatch.setattr(semconv, "run_subprocess", _refuse_subprocess) + + with pytest.raises(DependencyError) as caught: + refresh_genai_snapshot(PINNED_COMMIT, snapshot_path=tmp_path / "semconv_genai.json") + + hint = caught.value.details["install_hint"] + assert ( + "ghcr.io/dan-petty/devtools" in hint, + "https://github.com/open-telemetry/weaver/releases" in hint, + re.findall(r"\d+\.\d+", hint), + ) == (True, True, []), hint + + def test_refresh_rewrites_the_snapshot_from_weavers_package( runner: CliRunner, monkeypatch: pytest.MonkeyPatch, snapshot_copy: Path ) -> None: From 1a02262926dd27b08c0ad6076317a8f06c0afbad Mon Sep 17 00:00:00 2001 From: Daniel Petty Date: Thu, 19 Nov 2026 20:40:48 +0000 Subject: [PATCH 3/6] fix(telemetry): drop the copied weaver version from the install hint (#6423) --- openspec/changes/6423-drop-weaver-version-hint/tasks.md | 4 ++-- src/devops_cli/config/constants.py | 4 +++- src/devops_cli/lang/en/messages.py | 4 ++++ src/devops_cli/telemetry/semconv.py | 8 ++++---- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/openspec/changes/6423-drop-weaver-version-hint/tasks.md b/openspec/changes/6423-drop-weaver-version-hint/tasks.md index 4b4c31dc7b..71ef553713 100644 --- a/openspec/changes/6423-drop-weaver-version-hint/tasks.md +++ b/openspec/changes/6423-drop-weaver-version-hint/tasks.md @@ -6,14 +6,14 @@ Kind: behavior. Changes: `src/devops_cli/telemetry/semconv.py`, `src/devops_cli/ - [x] 1.1 Test that with no weaver on PATH, the refusal names `ghcr.io/dan-petty/devtools` and the weaver releases page, and holds no version number - Verification: `$ uv run devops ci test tests/telemetry/test_telemetry_semconv.py` -- [ ] 1.2 Move the hint to `MESSAGES.telemetry.weaver_missing_hint` with the image `CONST_DEVTOOLS_IMAGE` and no version, and delete `CONST_SEMCONV_WEAVER_VERSION` +- [x] 1.2 Move the hint to `MESSAGES.telemetry.weaver_missing_hint` with the image `CONST_DEVTOOLS_IMAGE` and no version, and delete `CONST_SEMCONV_WEAVER_VERSION` - Verification: `$ uv run devops ci test tests/telemetry/test_telemetry_semconv.py` ## 2. No copied weaver version is left Kind: deletion. -- [ ] 2.1 Confirm that no code under `src/` or `tests/` names the deleted constant +- [x] 2.1 Confirm that no code under `src/` or `tests/` names the deleted constant - Verification: `$ ! git grep -n SEMCONV_WEAVER_VERSION -- src/ tests/` ## 3. Documents diff --git a/src/devops_cli/config/constants.py b/src/devops_cli/config/constants.py index 85734cda54..444f04813c 100644 --- a/src/devops_cli/config/constants.py +++ b/src/devops_cli/config/constants.py @@ -864,6 +864,9 @@ CONST_DEVCONTAINER_IMAGE_PREFIX = "mcr.microsoft.com/devcontainers/python:" CONST_DEVCONTAINER_PUBLISHED_IMAGE = "ghcr.io/dan-petty/devops-cli/devcontainer:latest" CONST_CANONICAL_OCI_SOURCE: Final[str] = "https://github.com/dan-petty/devops-cli" +# The public image of the development tools (dan-petty/devtools). Renovate keeps the version +# of each tool in its mise files, so an install hint names the image and no version. +CONST_DEVTOOLS_IMAGE: Final[str] = "ghcr.io/dan-petty/devtools" # The Secret Service gh, git and Python keyring use; dbus-x11 satisfies gnome-keyring's # session-bus dependency without pulling in systemd. Mirrors .devcontainer/Dockerfile. CONST_KEYRING_PACKAGES: Final[tuple[str, ...]] = ("gnome-keyring", "dbus-x11") @@ -2131,7 +2134,6 @@ class WebhookExposure(StrEnum): CONST_SEMCONV_GENAI_MODEL_DIR: Final[str] = "model" CONST_SEMCONV_RESOLVED_REGISTRY_FILE: Final[str] = "resolved.yaml" CONST_SEMCONV_WEAVER_BIN: Final[str] = "weaver" -CONST_SEMCONV_WEAVER_VERSION: Final[str] = "0.26.1" CONST_URL_WEAVER_RELEASES: Final[str] = "https://github.com/open-telemetry/weaver/releases" CONST_GIT_COMMIT_SHA_PATTERN: Final[re.Pattern[str]] = re.compile(r"[0-9a-f]{40}") # A quoted string in Python source whose text starts with the GenAI attribute namespace. diff --git a/src/devops_cli/lang/en/messages.py b/src/devops_cli/lang/en/messages.py index 3de5bce5c1..53a4e4eec7 100644 --- a/src/devops_cli/lang/en/messages.py +++ b/src/devops_cli/lang/en/messages.py @@ -1960,6 +1960,10 @@ class TelemetryMessages: "{path} now holds {attributes} attributes, {metrics} metrics and {spans} span types " "from {repo}@{commit} (weaver {weaver})." ) + weaver_missing_hint: str = ( + "The devtools image {image} has weaver in /usr/local/bin. Copy weaver from that image, " + "or install it from {releases_url}, and put it on PATH." + ) usage_ledger_unwritable: str = ( "devops-cli cannot write the usage-error ledger {path}: {reason}. " "Set telemetry.usage_ledger to false to stop the ledger." diff --git a/src/devops_cli/telemetry/semconv.py b/src/devops_cli/telemetry/semconv.py index 33d2880eb1..1280bd5e46 100644 --- a/src/devops_cli/telemetry/semconv.py +++ b/src/devops_cli/telemetry/semconv.py @@ -19,6 +19,7 @@ import yaml from devops_cli.config.constants import ( + CONST_DEVTOOLS_IMAGE, CONST_GIT_COMMIT_SHA_PATTERN, CONST_MAX_ERROR_DETAIL_LENGTH, CONST_PERM_REPO_FILE, @@ -30,7 +31,6 @@ CONST_SEMCONV_GENAI_REPO, CONST_SEMCONV_RESOLVED_REGISTRY_FILE, CONST_SEMCONV_WEAVER_BIN, - CONST_SEMCONV_WEAVER_VERSION, CONST_URL_WEAVER_RELEASES, ) from devops_cli.config.defaults import DEFAULT_SEMCONV_WEAVER_TIMEOUT_SECONDS @@ -41,6 +41,7 @@ TelemetryError, ValidationError, ) +from devops_cli.lang import MESSAGES from devops_cli.output.file_writer import write_text_file GENAI_SNAPSHOT_PATH = Path(__file__).with_name("semconv_genai.json") @@ -203,9 +204,8 @@ def refresh_genai_snapshot( if weaver is None: raise DependencyError( CONST_SEMCONV_WEAVER_BIN, - install_hint=( - f"Install weaver {CONST_SEMCONV_WEAVER_VERSION} from " - f"{CONST_URL_WEAVER_RELEASES} and put it on PATH." + install_hint=MESSAGES.telemetry.weaver_missing_hint.format( + image=CONST_DEVTOOLS_IMAGE, releases_url=CONST_URL_WEAVER_RELEASES ), ) with tempfile.TemporaryDirectory(prefix="devops-semconv-") as work_dir: From 7196bc3b40604145f6b1a0bbd637e272fe841659 Mon Sep 17 00:00:00 2001 From: Daniel Petty Date: Thu, 19 Nov 2026 20:42:13 +0000 Subject: [PATCH 4/6] docs(telemetry): name the devtools image as the source of weaver (#6423) --- docs/TELEMETRY.md | 2 +- openspec/changes/6423-drop-weaver-version-hint/tasks.md | 4 ++-- src/devops_cli/docs/generator.py | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/TELEMETRY.md b/docs/TELEMETRY.md index fa85d5e8f0..50e2b6b3cc 100644 --- a/docs/TELEMETRY.md +++ b/docs/TELEMETRY.md @@ -261,4 +261,4 @@ LLM spans follow the OpenTelemetry GenAI semantic conventions, which live in `op - **Ollama slot wait**: A call to Ollama first waits in the process for a slot on one of its nodes, queued by priority: `high` first, `as_available` last. Each call observes its wait once in `devops_cli_ai_ollama_slot_wait_seconds`, by `priority` and by `outcome`: `ok` once it holds a slot, or `timeout` when its deadline passes with no slot. A call that finds a free slot observes about 0 s, so the quantiles cover every call. - **Private keys**: Anything the conventions do not define is written under `llm.*`, such as `llm.request.priority`, `llm.tokens_per_second` and `llm.usage.cost_usd`, never under `gen_ai.*`. - **Check**: `tests/test_telemetry_semconv.py` reads every Python file under `src/devops_cli/`, comments and docstrings included. It fails on a quoted string starting with `gen_ai.` that is not a current attribute key or metric name in the snapshot, and on any f-string that builds one. -- **Refresh**: A person moves the pin with `devops telemetry semconv refresh --commit `, which needs weaver on PATH and network access, then fixes what the check reports. The gate never runs weaver. +- **Refresh**: A person moves the pin with `devops telemetry semconv refresh --commit `, which needs weaver on PATH and network access, then fixes what the check reports. The devtools image `ghcr.io/dan-petty/devtools` has weaver in `/usr/local/bin`, and Renovate keeps its version current there. The gate never runs weaver. diff --git a/openspec/changes/6423-drop-weaver-version-hint/tasks.md b/openspec/changes/6423-drop-weaver-version-hint/tasks.md index 71ef553713..abdf0974a3 100644 --- a/openspec/changes/6423-drop-weaver-version-hint/tasks.md +++ b/openspec/changes/6423-drop-weaver-version-hint/tasks.md @@ -18,9 +18,9 @@ Kind: deletion. ## 3. Documents -Kind: documents. +Kind: documents. Changes: `src/devops_cli/docs/generator.py`, `docs/TELEMETRY.md`. -- [ ] 3.1 Regenerate the reference documents for the changed message +- [x] 3.1 Name the devtools image as the source of weaver in `docs/TELEMETRY.md` (generated from `src/devops_cli/docs/generator.py`) - Verification: `$ uv run devops docs generate --check` ## Workflow follow-up diff --git a/src/devops_cli/docs/generator.py b/src/devops_cli/docs/generator.py index 3ec389b3b8..99270bd385 100644 --- a/src/devops_cli/docs/generator.py +++ b/src/devops_cli/docs/generator.py @@ -15,6 +15,7 @@ from devops_cli.config.constants import ( CONST_CONFIG_BACKUP_INFIX, CONST_CONFIG_BACKUPS_KEPT, + CONST_DEVTOOLS_IMAGE, CONST_DOC_CREDENTIAL_NAME_WORD_PAIRS, CONST_DOC_CREDENTIAL_NAME_WORDS, CONST_DOC_CREDENTIAL_NAMING_WORD, @@ -1253,7 +1254,9 @@ def _llm_span_attribute_lines() -> list[str]: "snapshot, and on any f-string that builds one.", "- **Refresh**: A person moves the pin with " "`devops telemetry semconv refresh --commit `, which needs weaver on PATH and " - "network access, then fixes what the check reports. The gate never runs weaver.", + "network access, then fixes what the check reports. The devtools image " + f"`{CONST_DEVTOOLS_IMAGE}` has weaver in `/usr/local/bin`, and Renovate keeps its " + "version current there. The gate never runs weaver.", "", ] From 3d983016de811df29d94af804d8d16dc75608c54 Mon Sep 17 00:00:00 2001 From: Daniel Petty Date: Thu, 19 Nov 2026 20:54:17 +0000 Subject: [PATCH 5/6] docs(telemetry): give the devtools comment and the semconv check path true text (#6423) --- docs/TELEMETRY.md | 2 +- src/devops_cli/config/constants.py | 3 ++- src/devops_cli/docs/generator.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/TELEMETRY.md b/docs/TELEMETRY.md index 50e2b6b3cc..9b686659a5 100644 --- a/docs/TELEMETRY.md +++ b/docs/TELEMETRY.md @@ -260,5 +260,5 @@ LLM spans follow the OpenTelemetry GenAI semantic conventions, which live in `op - **Gateway slot wait**: A chat call to the LLM gateway first waits in the process for one of the gateway's backend slots. The wait is an INTERNAL `ai.llm.gateway_slot` span under the call's `ai.llm.dispatch` or `ai.llm.stream` span, with `llm.gateway.slots` and `llm.gateway.slot_wait_seconds`, and an observation of `devops_cli_ai_gateway_slot_wait_seconds`. The call's `llm.wall_seconds`, its time to first chunk and its spend's duration start once it holds the slot, so the wait is not counted as inference. - **Ollama slot wait**: A call to Ollama first waits in the process for a slot on one of its nodes, queued by priority: `high` first, `as_available` last. Each call observes its wait once in `devops_cli_ai_ollama_slot_wait_seconds`, by `priority` and by `outcome`: `ok` once it holds a slot, or `timeout` when its deadline passes with no slot. A call that finds a free slot observes about 0 s, so the quantiles cover every call. - **Private keys**: Anything the conventions do not define is written under `llm.*`, such as `llm.request.priority`, `llm.tokens_per_second` and `llm.usage.cost_usd`, never under `gen_ai.*`. -- **Check**: `tests/test_telemetry_semconv.py` reads every Python file under `src/devops_cli/`, comments and docstrings included. It fails on a quoted string starting with `gen_ai.` that is not a current attribute key or metric name in the snapshot, and on any f-string that builds one. +- **Check**: `tests/telemetry/test_telemetry_semconv.py` reads every Python file under `src/devops_cli/`, comments and docstrings included. It fails on a quoted string starting with `gen_ai.` that is not a current attribute key or metric name in the snapshot, and on any f-string that builds one. - **Refresh**: A person moves the pin with `devops telemetry semconv refresh --commit `, which needs weaver on PATH and network access, then fixes what the check reports. The devtools image `ghcr.io/dan-petty/devtools` has weaver in `/usr/local/bin`, and Renovate keeps its version current there. The gate never runs weaver. diff --git a/src/devops_cli/config/constants.py b/src/devops_cli/config/constants.py index 444f04813c..9b45425d29 100644 --- a/src/devops_cli/config/constants.py +++ b/src/devops_cli/config/constants.py @@ -865,7 +865,8 @@ CONST_DEVCONTAINER_PUBLISHED_IMAGE = "ghcr.io/dan-petty/devops-cli/devcontainer:latest" CONST_CANONICAL_OCI_SOURCE: Final[str] = "https://github.com/dan-petty/devops-cli" # The public image of the development tools (dan-petty/devtools). Renovate keeps the version -# of each tool in its mise files, so an install hint names the image and no version. +# of weaver and of the other binary tools in its mise files, so an install hint names the image +# and no version. CONST_DEVTOOLS_IMAGE: Final[str] = "ghcr.io/dan-petty/devtools" # The Secret Service gh, git and Python keyring use; dbus-x11 satisfies gnome-keyring's # session-bus dependency without pulling in systemd. Mirrors .devcontainer/Dockerfile. diff --git a/src/devops_cli/docs/generator.py b/src/devops_cli/docs/generator.py index 99270bd385..06b779f87c 100644 --- a/src/devops_cli/docs/generator.py +++ b/src/devops_cli/docs/generator.py @@ -1248,7 +1248,7 @@ def _llm_span_attribute_lines() -> list[str]: "- **Private keys**: Anything the conventions do not define is written under `llm.*`, " "such as `llm.request.priority`, `llm.tokens_per_second` and `llm.usage.cost_usd`, " "never under `gen_ai.*`.", - "- **Check**: `tests/test_telemetry_semconv.py` reads every Python file under " + "- **Check**: `tests/telemetry/test_telemetry_semconv.py` reads every Python file under " "`src/devops_cli/`, comments and docstrings included. It fails on a quoted string " "starting with `gen_ai.` that is not a current attribute key or metric name in the " "snapshot, and on any f-string that builds one.", From be59e59defcedf0171eeca2ca018f4e9aafd4d47 Mon Sep 17 00:00:00 2001 From: Daniel Petty Date: Thu, 19 Nov 2026 20:44:40 +0000 Subject: [PATCH 6/6] docs(openspec): archive 6423-drop-weaver-version-hint --- .../.openspec.yaml | 0 .../design.md | 0 .../proposal.md | 0 .../specs/telemetry-semconv/spec.md | 0 .../tasks.md | 0 openspec/specs/telemetry-semconv/spec.md | 15 +++++++++++++++ 6 files changed, 15 insertions(+) rename openspec/changes/{6423-drop-weaver-version-hint => archive/2026-11-19-6423-drop-weaver-version-hint}/.openspec.yaml (100%) rename openspec/changes/{6423-drop-weaver-version-hint => archive/2026-11-19-6423-drop-weaver-version-hint}/design.md (100%) rename openspec/changes/{6423-drop-weaver-version-hint => archive/2026-11-19-6423-drop-weaver-version-hint}/proposal.md (100%) rename openspec/changes/{6423-drop-weaver-version-hint => archive/2026-11-19-6423-drop-weaver-version-hint}/specs/telemetry-semconv/spec.md (100%) rename openspec/changes/{6423-drop-weaver-version-hint => archive/2026-11-19-6423-drop-weaver-version-hint}/tasks.md (100%) create mode 100644 openspec/specs/telemetry-semconv/spec.md diff --git a/openspec/changes/6423-drop-weaver-version-hint/.openspec.yaml b/openspec/changes/archive/2026-11-19-6423-drop-weaver-version-hint/.openspec.yaml similarity index 100% rename from openspec/changes/6423-drop-weaver-version-hint/.openspec.yaml rename to openspec/changes/archive/2026-11-19-6423-drop-weaver-version-hint/.openspec.yaml diff --git a/openspec/changes/6423-drop-weaver-version-hint/design.md b/openspec/changes/archive/2026-11-19-6423-drop-weaver-version-hint/design.md similarity index 100% rename from openspec/changes/6423-drop-weaver-version-hint/design.md rename to openspec/changes/archive/2026-11-19-6423-drop-weaver-version-hint/design.md diff --git a/openspec/changes/6423-drop-weaver-version-hint/proposal.md b/openspec/changes/archive/2026-11-19-6423-drop-weaver-version-hint/proposal.md similarity index 100% rename from openspec/changes/6423-drop-weaver-version-hint/proposal.md rename to openspec/changes/archive/2026-11-19-6423-drop-weaver-version-hint/proposal.md diff --git a/openspec/changes/6423-drop-weaver-version-hint/specs/telemetry-semconv/spec.md b/openspec/changes/archive/2026-11-19-6423-drop-weaver-version-hint/specs/telemetry-semconv/spec.md similarity index 100% rename from openspec/changes/6423-drop-weaver-version-hint/specs/telemetry-semconv/spec.md rename to openspec/changes/archive/2026-11-19-6423-drop-weaver-version-hint/specs/telemetry-semconv/spec.md diff --git a/openspec/changes/6423-drop-weaver-version-hint/tasks.md b/openspec/changes/archive/2026-11-19-6423-drop-weaver-version-hint/tasks.md similarity index 100% rename from openspec/changes/6423-drop-weaver-version-hint/tasks.md rename to openspec/changes/archive/2026-11-19-6423-drop-weaver-version-hint/tasks.md diff --git a/openspec/specs/telemetry-semconv/spec.md b/openspec/specs/telemetry-semconv/spec.md new file mode 100644 index 0000000000..df87c79a35 --- /dev/null +++ b/openspec/specs/telemetry-semconv/spec.md @@ -0,0 +1,15 @@ +# telemetry-semconv Specification + +## Purpose +The pinned GenAI semantic conventions snapshot of devops-cli and its refresh command `devops telemetry semconv refresh`, which resolves the conventions with weaver. + +## Requirements + +### Requirement: The weaver install hint names no version +When no `weaver` is on PATH, the `DependencyError` of `devops telemetry semconv refresh` SHALL name the devtools image `ghcr.io/dan-petty/devtools` and the weaver releases page. The hint SHALL hold no weaver version number, because Renovate updates the version only in the devtools image. + +#### Scenario: Weaver is absent from PATH +- **WHEN** `devops telemetry semconv refresh --commit ` runs and no `weaver` is on PATH +- **THEN** the command exits 1 +- **AND** the message names `ghcr.io/dan-petty/devtools` and `https://github.com/open-telemetry/weaver/releases` +- **AND** the message holds no version number