Skip to content

feat(component): Add component change detection#42

Draft
dmcilvaney wants to merge 12 commits intomicrosoft:mainfrom
dmcilvaney:damcilva/component_change_detection
Draft

feat(component): Add component change detection#42
dmcilvaney wants to merge 12 commits intomicrosoft:mainfrom
dmcilvaney:damcilva/component_change_detection

Conversation

Copilot AI review requested due to automatic review settings March 27, 2026 19:29
Copy link
Copy Markdown

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

Adds a component “identity fingerprint” mechanism to support CI change detection and build-queue determination, plus optional dist-git/synthetic-history creation during source preparation.

Changes:

  • Introduce azldev component identity and azldev component diff-identity commands and wire them into the component command tree.
  • Add a new internal/fingerprint package to compute deterministic component fingerprints from resolved config + source identity + overlays + distro context + “Affects:” commit count.
  • Extend source providers/source manager with source-identity resolution and a fetch option to preserve upstream .git for synthetic history generation (--with-git in build/prepare-sources).

Reviewed changes

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

Show a summary per file
File Description
scenario/internal/buildtest/buildtest.go Formatting-only change to BuildTest construction.
scenario/component_identity_test.go New scenario coverage for identity/diff-identity CLI behavior.
scenario/snapshots/TestMCPServerMode_1.snap.json Snapshot update reflecting new MCP tool exposure for component identity.
scenario/snapshots/TestComponentIdentitySnapshots_identity_help_stdout_1.snap New snapshot for component identity --help.
scenario/snapshots/TestComponentIdentitySnapshots_identity_help_stderr_1.snap New stderr snapshot for component identity --help.
scenario/snapshots/TestComponentIdentitySnapshots_identity_help_1.snap.json New exit-code snapshot for component identity --help.
scenario/snapshots/TestComponentIdentitySnapshots_diff-identity_help_stdout_1.snap New snapshot for component diff-identity --help.
scenario/snapshots/TestComponentIdentitySnapshots_diff-identity_help_stderr_1.snap New stderr snapshot for component diff-identity --help.
scenario/snapshots/TestComponentIdentitySnapshots_diff-identity_help_1.snap.json New exit-code snapshot for component diff-identity --help.
internal/utils/git/git_test/git_mocks.go Extend git provider mocks with LsRemoteHead.
internal/utils/git/git.go Add GitProvider.LsRemoteHead (uses git ls-remote).
internal/providers/sourceproviders/sourceproviders_test/sourcemanager_mocks.go Update mocks for new FetchComponent varargs + add ResolveSourceIdentity.
internal/providers/sourceproviders/sourcemanager.go Add source identity resolution, fetch options, and provider interface updates.
internal/providers/sourceproviders/rpmcontentsprovider.go Support new fetch option signature + add RPM-based source identity hashing.
internal/providers/sourceproviders/localidentity.go New local spec-dir hashing identity provider.
internal/providers/sourceproviders/identityprovider_test.go Unit tests for local/fedora/rpm identity providers.
internal/providers/sourceproviders/fedorasourceprovider.go Add PreserveGitDir support and implement upstream source identity.
internal/projectconfig/overlay.go Exclude overlay Description from fingerprinting via struct tag.
internal/projectconfig/fingerprint_test.go Guard test ensuring fingerprint exclusions are explicitly tracked.
internal/projectconfig/configfile.go Add ConfigFile.SourcePath() and ConfigFile.Dir() accessors.
internal/projectconfig/component.go Exclude config metadata fields from fingerprint hashing.
internal/projectconfig/build.go Exclude non-build-input fields (reasons/hints/failure policy) from fingerprint hashing.
internal/fingerprint/fingerprint_test.go Unit tests covering fingerprint behavior and excluded fields.
internal/fingerprint/fingerprint.go New fingerprint computation logic and input-combination scheme.
internal/fingerprint/doc.go Package documentation for fingerprint module.
internal/app/azldev/core/sources/synthistory_test.go Unit tests for affects-commit scanning and synthetic commit creation.
internal/app/azldev/core/sources/synthistory.go New Affects-commit detection + synthetic history generation utilities.
internal/app/azldev/core/sources/sourceprep_test.go Update mocks for new fetch options signature.
internal/app/azldev/core/sources/sourceprep.go Add WithGitRepo option, preserve .git on fetch, generate synthetic history, refactor overlay application flow.
internal/app/azldev/core/componentbuilder/componentbuilder_test.go Update mocks for new fetch options signature.
internal/app/azldev/cmds/component/preparesources.go Add --with-git flag and plumb into source preparer.
internal/app/azldev/cmds/component/identity.go New component identity command and parallel computation logic.
internal/app/azldev/cmds/component/diffsources.go Whitespace-only change.
internal/app/azldev/cmds/component/diffidentity_test.go Unit tests for identity diff computation.
internal/app/azldev/cmds/component/diffidentity.go New component diff-identity command + identity file parsing + diffing.
internal/app/azldev/cmds/component/component.go Register new identity/diff-identity subcommands.
internal/app/azldev/cmds/component/build.go Add --with-git flag and plumb into source preparer.
go.mod Add new dependencies (go-git, hashstructure).
go.sum Dependency checksum updates for new modules.
docs/user/reference/cli/azldev_component_prepare-sources.md Auto-generated CLI docs updated for --with-git.
docs/user/reference/cli/azldev_component_identity.md Auto-generated CLI docs for new component identity.
docs/user/reference/cli/azldev_component_diff-identity.md Auto-generated CLI docs for new component diff-identity.
docs/user/reference/cli/azldev_component_build.md Auto-generated CLI docs updated for --with-git.
docs/user/reference/cli/azldev_component.md Auto-generated CLI docs updated for new subcommands.
change-detection-prd.md PRD describing the change-detection design and rationale.

Copilot AI review requested due to automatic review settings March 27, 2026 21:28
Copy link
Copy Markdown

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

Copilot reviewed 46 out of 47 changed files in this pull request and generated 2 comments.

Copilot AI review requested due to automatic review settings March 30, 2026 20:20
Copy link
Copy Markdown

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

Copilot reviewed 46 out of 47 changed files in this pull request and generated 2 comments.

@dmcilvaney dmcilvaney force-pushed the damcilva/component_change_detection branch from 854ff0c to 8326413 Compare March 31, 2026 00:44
@dmcilvaney dmcilvaney requested a review from Copilot March 31, 2026 00:45
Copy link
Copy Markdown

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

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

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