fix(generator): preserve gcloud group dispatch coverage - #5167
Conversation
Codex Review SummaryThis 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe parser now supports caller-defined placeholder names. ChangesGcloud dispatch placeholder handling
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant GcloudDispatchTests
participant DispatchExecutor
participant GcloudCliScraper
participant UsageSynopsisParser
GcloudDispatchTests->>GcloudCliScraper: Scrape captured gcloud help
GcloudCliScraper->>DispatchExecutor: Request command help
DispatchExecutor-->>GcloudCliScraper: Return captured or synthesized help
GcloudCliScraper->>UsageSynopsisParser: Filter configured dispatch placeholders
UsageSynopsisParser-->>GcloudCliScraper: Return filtered synopsis arguments
GcloudCliScraper-->>GcloudDispatchTests: Return command definitions
Merge Risk: ⚪ Minimal · up to The gcloud scraper preserves documented positional operands while removing dispatch selectors, including captured groups without child listings. No actionable merge risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit reads each line, Comment |
|
The docstring-coverage warning in comment 5692661463 covers named regression tests and internal/private parser helpers. The tests follow the surrounding TUnit documentation convention; comments record the captured-help provenance, synthetic ancestor behavior, and why gcloud handles empty dispatch groups before child discovery. No public library API was added, and the source build has no documentation warnings. |
ReviewThis closes the gcloud group-dispatch gap cleanly: I initially flagged the new Two minor, non-blocking observations if you want to tighten this further:
Neither point blocks this PR; the added tests give good confidence in the primary fix. |
|
Addressed the repeated argument-tree traversal from #5167 (comment) in de5c0ff, confirmed on the remote PR head. The scraper now materializes declared arguments once. All 852 focused parser, traversal, AWS, and gcloud tests still pass; scoped formatting passes. On the undocumented operand observation: SDK 585.0.0 contains two real dispatch pages with no listed children, so child discovery cannot gate removal for gcloud. Explicitly documented positional GROUP/COMMAND operands take precedence and remain required, covered by regression tests. Other unrepresented operands still hit the existing guard. This follows the captured SDK grammar; a future inconsistent help page would need its own captured regression. @codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
ReviewRe-reviewed at head Previous comment follow-up: the repeated No new architectural concerns or correctness issues found. This looks ready to merge from a design/quality standpoint. |
|
Head de5c0ff now passes all 17 checks. Codex, CodeRabbit, and Claude re-reviews are clear; there are no unresolved review threads. The repository merge gate passes. Merge remains queued behind the active AWS generation in run 35058181945. Merging this source change earlier would invalidate that run's generator fingerprint. After healthy AWS output merges, this PR can merge and gcloud-only regeneration can run from the resulting main. |
Problem and fix
Gcloud generation from main failed coverage after all leaf-command parser fixes had landed: SDK 585.0.0 produced 7,594 commands versus the 7,927-command baseline, with 21 additions and 354 removed dispatch paths. The shared traversal did not recognize
GROUPselectors, and its child-discovery condition also missed two command groups that currently expose no children.Let the shared synopsis normalizer accept an adapter-specific set of dispatch names. Gcloud removes undocumented
GROUPandCOMMANDselectors before argument parsing, while preserving explicitly documented positional arguments with those names. Other adapters retain their existing placeholder policy. Coverage guards and operand validation stay unchanged.The regression corpus contains all 355 requested help pages from the failed coverage diagnostics, including the root page and two empty command groups captured locally using the same SDK. Tests verify each non-root dispatch page, traversal of the captured tree, and preservation of real positional operands.
Validation
Generation and merge order
Fixes the source portion of #5166. Related generation issue: #5146; runtime PRs: #4863, #4869, #4956.
Failure evidence: https://github.com/thomhurst/ModularPipelines/actions/runs/35058181945/job/104672916300. Captured diagnostics artifact: 10432345934.
AWS generation in that run is still active. Hold this source PR's merge until its healthy AWS replacement is reviewed, green, and merged, so the generator fingerprint stays valid. Then regenerate gcloud from the latest main and verify coverage before updating the runtime PRs and closing #5166. No generated files are patched here.
Summary by CodeRabbit
Bug Fixes
GROUPandCOMMANDarguments and their required status.Tests