Skip to content

Codex: warn and skip clones that the token cannot access - #3974

Merged
reakaleek merged 1 commit into
mainfrom
cursor/codex-clone-warn-on-permission
Aug 31, 2026
Merged

Codex: warn and skip clones that the token cannot access#3974
reakaleek merged 1 commit into
mainfrom
cursor/codex-clone-warn-on-permission

Conversation

@reakaleek

Copy link
Copy Markdown
Member

docs-builder codex clone warns and skips a repository when the clone token cannot read it. The rest of the Codex publish job continues.

Affects: Codex builds

Why

A Codex repository can land in the link index before the clone token policy grants read access. codex clone already catches that failure and emits a warning. After docs-builder 1.42.0, git still records collector errors for the failed fetch, so the warning path does not save the job. One missing policy then stops the whole Codex publish.

What

Isolated git diagnostics

Clone git work writes errors to a local collector, not the job collector. The job still sees the existing warning and skip. Assembler clone behaviour does not change.

Failed fetch and checkout

A failed Fetch or Checkout throws after retries instead of continuing into rev-parse. The catch in CodexCloneService turns that into a warning.

Empty checkouts after a skip

DiscoverCheckouts skips a repository whose .git has no HEAD. A failed clone no longer breaks the later codex build step.

Verify

dotnet test tests/Navigation.Tests/ --filter FullyQualifiedName~CodexGitRepositoryTests
# Fetch_WhenGitFails_ThrowsWithoutLeavingTheFailureAsAnUncaughtJobError
# Checkout_WhenGitFails_ThrowsAfterRecordingTheFailureOnTheGitCollector

Out of scope: This PR does not add elastic/amer-fed-education-docs to the clone token policy. That repo still stays unpublished until the policy exists.

Made with Cursor

A missing clone token policy must not fail the whole Codex publish job.

Co-Authored-By: Cursor Grok 4.6 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@reakaleek reakaleek added the bug label Aug 31, 2026
@reakaleek
reakaleek marked this pull request as ready for review August 31, 2026 10:50
@reakaleek
reakaleek requested a review from a team as a code owner August 31, 2026 10:50
@reakaleek
reakaleek requested a review from Mpdreamz August 31, 2026 10:50
@github-actions

Copy link
Copy Markdown

Docs preview (local build)

Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/3974/

@reakaleek
reakaleek merged commit 3f27c28 into main Aug 31, 2026
27 checks passed
@reakaleek
reakaleek deleted the cursor/codex-clone-warn-on-permission branch August 31, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants