Skip to content

docs(git-workflow): guard against basing decisions on a stale worktree#100

Merged
CybotTM merged 2 commits into
mainfrom
docs/verify-current-state-before-decisions
Jul 16, 2026
Merged

docs(git-workflow): guard against basing decisions on a stale worktree#100
CybotTM merged 2 commits into
mainfrom
docs/verify-current-state-before-decisions

Conversation

@CybotTM

@CybotTM CybotTM commented Jul 16, 2026

Copy link
Copy Markdown
Member

Adds a short "A stale worktree is a stale source" subsection to references/advanced-git.md (Worktrees).

Why: a worktree checked out days ago is whatever it was then — its composer.json, its "what's on main", its API signatures. Basing a decision on the stale checkout (and reporting the old value as fact) is a recurring failure. Real case: reporting a dependency constraint as ^0.13 from an un-fetched worktree when current main already said ^0.17 || ^0.18 || ^0.19.

What it adds:

  • Fetch origin/main (or read a fresh worktree) before deciding from repo contents.
  • Two failure modes: reporting a stale value as fact; a subagent silently reading a stale checkout (name the ref + re-verify its claims).
  • Verify a dependency's constructor/signature at the resolved version (vendor/.Build), not the library's main.

Docs-only.

Copilot AI review requested due to automatic review settings July 16, 2026 19:47
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

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

Scanned Files

None

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@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 a new section to the advanced git documentation regarding the risks of using stale worktrees. The reviewer suggested a correction to the git fetch command to ensure it is properly scoped to the repository and recommended a safer workflow for inspecting commits before pushing, providing a specific code suggestion and reference.

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/advanced-git.md Outdated
CybotTM added 2 commits July 16, 2026 22:28
Add an "A stale worktree is a stale source" subsection: before deciding from
what a repo contains (dependency constraints, whether a fix is on main, a
signature to code against), read origin/main or a fresh worktree — not the
stale checkout. Covers reporting a stale value as fact, subagents reading a
stale tree, and verifying a dependency signature at the resolved version.

Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
@CybotTM
CybotTM force-pushed the docs/verify-current-state-before-decisions branch from 870145d to 0d01232 Compare July 16, 2026 20:28
@sonarqubecloud

Copy link
Copy Markdown

@CybotTM
CybotTM merged commit fd699e0 into main Jul 16, 2026
17 checks passed
@CybotTM
CybotTM deleted the docs/verify-current-state-before-decisions branch July 16, 2026 20:29
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