Support private module definition publishing - #125
Merged
Conversation
Ravion Module Publish PlanDry run only. No Ravion API mutations were made. No publish changes are required. All versions already exist with identical config. |
| const shouldPublishDefinitionAfterVersion = | ||
| !remoteDefinition || isOrganizationScoped; | ||
| const shouldPlanGlobalPublication = isInitialPublication && definition.global; | ||
| const shouldPublishDefinitionAfterVersion = isInitialPublication && definition.global; |
There was a problem hiding this comment.
Global publication loses retry
When the first version is created but the subsequent global-visibility patch fails, the persisted version makes isInitialPublication false on rerun, so the publisher never retries the patch and leaves a definition with global: true private indefinitely.
Prompt To Fix With AI
This is a comment left during a code review.
Path: tools/ravion-modules/src/publish.ts
Line: 221
Comment:
**Global publication loses retry**
When the first version is created but the subsequent global-visibility patch fails, the persisted version makes `isInitialPublication` false on rerun, so the publisher never retries the patch and leaves a definition with `global: true` private indefinitely.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
flybayer
approved these changes
Aug 27, 2026
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.
Summary
publishedandglobaldefinition flagsWhy
PR #114 uses these flags for private EKS definitions, but its publish dry-run intentionally executes trusted tooling from
main. Landing this prerequisite first lets that check parse and safely plan those definitions.Validation
npm testintools/ravion-modules(100 passed)Greptile Summary
This PR adds trusted
publishedandglobalauthoring flags, propagates them through compilation, and excludes disabled definitions from publication and generated documentation. It also restricts global visibility changes to initial publication, but that restriction prevents recovery when the final visibility patch fails after version creation.Confidence Score: 4/5
The partial-publication recovery defect should be fixed before merging because a transient final patch failure can leave a globally requested definition permanently private.
Version creation is persisted before global visibility is patched, while subsequent runs suppress that patch solely because a remote version now exists.
Files Needing Attention: tools/ravion-modules/src/publish.ts
Important Files Changed
publishedandglobalroot flags that default to true.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart LR A[Compile authored definition] --> B{published?} B -- No --> C[Skip publication] B -- Yes --> D[Load remote definition and versions] D --> E[Create or reuse definition] E --> F[Create first version] F --> G{Initial and global?} G -- Yes --> H[Patch global visibility] H -- Failure --> I[Rerun sees existing version] I --> J[Initial becomes false] J --> K[Visibility patch is not retried]Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "support private module definition publis..." | Re-trigger Greptile