Skip to content

Fix build failure in integration tests: missing coolDown arg in resolveLatestRef calls#29643

Merged
pelikhan merged 2 commits intomainfrom
copilot/fix-failing-github-actions-job
May 1, 2026
Merged

Fix build failure in integration tests: missing coolDown arg in resolveLatestRef calls#29643
pelikhan merged 2 commits intomainfrom
copilot/fix-failing-github-actions-job

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 1, 2026

The "Integration: CLI Compile & Poutine" CI job was failing to build because resolveLatestRef was called with 5 arguments in update_integration_test.go, but the function signature had been updated to require a 6th coolDown time.Duration parameter.

Change

Added the missing coolDown argument (0) to all 4 affected call sites:

// Before
resolveLatestRef(context.Background(), "actions/checkout", "v4.0.0", false, true)

// After
resolveLatestRef(context.Background(), "actions/checkout", "v4.0.0", false, true, 0)

Affected lines: 105, 118, 131, 147 in pkg/cli/update_integration_test.go. Consistent with the existing pattern in update_command_test.go.

…gration test

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/02c644f2-0626-4c67-b6d1-e02159d68f59

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job Integration: CLI Compile & Poutine Fix build failure in integration tests: missing coolDown arg in resolveLatestRef calls May 1, 2026
Copilot AI requested a review from pelikhan May 1, 2026 23:42
@pelikhan pelikhan marked this pull request as ready for review May 1, 2026 23:43
Copilot AI review requested due to automatic review settings May 1, 2026 23:43
@pelikhan pelikhan merged commit d4ea69b into main May 1, 2026
19 checks passed
@pelikhan pelikhan deleted the copilot/fix-failing-github-actions-job branch May 1, 2026 23:43
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

Fixes an integration test build failure caused by resolveLatestRef call sites not being updated after the function signature gained a coolDown time.Duration parameter.

Changes:

  • Add the missing coolDown argument (0) to four resolveLatestRef calls in integration tests.
  • Align integration test call signatures with the updated resolveLatestRef definition and existing test patterns.
Show a summary per file
File Description
pkg/cli/update_integration_test.go Updates integration tests to pass the newly-required coolDown duration argument to resolveLatestRef.

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 github-actions Bot mentioned this pull request May 1, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

🧪 Test Quality Sentinel Report

Test Quality Score: 85/100

Excellent test quality

Metric Value
New/modified tests analyzed 4 (modified call sites — no new test functions added)
✅ Design tests (behavioral contracts) 4 (100%)
⚠️ Implementation tests (low value) 0 (0%)
Tests with error/edge cases 4 (100%)
Duplicate test clusters 0
Test inflation detected No
🚨 Coding-guideline violations None

Context

This PR makes a targeted build fix: four calls to resolveLatestRef in pkg/cli/update_integration_test.go were missing the newly added coolDown time.Duration argument. The fix adds 0 as the argument in all four call sites (+4/−4 lines). No new test functions were added; no test logic was changed.


Test Classification Details

View analyzed test functions (4 modified call sites)
Test File Classification Issues Detected
TestResolveLatestRef_TagIntegration pkg/cli/update_integration_test.go:103 ✅ Design Verifies tag resolves to a newer semver within the same major version
TestResolveLatestRef_TagMajorUpdateIntegration pkg/cli/update_integration_test.go:117 ✅ Design Verifies cross-major update when allowMajor=true (minor: no assertion that result is a newer major)
TestResolveLatestRef_BranchIntegration pkg/cli/update_integration_test.go:128 ✅ Design Verifies branch name resolves to a 40-char commit SHA
TestResolveLatestRef_CommitSHAIntegration pkg/cli/update_integration_test.go:141 ✅ Design Verifies old SHA resolves to a newer commit on the default branch

Structural Checks

  • Build tag: ✅ File has //go:build integration on line 1
  • Mock libraries: ✅ None (gomock, testify/mock, .EXPECT(), .On() — all absent)
  • Assertion messages: ✅ All assertions include descriptive messages
  • Error coverage: ✅ All four tests use require.NoError + behavioral assertions on output

Minor Observation (Non-Blocking)

TestResolveLatestRef_TagMajorUpdateIntegration verifies no error is returned and that the result is a valid semver tag, but does not assert that the resolved version is ≥ the starting major. This is a very minor gap; the test still validates the essential behavioral contract. Not a failure condition.


Language Support

Tests analyzed:

  • 🐹 Go (*_test.go): 4 modified call sites in integration test functions (//go:build integration)
  • 🟨 JavaScript (*.test.cjs, *.test.js): 0 tests changed

Verdict

Check passed. 0% of analyzed test changes are implementation tests (threshold: 30%). The change is a straightforward argument-list fix preserving all existing behavioral contracts. No guideline violations detected.


📖 Understanding Test Classifications

Design Tests (High Value) verify what the system does:

  • Assert on observable outputs, return values, or state changes
  • Cover error paths and boundary conditions
  • Would catch a behavioral regression if deleted
  • Remain valid even after internal refactoring

Implementation Tests (Low Value) verify how the system does it:

  • Assert on internal function calls (mocking internals)
  • Only test the happy path with typical inputs
  • Break during legitimate refactoring even when behavior is correct
  • Give false assurance: they pass even when the system is wrong

Goal: Shift toward tests that describe the system's behavioral contract — the promises it makes to its users and collaborators.

🧪 Test quality analysis by Test Quality Sentinel · ● 1.9M ·

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Quality Sentinel: 85/100. Test quality is excellent. 0% implementation tests (threshold 30%). Build fix adding missing coolDown arg to 4 integration test call sites. No violations detected.

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