Skip to content

Stabilize pkg/cli include section-extraction test by removing unintended remote fetch path#27079

Merged
pelikhan merged 1 commit intomainfrom
copilot/fix-timeout-in-pkg-cli-tests
Apr 18, 2026
Merged

Stabilize pkg/cli include section-extraction test by removing unintended remote fetch path#27079
pelikhan merged 1 commit intomainfrom
copilot/fix-timeout-in-pkg-cli-tests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 18, 2026

make agent-finish was intermittently timing out due to a pkg/cli unit test path that unintentionally triggered remote include resolution and blocked on GitHub credential prompts. The timeout originated in section-extraction coverage, not section parsing logic itself.

  • Problem-focused adjustment (test input only)

    • Updated TestFetchIncludeFromSource_SectionExtraction in pkg/cli/remote_workflow_test.go to use a non-workflowspec include path for the @ref#section case.
    • This keeps the assertion focused on fragment extraction while avoiding network/auth code paths.
  • Clarity cleanup

    • Tightened the subtest comment to reflect expected resolution errors in unit-test context without implying remote fetch is required for section parsing.
// before
includePath: "owner/repo/file.md@v1.0.0#section"

// after
includePath: "shared/file.md@v1.0.0#section"

@pelikhan pelikhan marked this pull request as ready for review April 18, 2026 20:38
Copilot AI review requested due to automatic review settings April 18, 2026 20:38
@pelikhan pelikhan merged commit 491d279 into main Apr 18, 2026
52 of 53 checks passed
@pelikhan pelikhan deleted the copilot/fix-timeout-in-pkg-cli-tests branch April 18, 2026 20:38
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

Stabilizes a flaky pkg/cli unit test by avoiding an include path that could trigger real GitHub fetching / auth prompts, while keeping coverage focused on #section fragment extraction.

Changes:

  • Updated TestFetchIncludeFromSource_SectionExtraction to use a non-fetching include path for the @ref#section case.
  • Clarified the subtest comment to reflect that unit tests expect resolution errors while still validating fragment extraction.
Show a summary per file
File Description
pkg/cli/remote_workflow_test.go Adjusts section-extraction test input/comment to avoid unintended remote fetch behavior that can hang in CI.

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

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