Repository navigation
Conversation
gersona
commented
Nov 20, 2026
- fixes Component Discovery: set the category #14441
There was a problem hiding this comment.
All reported issues were addressed across 9 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 258 files (changes from recent commits).
Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.
Re-trigger cubic
ecc28c0 to
75ff6e1
Compare
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 75ff6e17dd
ℹ️ 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".
| identifier_cache.clear() | ||
| identifier_cache.update(identifier_snapshot) | ||
| self._category_chain_cache = chain_snapshot |
There was a problem hiding this comment.
Remove created category directories when a match rolls back
When a match creates a new multi-level category path and then fails component validation, for example because a translation file cannot be parsed, the transaction rolls back the category rows but not the directories created by Category.save() through PathMixin.create_path(). The orphaned parent directory contains its child directories, so subsequent matches and retries fail Category.validate_create_path() with “Repository path for this category already exists and is not empty,” even after the invalid file is fixed. Track and clean up directories introduced by the failed match, or defer their creation, alongside restoring these caches.
Useful? React with 👍 / 👎.
| project=project, | ||
| category=parent, | ||
| ) | ||
| category.full_clean() |
There was a problem hiding this comment.
Validate inherited category licenses using their effective values
With LICENSE_REQUIRED=True at startup, each missing category reaches this call with the model default license="". Category.license has blank=False under that setting, and Category lacks the inheritance-aware clean_fields() override used by Component, so full_clean() rejects the empty stored override even when the parent supplies a valid inherited license. Consequently, discovery skips every match that needs a missing category on these installations. Exclude inherited overrides from field validation or validate their effective values.
Useful? React with 👍 / 👎.
| level_slugs, level_names = identifier_cache[parent_id] | ||
| level_slugs.add(category.slug.lower()) | ||
| level_names.add(category.name.lower()) |
There was a problem hiding this comment.
Check queued component reservations before creating categories
With asynchronous discovery, a layout containing guides/install.md and guides/install/intro.md can queue the install component before processing the nested file. If the worker has not inserted that component yet, category validation sees no database conflict and creates the install category despite that slug already being reserved in identifier_cache. The queued component subsequently fails create_component()'s uniqueness validation against the new category and is never created in that run. Account for queued component reservations before saving categories, rather than only adding category identifiers to the cache afterward.
Useful? React with 👍 / 👎.