Skip to content

Prevent LFS hook failures during safe-output bundle creation - #56499

Merged
pelikhan merged 1 commit into
mainfrom
copilot/fix-safe-outputs-git-handling
Aug 28, 2026
Merged

Prevent LFS hook failures during safe-output bundle creation#56499
pelikhan merged 1 commit into
mainfrom
copilot/fix-safe-outputs-git-handling

Conversation

Copilot AI commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Filtered safe-output bundle generation could fail when repositories configure Git LFS or other repository hooks unavailable in the safe-output environment.

  • Hook isolation: Apply the temporary core.hooksPath override to git bundle create, matching the existing worktree and git am operations.
  • Result: Internal bundle synthesis no longer executes repository hooks.
execGitSync([
  ...noHooksArgs,
  "bundle",
  "create",
  bundlePath,
  `${baseCommitSha}..HEAD`,
], { cwd: tempWorktree });

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Fix safe outputs git handling of LFS sections Prevent LFS hook failures during safe-output bundle creation Aug 28, 2026
Copilot AI requested a review from pelikhan August 28, 2026 03:44
@pelikhan
pelikhan marked this pull request as ready for review August 28, 2026 03:51
Copilot AI balanced review requested due to automatic review settings August 28, 2026 03:51
@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

⚠️ Security scanning failed for Ponytail Reviewer. Review the logs for details.

Lean already. Ship.

Warning

Firewall blocked 4 domains

The following domains were blocked by the firewall during workflow execution:

  • ab.chatgpt.com
  • api.github.com
  • chatgpt.com
  • github.com

[!TIP]
api.github.com is blocked because GitHub API access uses the built-in GitHub tools by default. Instead of adding api.github.com to network.allowed, use tools.github.mode: gh-proxy for direct pre-authenticated GitHub CLI access without requiring network access to api.github.com:

tools:
  github:
    mode: gh-proxy

See GitHub Tools for more information on gh-proxy mode.

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "ab.chatgpt.com"
    - "api.github.com"
    - "chatgpt.com"
    - "github.com"

See Network Configuration for more information.

Generated by Ponytail Reviewer for #56499

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel completed test quality analysis.

No test files were added or modified in this PR. Test Quality Sentinel skipped.

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

PR Code Quality Reviewer completed the code quality review.

Reviewed PR #56499: no actionable issues found in the one-line hook-isolation change, so no review comments or blocking review were needed.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.

No ADR enforcement needed: PR does not have the implementation label and has ≤100 new lines of code in business logic directories.

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

reviewed_at: 2026-08-28T00:00:00Z
review_event: COMMENT
top_themes:
  - no actionable findings
  - hook isolation change is consistent with surrounding logic
files_reviewed:
  - actions/setup/js/generate_git_bundle.cjs
comment_count: 0

Note

This comment is managed by comment memory.

It stores persistent context for this thread in the code block at the top of this comment.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔎 Code quality review by PR Code Quality Reviewer · pi · gpt54 · 3.24 AIC · ⌖ 7.29 AIC · ⊞ 7K ·
Comment /review to run again

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Prevents repository hooks from affecting filtered safe-output bundle creation.

Changes:

  • Applies the temporary core.hooksPath override to git bundle create.
Show a summary per file
File Description
actions/setup/js/generate_git_bundle.cjs Isolates bundle creation from repository hooks.

Review details

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

execGitSync([...noHooksArgs, "worktree", "add", "--detach", tempWorktree, baseCommitSha], { cwd });
execGitSync([...noHooksArgs, "am", "--3way", patchResult.patchPath], { cwd: tempWorktree });
execGitSync(["bundle", "create", bundlePath, `${baseCommitSha}..HEAD`], { cwd: tempWorktree });
execGitSync([...noHooksArgs, "bundle", "create", bundlePath, `${baseCommitSha}..HEAD`], { cwd: tempWorktree });

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Skills-Based Review 🧠

Applied /diagnosing-bugs — this is a clean, minimal bug fix.

The single-line change correctly extends the noHooksArgs guard to bundle create, matching the existing pattern already applied to worktree add and git am on the preceding lines. Root cause is properly addressed, not just the symptom.

📋 Assessment
  • ✅ Fix is consistent with the established noHooksArgs pattern in this function
  • ✅ All three git operations in the try block (worktree add, am, bundle create) now share the same hook isolation
  • i️ No regression test added — acceptable here since this is a CJS GitHub Actions helper with no visible test harness in the diff

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet46 · 13 AIC · ⌖ 10.3 AIC · ⊞ 7.6K
Comment /matt to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The fix looks correct. git bundle create was the only git call in this block missing ...noHooksArgs, which could cause LFS (or other) hooks to fire and fail during bundle creation. Adding the spread is consistent with the surrounding worktree add and am calls and closes the gap cleanly.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · copilot · sonnet46 · 15.7 AIC · ⌖ 10.5 AIC · ⊞ 6.2K

@pelikhan
pelikhan merged commit ab8ab60 into main Aug 28, 2026
68 of 76 checks passed
@pelikhan
pelikhan deleted the copilot/fix-safe-outputs-git-handling branch August 28, 2026 10:30
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.87.9

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