Skip to content

Add anonymous profile tracker to identity context#8190

Open
SujanSanjula96 wants to merge 1 commit into
wso2:masterfrom
SujanSanjula96:cds-improve-unify-architecture
Open

Add anonymous profile tracker to identity context#8190
SujanSanjula96 wants to merge 1 commit into
wso2:masterfrom
SujanSanjula96:cds-improve-unify-architecture

Conversation

@SujanSanjula96

@SujanSanjula96 SujanSanjula96 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Purpose

Make the anonymous profile tracker available through the identity context during registration flows, so that downstream user operation listeners can consume it without relying on a user claim.

Changes

  • Add an anonymousProfileTracker field, builder method, and getter to the Flow model.
  • Populate the field from the flow execution context when entering the registration flow in FlowExecutionService, so the value carried across the flow steps is surfaced on the identity context flow.

@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This change adds an anonymousProfileTracker field to the Flow model class, including a constructor assignment, public getter, and a fluent builder setter. FlowExecutionService.enterFlowInIdentityContext is refactored to accept the full FlowExecutionContext instead of just the flow type string, allowing it to read the ANONYMOUS_PROFILE_TRACKER property and populate it on the Flow object created for the REGISTRATION flow type.

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant FlowExecutionService
  participant FlowExecutionContext
  participant Flow

  Caller->>FlowExecutionService: executeFlow(context)
  FlowExecutionService->>FlowExecutionService: enterFlowInIdentityContext(context)
  FlowExecutionService->>FlowExecutionContext: getFlowType()
  FlowExecutionService->>FlowExecutionContext: getProperty(ANONYMOUS_PROFILE_TRACKER)
  FlowExecutionService->>Flow: build with anonymousProfileTracker
  FlowExecutionService-->>Caller: isFlowEnteredInIdentityContext
Loading

Suggested reviewers: VivekVinushanth, ThaminduR

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description includes Purpose and Changes, but most required template sections like Goals, tests, and security are missing. Add the missing template sections, especially Goals, Approach, User stories, Release note, tests, security checks, and environment details.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly states the main change: adding anonymous profile tracker to identity context.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 37.50000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.29%. Comparing base (b8bd25b) to head (7d185d2).
⚠️ Report is 102 commits behind head on master.

Files with missing lines Patch % Lines
.../wso2/carbon/identity/core/context/model/Flow.java 0.00% 5 Missing ⚠️

❌ Your patch check has failed because the patch coverage (37.50%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #8190      +/-   ##
============================================
- Coverage     52.65%   52.29%   -0.36%     
- Complexity    21125    21316     +191     
============================================
  Files          2197     2197              
  Lines        130620   132905    +2285     
  Branches      19564    20367     +803     
============================================
+ Hits          68775    69501     +726     
- Misses        53449    54830    +1381     
- Partials       8396     8574     +178     
Flag Coverage Δ
unit 38.26% <37.50%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant