Skip to content

Conversation

@kaisong1990
Copy link
Contributor

@kaisong1990 kaisong1990 commented Jan 14, 2026

Proposed changes

Design doc

This pull request introduces a new "execution flow" logging and tracing subsystem to the project, along with related unit tests and integration into the MSIDHttpRequest workflow. The changes primarily add new source and header files, update the Xcode project to include these files in the appropriate build phases and groups, and add logging hooks to the HTTP request code.

The most important changes are:

Execution Flow Subsystem Addition:

  • Added new files: MSIDExecutionFlowBlob.h/.m, MSIDExecutionFlow.h/.m, and MSIDExecutionFlowLogger.h/.m, grouped under a new execution_flow group in the Xcode project, and included them in the build phases and headers. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]

Unit Test Coverage:

  • Added new test files: MSIDExecutionFlowBlobTests.m, MSIDExecutionFlowTests.m, and MSIDExecutionFlowLoggerTests.m, and registered them in the tests group and sources build phase. [1] [2] [3] [4] [5] [6]

Integration with HTTP Request Flow:

  • Integrated MSIDExecutionFlowLogger into MSIDHttpRequest.m by importing the logger and inserting execution flow tags at key points in the sendWithBlock: method to trace request lifecycle events. [1] [2] [3]

These changes collectively introduce a new mechanism for tracing and debugging execution flow, with supporting tests and initial usage in network request handling.

Type of change

  • Feature work
  • Bug fix
  • Documentation
  • Engineering change
  • Test
  • Logging/Telemetry

Risk

  • High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
  • Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
  • Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

Additional information

AB#3407672

@kaisong1990 kaisong1990 requested a review from a team as a code owner January 14, 2026 17:25
Copy link
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

This pull request introduces a new execution flow tracing and logging subsystem to track and debug execution paths throughout the authentication library. The feature enables developers to insert timestamped tags at key execution points, which can be later retrieved as JSON for performance analysis and debugging.

Changes:

  • Added new execution flow subsystem with three core classes: MSIDExecutionFlowBlob (individual event), MSIDExecutionFlow (collection of events), and MSIDExecutionFlowLogger (singleton manager)
  • Integrated execution flow logging into HTTP request lifecycle and silent token request flows with specific tracking tags
  • Added comprehensive unit test coverage for all new classes with 2000+ lines of tests covering edge cases, concurrency, and integration scenarios

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
MSIDExecutionFlowBlob.h/.m Implements individual execution event blobs with tag, timestamp, thread ID, and custom metadata
MSIDExecutionFlow.h/.m Manages a collection of execution blobs for a single flow with thread-safe operations
MSIDExecutionFlowLogger.h/.m Singleton logger that manages multiple execution flows keyed by correlation ID
MSIDExecutionFlowBlobTests.m Unit tests for blob creation, serialization, and edge cases (595 lines)
MSIDExecutionFlowTests.m Unit tests for flow management, timestamp calculation, and capacity limits (690 lines)
MSIDExecutionFlowLoggerTests.m Unit tests for logger registration, retrieval, flushing, and concurrency (719 lines)
MSIDHttpRequest.m Integration of execution flow logging at HTTP request lifecycle checkpoints
MSIDSilentTokenRequest.m Integration of execution flow logging for token cache age tracking
project.pbxproj Xcode project configuration updates to include new source and test files

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

@kaisong1990 kaisong1990 changed the title Kasong/3403593 add execution flow Add request execution flow logger Jan 14, 2026
kaisong1990 and others added 8 commits January 14, 2026 10:09
…ger.m

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ger.m

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ger.h

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ger.h

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@kaisong1990
Copy link
Contributor Author

@copilot please double check

Copy link
Contributor

Copilot AI commented Jan 14, 2026

@kaisong1990 I've opened a new pull request, #1656, to work on those changes. Once the pull request is ready, I'll request review from you.

@kaisong1990
Copy link
Contributor Author

@copilot can you revew the code again?

Copy link
Contributor

Copilot AI commented Jan 14, 2026

@kaisong1990 I've opened a new pull request, #1657, to work on those changes. Once the pull request is ready, I'll request review from you.

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.

2 participants