Skip to content

Document gh pr create workaround for restricted fetch refspecs - #89

Merged
dmccoystephenson merged 1 commit into
mainfrom
fix/gh-pr-create-restricted-fetch-refspec
Aug 1, 2026
Merged

Document gh pr create workaround for restricted fetch refspecs#89
dmccoystephenson merged 1 commit into
mainfrom
fix/gh-pr-create-restricted-fetch-refspec

Conversation

@dmccoystephenson

@dmccoystephenson dmccoystephenson commented Jul 31, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds an Edge-case entry to create-dev-loop.md documenting a workaround for a gh pr create failure seen in gardener-managed (and similarly restricted) clones: when origin's fetch refspec is limited to the default branch only, git fetch never populates a remote-tracking ref for feature branches, so gh pr create and git branch --set-upstream-to both fail their auto-detection even after a successful git push -u. The fix: pass --head <branch> explicitly.
  • This propagates the workaround to every generated <slug>-dev-loop skill going forward, since the failure mode is environmental (restricted clone), not repo-specific.

Closes #88

Deferred (this cycle)

Three other open issues were triaged and intentionally left untouched:

Research grounding

This is a mechanical process/edge-case fix (a gh CLI behavior workaround), not a change to a phase definition or the core template logic — no RESEARCH.md finding applies.

Test plan

  • python3 scripts/check_docs.py passes (placeholder/table/link consistency).
  • Confirmed no new {{placeholder}} was introduced (plain prose addition), so no Step 4 substitution-table row is needed.
  • Confirmed no fenced code block was added (no backslash-escaping needed).
  • Confirmed the new bullet's structure/tone matches sibling Edge-case entries (bold lead-in phrase + colon + description).
  • UNVERIFIED — full /create-dev-loop fixture regeneration against a reference repo (e.g. dpm-dev-loop) was not run: the harness sandbox for this session denies filesystem access outside this repo's working directory (~/local-skills is blocked), so the external validation anchor cannot run this cycle. Since this PR modifies template surface (create-dev-loop.md), full validation is required per this loop's own gating rules — flagging UNVERIFIED and not auto-merging. create-dev-loop.md is also already on the do-not-auto-merge path list (any template change deserves careful human review), so this is consistent either way. A human (or a session with unrestricted filesystem access) should run the Step 1-5 regeneration against a fixture repo and confirm the new Edge-case text renders correctly before merging.

Self-audit followup

Filed #90 during this cycle's Phase 9 self-audit: Phase 4's anchor-cannot-run guidance doesn't name session-sandbox path restriction (the case hit in this very PR's validation) as a trigger alongside "tool/interpreter absent or broken".

🤖 Generated with Claude Code


This PR description was drafted during a Gardener session (Stephenson-Software/gardener).

Gardener-managed (and similarly restricted) clones can have origin's
fetch refspec limited to the default branch only, which leaves no
remote-tracking ref for feature branches even after a successful
git push -u, causing gh pr create to fail with "you must first push
the current branch to a remote". Document the --head <branch>
workaround in Edge cases so every generated skill picks it up.

Closes #88

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dmccoystephenson

Copy link
Copy Markdown
Member Author

Self-review rubric:

  • Scope: PASS — single Edge-case bullet added, nothing else touched; directly resolves [self-audit] gardener-managed clones' restricted fetch refspec breaks gh pr create after git push -u #88's named surface area.
  • Tests-new: N/A — no new step/placeholder added, so no new manual validation step is required. check_docs.py re-run to confirm no placeholder/table drift was introduced.
  • Tests-fix (empirical): PASS-partial — the underlying gh pr create failure was already reproduced and captured verbatim in [self-audit] gardener-managed clones' restricted fetch refspec breaks gh pr create after git push -u #88's report (from a real gardener-dispatched cycle), so the defect this text documents is independently confirmed, not asserted from reasoning. Stash-and-revalidate isn't meaningful here since this is prose guidance, not template logic with an executable failure mode to toggle.
  • Sibling structure: PASS — new bullet follows the exact **<condition>:** <guidance> format used by every neighboring Edge-case entry.
  • Sibling renames: N/A — no identifiers renamed.
  • Docs: PASS — python3 scripts/check_docs.py passes; no {{placeholder}} introduced so no Step 4 table row needed; no fenced code block added so no escaping needed.
  • Issue resolution: PASS — [self-audit] gardener-managed clones' restricted fetch refspec breaks gh pr create after git push -u #88's suggested action ("Add this as a named workaround in create-dev-loop.md's Phase 4 ... or Edge cases") is implemented verbatim in Edge cases, including the --head <branch> workaround and the diagnostic command.
  • Manual validation: UNVERIFIED — this session's harness sandbox denies filesystem access outside this repo's working directory (~/local-skills is blocked), so the full /create-dev-loop fixture regeneration this loop's Phase 4 anchor calls for cannot run this cycle. Since this PR touches template surface (create-dev-loop.md), full validation is required per this loop's own gating rules but is unavailable here — flagging UNVERIFIED rather than claiming green, and not auto-merging as a result.
  • Placeholder-consistency: PASS — no placeholders added or removed.
  • Escaping: N/A — no fenced code block added.
  • Research-grounding: N/A — this is a mechanical gh CLI edge-case fix, not a change to a phase definition or core template logic; no RESEARCH.md finding applies (stated in the PR body).

Summary: small, low-risk, well-grounded addition (the failure it documents was directly observed, not hypothesized). Leaving open for human merge rather than auto-merging, both because the fixture anchor is UNVERIFIED this cycle and because create-dev-loop.md changes are on this repo's do-not-auto-merge path list regardless.

@dmccoystephenson
dmccoystephenson merged commit 535f0b9 into main Aug 1, 2026
1 check passed
@dmccoystephenson
dmccoystephenson deleted the fix/gh-pr-create-restricted-fetch-refspec branch August 3, 2026 06:01
dmccoystephenson added a commit that referenced this pull request Aug 3, 2026
Gardener-managed (and similarly restricted) clones can have origin's
fetch refspec limited to the default branch only, which leaves no
remote-tracking ref for feature branches even after a successful
git push -u, causing gh pr create to fail with "you must first push
the current branch to a remote". Document the --head <branch>
workaround in Edge cases so every generated skill picks it up.

Closes #88

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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.

[self-audit] gardener-managed clones' restricted fetch refspec breaks gh pr create after git push -u

1 participant