Skip to content

[trace2] Record advertised push destination state - #147

Open
pc-oai wants to merge 1 commit into
codexfrom
dev/pc/trace2-push-target-state-2a37ab26
Open

pc-oai wants to merge 1 commit into
codexfrom
dev/pc/trace2-push-target-state-2a37ab26

Conversation

@pc-oai

@pc-oai pc-oai commented Oct 18, 2026

Copy link
Copy Markdown

tldr: Record advertised destination state before push negotiation so timings can distinguish absent and existing refs.

The bounded Trace2 event classifies selected branch refs as absent or existing, identifies other and mixed selections, and records whether an absent advertisement supports explicit-haves. It includes no ref names or object IDs and describes the advertisement, not the push result.

Testing

Exercised local pushes with ordinary and explicit-haves advertisements, including new refs, forced updates, up-to-date refs, and mixed selections.

What Could Go Wrong

Hidden refs can appear absent. Consumers must verify the advertisement guarantees before interpreting absence as branch creation and treat missing or ambiguous evidence as unknown.

@pc-oai
pc-oai marked this pull request as ready for review October 22, 2026 18:31
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T18:41:48.767547Z e0e9b7e Draft marked ready
🔒 Security Review ✅ Completed 2026-10-22T18:36:53.077726Z e0e9b7e Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Expose selected destination state before negotiation so tracing consumers can compare push paths without another lookup.
@pc-oai
pc-oai force-pushed the dev/pc/trace2-push-target-state-2a37ab26 branch from e0e9b7e to 8fe89f6 Compare October 22, 2026 18:39
@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

git/credential.c

Lines 228 to 229 in e0e9b7e

changed = !credential_match(&old, &new, 1) ||
!credential_match(&new, &old, 1) ||

P1 Badge Retain URL credentials across same-context redirects

When a URL containing credentials receives an absolute same-host redirect whose Location omits userinfo, these bidirectional matches treat the missing destination username/password as an identity change. credential_update_url() consequently replaces http_auth before following the redirect, so the first request to an authentication-protected destination is unauthenticated and a push or fetch fails when prompting is disabled and no helper can reproduce the URL credentials. Preserve the current credential when the redirect remains in the same credential scope and merely omits userinfo.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

This branch has not been deployed

No deployments
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.

1 participant