fix(config): Refresh stored target metadata#14813
Closed
reneleonhardt wants to merge 1 commit into
Closed
Conversation
reneleonhardt
requested review from
Byron,
Caleb-T-Owens,
estib-vega,
jonathantanmy2 and
krlvi
as code owners
July 16, 2026 14:35
reneleonhardt
force-pushed
the
fix/target-metadata-refresh
branch
from
July 19, 2026 09:10
15b9ad8 to
8347710
Compare
Add an explicit metadata-only target refresh so agentic coding can repair stale target state without moving protected refs or workspace history. Co-Authored-By: GPT-5.6 Sol <codex@openai.com>
reneleonhardt
force-pushed
the
fix/target-metadata-refresh
branch
from
July 19, 2026 09:35
8347710 to
3ca19c3
Compare
Collaborator
|
Thanks for tackling this. However, I think it's best to close it and wait for a couple of other fixes to land that might affect it positively. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🧢 Changes
but config target --refreshto update the stored target commit from thealready configured remote-tracking ref.
but config target --push-remote <remote>working without a positionaltarget branch.
simultaneous target change.
☕️ Reasoning
Fetching can advance the configured remote-tracking ref while the project keeps
an older stored target commit. Re-selecting the same target intentionally
preserves that commit, leaving no supported metadata-only repair.
An explicit refresh provides a bounded recovery path without pulling, moving a
protected local default branch, or disturbing workspace state. This is useful
for human and agentic coding workflows that separate remote refresh from
workspace integration.
🧪 Reproduction
Before this fix, the first command could advance the configured tracking ref
while the stored target commit remained stale. Re-selecting the same target was
intentionally a no-op.
✅ Verification
refs, HEAD, workspace, index, worktree, target name, and push remote.
--no-default-features, focused diffreview, and commit-signature verification passed.
Developed with carefully directed, manually reviewed AI assistance.
Co-Authored-By: GPT-5.6 Sol codex@openai.com