Skip to content

docs(references): worktree path resolution, unpiped gates, thread pagination#91

Merged
CybotTM merged 3 commits into
mainfrom
retro/nrs-4496-worktree-paths-unpiped-gates
Jul 9, 2026
Merged

docs(references): worktree path resolution, unpiped gates, thread pagination#91
CybotTM merged 3 commits into
mainfrom
retro/nrs-4496-worktree-paths-unpiped-gates

Conversation

@CybotTM

@CybotTM CybotTM commented Jul 9, 2026

Copy link
Copy Markdown
Member

Three additions from a retro of the NRS-4496 session:

  • advanced-git — bare-repo worktree paths: git -C .bare worktree add <relative> resolves from inside .bare; two worktrees landed in the wrong place in one session (./x inside .bare/, ../<project>/x nested a level deep). Documents the ../<branch>/absolute-path rule and the plain-clone-vs-.bare mixing check.
  • pull-request-workflow — unpiped gating commands: generalizes the existing piped-push warning to every command whose rc gates the next step; real case: docker build … | tail -2 && echo OK printed OK for a failed build, and the red branch was pushed. Log-file + $? pattern.
  • pull-request-workflow — thread pagination (rescued commit): an unpushed local commit from 2026-02-01 (GraphQL reviewThreads pagination for 100+ threads, PR #575 lesson) was stranded on a stale branch; rebased onto current main and included here.

Copilot AI review requested due to automatic review settings July 9, 2026 10:37
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request adds documentation on bare-repo layouts and relative path resolution, warns about the risks of piping commands whose exit codes gate subsequent steps, and details how to handle pagination when querying many review threads via the GitHub GraphQL API. The review feedback suggests avoiding the use of grep for error words to gate workflows (recommending gating on the actual exit code instead) and corrects a minor typo ("worktree tree") in the bare-repo documentation.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread skills/git-workflow/references/pull-request-workflow.md Outdated
Comment thread skills/git-workflow/references/advanced-git.md Outdated
CybotTM added 2 commits July 9, 2026 12:40
Add guidance for handling PRs with >100 review threads (common with
automated reviewers like Copilot, Entelligence). GitHub GraphQL API
has 100-item limit per page.

Learned from PR #575 which had 127 review threads.

Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
- advanced-git: with git -C .bare, a relative worktree path resolves
  from inside .bare - ../<branch> or an absolute path; check for a
  pre-existing plain clone before nesting a .bare (two mis-placed
  worktrees in one session)
- pull-request-workflow: generalize the piped-push trap to every
  gating command - a verification docker build piped through tail
  reported the pipe's rc and a red build was pushed as 'OK'; log-file
  + $? pattern

Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
@CybotTM CybotTM force-pushed the retro/nrs-4496-worktree-paths-unpiped-gates branch from 0538858 to b622a00 Compare July 9, 2026 10:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Git workflow reference docs with guidance learned from a retro: avoiding worktree misplacement in bare-repo layouts, preventing false “success” when gating commands are piped, and documenting GraphQL pagination for large numbers of PR review threads.

Changes:

  • Adds guidance on avoiding piped “gating” commands that can mask failures due to pipeline exit-code behavior.
  • Adds a new section on handling >100 GitHub PR review threads via GraphQL pagination.
  • Documents path-resolution pitfalls when adding worktrees from a .bare repo layout.

Reviewed changes

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

File Description
skills/git-workflow/references/pull-request-workflow.md Adds guidance on unpiped gating commands and introduces a pagination section for large review-thread counts.
skills/git-workflow/references/advanced-git.md Adds a note about git -C .bare worktree add relative-path resolution in bare-repo layouts.

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

Comment thread skills/git-workflow/references/pull-request-workflow.md Outdated
Comment thread skills/git-workflow/references/pull-request-workflow.md Outdated
Comment thread skills/git-workflow/references/advanced-git.md Outdated
Comment thread skills/git-workflow/references/pull-request-workflow.md Outdated
- pipeline-status wording: last command's rc unless pipefail; trailing
  grep fails green builds even with pipefail
- gate snippet: gate on the command's own rc, log inspection non-fatal
- worktree section: replaced with pointer to the existing bare-repo
  path-resolution section plus the unique plain-clone-mixing warning
  (also removes the 'worktree tree' typo)
- pagination: one page per call, loop on endCursor - no ALL-threads
  overpromise

Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
@sonarqubecloud

sonarqubecloud Bot commented Jul 9, 2026

Copy link
Copy Markdown

@CybotTM CybotTM merged commit f91dcef into main Jul 9, 2026
17 checks passed
@CybotTM CybotTM deleted the retro/nrs-4496-worktree-paths-unpiped-gates branch July 9, 2026 11:09
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