Skip to content

Fix integration-tag test build by making initTestGitRepo helper available to all test variants#34841

Merged
pelikhan merged 1 commit into
mainfrom
copilot/fix-tests-from-run-26428475609
May 26, 2026
Merged

Fix integration-tag test build by making initTestGitRepo helper available to all test variants#34841
pelikhan merged 1 commit into
mainfrom
copilot/fix-tests-from-run-26428475609

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 26, 2026

CI’s unauthenticated integration test job failed at compile time because multiple pkg/cli tests reference initTestGitRepo, but that helper was excluded under -tags integration. This change removes the exclusion so the shared test helper is compiled for both unit and integration-tagged test runs.

  • Root cause

    • pkg/cli/test_helpers_git_test.go had //go:build !integration, which dropped initTestGitRepo from integration builds.
    • Integration-tagged test compilation then failed with undefined: initTestGitRepo across several pkg/cli test files.
  • Change

    • Removed the !integration build constraint from pkg/cli/test_helpers_git_test.go.
    • Kept helper implementation unchanged; only compilation scope changed.
  • Impact

    • initTestGitRepo is now available to all pkg/cli test targets that rely on it, including integration-tagged runs.
// Before
//go:build !integration

package cli

// After
package cli

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot fix more runs with the same fix

@pelikhan pelikhan marked this pull request as ready for review May 26, 2026 02:35
Copilot AI review requested due to automatic review settings May 26, 2026 02:35
@pelikhan pelikhan merged commit 34e5154 into main May 26, 2026
@pelikhan pelikhan deleted the copilot/fix-tests-from-run-26428475609 branch May 26, 2026 02:36
Copilot stopped work on behalf of pelikhan due to an error May 26, 2026 02:36
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

Removes an incorrect !integration build constraint so the shared initTestGitRepo test helper in pkg/cli is available during both unit and -tags integration test builds, fixing integration-tag compile failures due to undefined: initTestGitRepo.

Changes:

  • Removed //go:build !integration from pkg/cli/test_helpers_git_test.go to include the helper in integration-tagged test compilation.
Show a summary per file
File Description
pkg/cli/test_helpers_git_test.go Makes initTestGitRepo compile in integration-tagged test runs by removing the !integration build constraint.

Copilot's findings

Tip

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

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

github-actions Bot added a commit that referenced this pull request May 26, 2026
- Updated mapping audit (Section 7.2) to 2026-05-26 review cycle
- Evaluated three security items from PR #34841 (commit 34e5154):
  1. heredoc_validation.go — already mapped under CTR-006; no change
  2. MCP actor validation (--validate-actor) — runtime RBAC, not compiler detection
  3. Cross-repo allowlist (SEC-005) — CTR-005/CTR-012 boundary; no new CTR rule
- Bumped spec version 1.0.11 → 1.0.12
- Added 1.0.12 change log entry
- Updated Section 2 sync table with 1.0.12 row

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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