-
Notifications
You must be signed in to change notification settings - Fork 961
test(doc): derive fetch test flag defaults from v2FetchFlags#1428
test(doc): derive fetch test flag defaults from v2FetchFlags #1428vegerot wants to merge 1 commit into
Conversation
Replace hardcoded flag defaults in the fetch test helpers with fetchDefault() / fetchDefaultInt() helpers that read the declared defaults from v2FetchFlags(). This prevents future drift between production flag defaults and test setup, and panics loudly if a flag name is misspelled rather than silently returning "". The tests now correctly avoid hardcoding doc-format, but other flag defaults (detail, revision-id, scope, etc.) were still duplicated here. Deriving all defaults from v2FetchFlags() keeps the whole test command definition aligned with production. Co-authored-by: TraeCli (Doubao-Seed-Dogfooding) <trae@bytedance.com>
|
No actionable comments were generated in the recent review. 🎉 i️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR refactors test infrastructure in a single file to reduce duplication of flag defaults. It introduces helper functions that extract default values dynamically from v2 flag definitions, then updates two test runtime builders to use those helpers instead of hardcoded literal values. ChangesTest Fixture Default Extraction
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates v2 docs fetch tests to derive flag defaults from the real v2FetchFlags() so tests don’t hardcode (and drift from) production defaults.
Changes:
- Replace hardcoded flag default values in test runtime setup with values pulled from
v2FetchFlags(). - Add
fetchDefault/fetchDefaultInthelpers to look up and parse defaults.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Replace hardcoded flag defaults in the fetch test helpers with
fetchDefault() / fetchDefaultInt() helpers that read the declared
defaults from v2FetchFlags(). This prevents future drift between
production flag defaults and test setup, and panics loudly if a
flag name is misspelled rather than silently returning "".
The tests now correctly avoid hardcoding doc-format, but other
flag defaults (detail, revision-id, scope, etc.) were still
duplicated here. Deriving all defaults from v2FetchFlags() keeps
the whole test command definition aligned with production.
Co-authored-by: TraeCli (Doubao-Seed-Dogfooding) trae@bytedance.com
Stack created with Sapling. Best reviewed with ReviewStack.