Skip to content

fix(session): keep finding identity fields separate - #1955

Merged
lizhengfeng101 merged 1 commit into
alibaba:mainfrom
Afloat16:fix/session-finding-key-fields
Nov 17, 2026
Merged

lizhengfeng101 merged 1 commit into
alibaba:mainfrom
Afloat16:fix/session-finding-key-fields

Conversation

@Afloat16

Copy link
Copy Markdown
Contributor

Description

Session comparison joins the normalized path, category, and snippet with | to identify findings. When a path or snippet contains that character, two different findings can produce the same key. The comparison then incorrectly reports a persisting finding instead of one new and one resolved finding.

Use a comparable struct for the three identity fields so field boundaries cannot collide. The regression exercises a path containing | against a different finding whose snippet contains the same delimiter sequence.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

How Has This Been Tested?

  • Verified that the new regression fails with the original implementation and passes with this change.
  • make check — passed.
  • make test — passed for the complete package list, including the race detector.
  • make coverage — passed, 91.7% overall (90% required).
  • make build — passed.

Validation used Go 1.26.11 on Linux amd64. The inherited telemetry sampler was explicitly set to always_on for the test suite.

The required ocr review --audience agent --background "..." command was attempted, but could not start because no LLM endpoint is configured in the environment.

Checklist

  • The change follows the project's coding style.
  • Regression coverage proves the fix.
  • New and existing unit tests pass locally.
  • I have signed the CLA.

AI/LLM disclosure: OpenAI ChatGPT (GPT-6 Astra Pro).

@CLAassistant

CLAassistant commented Nov 17, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

Copy link
Copy Markdown
Contributor

✅ OpenCodeReview: Review complete: 0 finding(s) across 1 selected item(s).

@lizhengfeng101 lizhengfeng101 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@lizhengfeng101
lizhengfeng101 merged commit d30f938 into alibaba:main Nov 17, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants