Skip to content

Revert: Fix getCallerBaggagePairs userId fallback#140

Merged
hectorhdzg merged 2 commits into
mainfrom
revert-userid-fallback
May 13, 2026
Merged

Revert: Fix getCallerBaggagePairs userId fallback#140
hectorhdzg merged 2 commits into
mainfrom
revert-userid-fallback

Conversation

@fpfp100
Copy link
Copy Markdown
Collaborator

@fpfp100 fpfp100 commented May 13, 2026

Summary

Reverts #116.

The ingest service only accepts GUIDs for user.id. Any non-GUID value gets replaced with an all-zeros GUID (00000000-0000-0000-0000-000000000000). Allowing non-GUID values as userId (via the aadObjectId → agenticUserId → from.id fallback chain) breaks downstream scenarios that expect an AAD object ID.

Test plan

  • Verify existing tests pass
  • Confirm userId is only set from aadObjectId again

🤖 Generated with Claude Code

Note

The original PR will not take effect since UPN (non-GUID) values are always ignored by the ingestion service.

Copilot AI review requested due to automatic review settings May 13, 2026 21:28
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

Note

Copilot was unable to run its full agentic suite in this review.

Reverts the previous user.id fallback behavior so telemetry only uses aadObjectId (GUID) for user.id, aligning with ingest requirements and preventing downstream scenarios from receiving non-AAD identifiers.

Changes:

  • Update getCallerBaggagePairs to set user.id only from from.aadObjectId.
  • Remove unit tests that asserted fallback behavior to agenticUserId / from.id.
  • Remove from.id from the ActivityLike type definition.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
test/internal/unit/a365/hosting/turnContextUtils.test.ts Removes tests that validated the reverted fallback chain behavior.
src/a365/hosting/types.ts Updates activity typing by removing from.id.
src/a365/hosting/turnContextUtils.ts Enforces user.id to come only from aadObjectId.
.claude/settings.local.json Adds Claude local settings with allowed tool permissions.

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

Comment thread .claude/settings.local.json Outdated
Comment thread src/a365/hosting/types.ts
Comment thread src/a365/hosting/turnContextUtils.ts
@hectorhdzg hectorhdzg merged commit 6bd15b7 into main May 13, 2026
5 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.

6 participants