Codex: prefer environment-matching docset over public docs/ - #3772
Open
reakaleek wants to merge 2 commits into
Open
Codex: prefer environment-matching docset over public docs/#3772reakaleek wants to merge 2 commits into
reakaleek wants to merge 2 commits into
Conversation
Codex discovery always resolved docs/docset.yml first, so a repository that publishes both public docs and an internal Codex docset could not be onboarded: live publish always picked the public docset. Discovery now prefers the docset whose registry matches the Codex environment, falling back to the historical search order when none match. The build step reuses that discovered docset instead of rediscovering one from the repository root, so it can no longer land on a different docset than clone did. Fixes #3767 Co-authored-by: Cursor <cursoragent@cursor.com>
Mpdreamz
approved these changes
Aug 5, 2026
Mpdreamz
left a comment
Member
There was a problem hiding this comment.
LGTM, should we also hard error or warn if codex picks up a docset with no registry defined?
…gistry Addresses review feedback on #3772: silently falling back to the historical search order gave no signal that a repository has not opted in to a codex environment via registry. Warn (not hard-error, to avoid breaking currently-onboarded repos) so misconfiguration is visible without failing existing builds. Co-authored-by: Cursor <cursoragent@cursor.com>
Member
Author
|
Member
Author
|
@copilot in this PR it's only warning.. But we should create a follow-up to error in the future. create an issue for it in elastic/docs-builder. |
Contributor
|
@reakaleek I've opened a new pull request, #3778, to work on those changes. Once the pull request is ready, I'll request review from you. |
Contributor
|
Epic! Thanks for moving so fast on this, @reakaleek !! |
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.
What
docset.ymlwhoseregistrymatches the codex environment, instead of always resolvingdocs/docset.ymlfirst.Why
docs/) and internal Codex docs could not be onboarded to Elastic Internal Docs: discovery always landed on the public docset, so live publish would ship the wrong content.registry: internaldocset over a repo's publicdocs/#3767Notes
registryvs. the codexenvironmentstring (not a hardcodedinternalcheck), per the discussion on the issue, so it also works for other codex environments..git/node_modulesto keep it cheap on large repos.Made with Cursor