Skip to content

fix(tests): a branch name with a secret word fails a span test #3638

Open

Description

@dan-petty

Problem

tests/ai/rag/test_rag_qdrant_span.py::test_upsert_span_names_the_server_by_host_and_port fails on a topic branch whose name holds one of the words secret, token or user.

The test checks that the span of qdrant.upsert_points leaks no part of the configured URL. It looks for those words in every value of the span attributes. The tracer adds the attributes vcs.ref.name and vcs.branch to each span. They hold the name of the git branch. So the check reads the branch name as if it were a leak.

Reproduction

  1. Create a checkout on a branch named fix/2613-prose-after-a-token-colon.
  2. Run uv run devops ci test tests/ai/rag/test_rag_qdrant_span.py.
  3. Six cases fail with assert not ['fix/2613-prose-after-a-token-colon', 'fix/2613-prose-after-a-token-colon'].

On a detached head, the six cases pass. The full gate uv run devops ci fails in the same way on such a branch.

Expected

The test passes on every branch name. It checks the attributes that name the server, and it ignores the attributes of the version control source.

Evidence

src/devops_cli/telemetry/tracer.py function _detect_vcs_metadata reads the branch from the git head file of the checkout, and _read_git_head_ref returns it. A branch name that follows <type>/<issue>-<slug> can hold any word, so the check fails for a branch about a token, a secret or a user.

Activity

  1. added
    type/bugDefect, regression, or incorrect runtime behavior
    scope/testsThe test suite, its fixtures, fakes and floor
    status/newStatus New: the item is not ready yet
    effort/lowEffort Low: little work
    on Nov 5, 2026
  2. dan-petty commented on Nov 5, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: scope/tests. The (tests) scope of the title gives the scope.
    • Priority: P2-Medium. It blocks CI on branches whose names contain certain words but does not affect production.
    • Value: Medium. It unblocks CI for developers on affected branch names but only for a subset of branches.
    • Effort: Low. The fix filters VCS attributes from the span attribute check in one test.
    • Related: fix(rag): the Qdrant upsert span names its server by host and port, never by the full URL with its userinfo #2459, which asks for a different change. Both concern the qdrant.upsert_points span; #2459 fixes the span to use host:port, the candidate fixes the test that verifies it to ignore VCS attributes.
  3. added
    priority/p2-mediumStandard priority feature work and architectural improvements
    on Nov 5, 2026
  4. dan-petty commented on Nov 5, 2026

    @dan-petty
    OwnerAuthor

    The same failure showed again on 2026-11-05 for the branch fix/2662-mask-url-user-name-without-password (pull request #3676), at origin/main f6d57ecd. Six cases of test_upsert_span_names_the_server_by_host_and_port fail with the branch name in vcs.ref.name and vcs.branch, because the name holds the word user. They pass on a detached head. The full local uv run devops ci fails on such a branch, so a branch that is about a user name, a token or a secret cannot pass the gate on a local checkout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowEffort Low: little workpriority/p2-mediumStandard priority feature work and architectural improvementsscope/testsThe test suite, its fixtures, fakes and floorsource/agentFiled by an agentstatus/newStatus New: the item is not ready yettype/bugDefect, regression, or incorrect runtime behaviorvalue/mediumValue Medium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions