fix(generator): preserve gcloud 585 command coverage - #5152
Conversation
|
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)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe change improves gcloud synopsis parsing, adds version 585.0.0 help fixtures with scraper coverage, and runs three blocking concurrency-test workers on dedicated long-running tasks. ChangesCLI parsing and fixture coverage
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant TestScraper
participant GcloudCliScraper
participant CliScraperBase
participant UsageSynopsisParser
TestScraper->>GcloudCliScraper: Parse fixture help text
GcloudCliScraper->>GcloudCliScraper: Normalize wrapped ValueHint patterns
GcloudCliScraper->>CliScraperBase: Parse cleaned synopsis
CliScraperBase->>UsageSynopsisParser: Parse operands and option groups
UsageSynopsisParser-->>TestScraper: Return command and option definitions
Merge Risk: ⚪ Minimal · up to The reviewed change does not introduce an identified user-facing or operational regression and is ready to merge after normal checks. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Out of Scope Changes checkExplanation The directly linked issue is
✨ 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 sees workers leave the crowded queue Comment |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b8c088cf70
ℹ️ 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".
b8c088c to
8cc5283
Compare
ReviewReviewed the parser/generator source changes (the fixture SummaryThis is a well-scoped, well-tested fix. The core changes:
Minor, non-blocking notes
Neither point blocks merge; both are worth a quick look/acknowledgment rather than a required change. |
8cc5283 to
f8da14a
Compare
|
Addresses the two non-blocking notes in #5152 (comment):
Current remote head f8da14a includes the parent fixes and API tracking for the newly overridable ParseUsageSynopsis method. The generator solution Release build passes with zero warnings and errors. |
f8da14a to
0576d3c
Compare
ReviewReviewed the parser/generator source changes; the SummaryThis is a well-scoped, well-tested generator fix, consistent with the repo's "fix the scraper, never hand-edit generated output" constraint:
Follow-up on the prior reviewThe previous automated review on this PR (posted at commit Non-blocking observation
CI is still in progress (several checks |
ReviewIndependently reviewed the parser/generator source changes at head SummaryThis is a well-scoped, well-tested generator fix that matches the repo's "fix the scraper, not the generated output" constraint. Traced through the actual logic (not just the diff) to confirm each change:
Follow-up on prior review threadsTwo earlier automated reviews on this PR (at Non-blocking observation (unchanged from prior review, still applies)The multi-word-value-placeholder fix is implemented as gcloud-specific text pre-mutation in CI: |
0576d3c to
9026f0e
Compare
ReviewRe-reviewed at head Verified against the actual code (not just the diff)
Minor, non-blocking polish (new, small enough not to hold up an autogenerated-options PR)
On the design-scope question raised in earlier reviews The recurring non-blocking observation that the multi-word-option-value fix is gcloud-specific (regex pre-mutation in Verdict No actionable/blocking findings. The core fix (multi-word option-value grammar no longer swallowing real positional operands, plus the two narrower parser/validation corrections) is correct, well-isolated to |
9026f0e to
363bc39
Compare
|
Addresses the clarity notes in #5152 (comment). Commit 724659e adds a clear assertion before slicing fixture NAME lines and documents why both shape checks use option-local prose: inherited group descriptions can describe sibling values. All 54 SDK fixtures and scoped formatting pass. The potential shared-parser generalization and regex memoization remain future work without a demonstrated need in this scope. These changes are included in verified remote head 363bc39, rebased onto main after #5147 merged. That head also fixes the separate core test scheduling failures from the latest Ubuntu run; details and reproduction are tracked in #5154. All 361 focused generator tests and 89 related core tests pass locally. |
ReviewRe-reviewed at head New commit: concurrency-test fix (#5154)Traced the actual mechanics, not just the diff:
Follow-up items from the prior review (head
|
ReviewRe-reviewed at head New commit: extract-method refactorIsolated the commit's diff and compared it line-for-line against the prior body of
This is a behavior-preserving extract-method refactor with no logic changes. No other file is touched by this commit, and all files/commits reviewed in the prior pass (gcloud fixtures, CI at this head is still in progress (most checks pending/queued); nothing has failed so far. Verdict: No actionable/blocking findings. |
|
The generator changes implement #5146: preserve all commands rejected by the SDK 585 scrape, including structured and multiword option values and option-local shape validation. That issue is referenced in the PR description and intentionally remains open until a fresh full generation verifies command coverage after this source fix reaches main. #5154 separately tracks the core test failures exposed by this PR's CI; commit 363bc39 fixes those reproduced failures. For the docstring warning, the repository does not require XML comments on private helpers or test methods. The new private ValidateRepeatableOption helper in 8d24e48 names the validation it performs, and the caller documents the non-obvious option-local description rule. Adding boilerplate solely to meet the bot's percentage would not clarify the implementation. All 361 focused generator tests and scoped formatting pass; CodeFactor now passes as well. |
Google Cloud SDK 585.0.0 help caused the generator to drop commands when wrapped option values looked like operands, nested option-only groups looked ambiguous, or inherited group prose looked like collection syntax. This fixes those cases in the scraper/shared parser and replays all 54 affected SDK fixtures. All previously failing fixtures now retain their commands. The handwritten ParseUsageSynopsis API change is tracked.
This also fixes the three core concurrency-test failures seen in this PR's Ubuntu pipeline (issue #5154). Intentionally blocking fixture workers now use dedicated LongRunning tasks. The disposal test releases/drains work even when startup fails and verifies the transition remains in flight. Existing timeout values and secret-registration/snapshot assertions remain intact.
Validation:
#5147 and #5150 are merged. Merge this source fix before fresh gcloud generation from main. Issue #5146 stays open until that complete generation succeeds; no generated options are patched here.
Closes #5154.
Refs #5146.
Summary by CodeRabbit
New Features
Tests