remove faker help metadata adapter#229
Conversation
|
Warning Review limit reached
More reviews will be available in 24 minutes and 35 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughRemoves the 2571-line auto-generated ChangesFaker Help Metadata Refactor
Sequence Diagram(s)sequenceDiagram
participant Caller
participant getFakerCommandHelp
participant getFakerHelperKeywordHelp
participant buildFakerHelperHelpMetadata
participant getDomainKeywordHelpByAlias
participant mapDomainKeywordHelpToFakerCommandHelp
Caller->>getFakerCommandHelp: commandValue
alt helpers.* command
getFakerCommandHelp->>getFakerHelperKeywordHelp: commandValue
getFakerHelperKeywordHelp->>buildFakerHelperHelpMetadata: definitions
buildFakerHelperHelpMetadata-->>getFakerHelperKeywordHelp: helpers.* map
getFakerHelperKeywordHelp-->>getFakerCommandHelp: normalized helper help
getFakerCommandHelp-->>Caller: helper help object
else domain-backed command
getFakerCommandHelp->>getDomainKeywordHelpByAlias: commandValue
getDomainKeywordHelpByAlias-->>getFakerCommandHelp: normalized domain help
getFakerCommandHelp->>mapDomainKeywordHelpToFakerCommandHelp: domain help
mapDomainKeywordHelpToFakerCommandHelp-->>getFakerCommandHelp: mapped command help
getFakerCommandHelp-->>Caller: mapped command help
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 58e75b2c79
ℹ️ 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".
Greptile Summary
Confidence Score: 0/5No concrete merge-safety assessment was provided with the review context. No confidence value was provided to carry through.
What T-Rex did
|
There was a problem hiding this comment.
Pull request overview
This PR removes the generated faker-command help metadata layer and routes faker help lookups through (1) the domain keyword help source-of-truth for domain-backed faker commands and (2) a curated helper-only definitions map for helpers.* commands.
Changes:
- Replace usage of the removed
faker-command-help-metadataadapter withgetFakerCommandHelpfrom@anywaydata/core/faker/faker-helper-keyword-definitions.js(and domain keyword help where appropriate). - Delete the previously generated faker help metadata file and its generator script.
- Update core/core-ui tests to validate the new help/metadata behavior (domain-backed vs helper-only).
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/generate-schema-interaction-matrix.mjs | Switch faker help import to the new core helper/domain-backed help provider. |
| scripts/generate-faker-help.js | Removed generator script for the deleted generated faker help metadata file. |
| packages/core/src/tests/data_generation/unit/domain/domainKeywords.test.js | Updates tests to validate help is sourced from domain keywords + helper definitions. |
| packages/core/js/faker/faker-helper-keyword-definitions.js | Centralizes helper-only faker help metadata and adds a getFakerCommandHelp fallback to domain keyword help. |
| packages/core/js/faker/faker-commands.js | Sources helpers.* command registration from the helper definitions map. |
| packages/core/js/faker/faker-command-help-metadata.js | Removes the large generated faker help metadata blob. |
| packages/core/js/domain/domain-keywords.js | Adds normalized domain keyword help accessor (getDomainKeywordHelpByAlias). |
| packages/core-ui/src/tests/utils/faker-command-help-metadata.test.js | Updates UI-side tests to reflect helper-only direct metadata + domain-backed fallback behavior. |
| packages/core-ui/src/tests/interaction/support/generated-value-quality.js | Switch faker help import to the new core help provider. |
| packages/core-ui/src/tests/interaction/matrix/support/schema-interaction-scenario-builder.js | Switch faker help import to the new core help provider. |
| packages/core-ui/src/tests/interaction/matrix/support/generator-interaction-harness.js | Switch faker help import to the new core help provider. |
| packages/core-ui/src/tests/interaction/matrix/schema-interaction-scenario-builder.test.js | Switch faker help import to the new core help provider. |
| packages/core-ui/js/gui_components/shared/test-data/help/help-model-builder.js | Switch faker help lookup to the new core help provider. |
| packages/core-ui/js/gui_components/shared/faker-command-help-metadata.js | Removes the core-ui re-export adapter for the deleted generated metadata module. |
| packages/core-ui/js/gui_components/shared/domain-command-help-metadata.js | Uses core domain keyword help as the backing source for domain command help. |
Comments suppressed due to low confidence (1)
scripts/generate-faker-help.js:1
- This script is deleted, but the root package.json still defines a "generate:faker-help" script that runs
node ./scripts/generate-faker-help.js. As-is,pnpm run generate:faker-helpwill fail because the entrypoint no longer exists. Either remove/update that package.json script, or replace this file with a stub that explains the new workflow.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/core/js/faker/faker-helper-keyword-definitions.js`:
- Line 188: The example value on line 188 uses a realistic card-number pattern
that triggers security scanning. Replace the current example string
'6453-2433-5050-4456-3526' with a clearly synthetic placeholder that does not
resemble an actual card number format. Use an obviously fake pattern to avoid
recurring static analysis alerts while maintaining the purpose of showing the
format structure.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: cb6b7d46-ee51-4d77-acf6-1c9cc5e19089
📒 Files selected for processing (15)
packages/core-ui/js/gui_components/shared/domain-command-help-metadata.jspackages/core-ui/js/gui_components/shared/faker-command-help-metadata.jspackages/core-ui/js/gui_components/shared/test-data/help/help-model-builder.jspackages/core-ui/src/tests/interaction/matrix/schema-interaction-scenario-builder.test.jspackages/core-ui/src/tests/interaction/matrix/support/generator-interaction-harness.jspackages/core-ui/src/tests/interaction/matrix/support/schema-interaction-scenario-builder.jspackages/core-ui/src/tests/interaction/support/generated-value-quality.jspackages/core-ui/src/tests/utils/faker-command-help-metadata.test.jspackages/core/js/domain/domain-keywords.jspackages/core/js/faker/faker-command-help-metadata.jspackages/core/js/faker/faker-commands.jspackages/core/js/faker/faker-helper-keyword-definitions.jspackages/core/src/tests/data_generation/unit/domain/domainKeywords.test.jsscripts/generate-faker-help.jsscripts/generate-schema-interaction-matrix.mjs
💤 Files with no reviewable changes (3)
- packages/core-ui/js/gui_components/shared/faker-command-help-metadata.js
- packages/core/js/faker/faker-command-help-metadata.js
- scripts/generate-faker-help.js
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/core-ui/src/tests/interaction/matrix/support/schema-interaction-scenario-builder.js (1)
753-753: ⚡ Quick winConsider reusing the shared
hasPermissiveAllowedTypehelper.The same permissive-type check is abstracted into
hasPermissiveAllowedTypeingenerated-value-quality.js(lines 94–96). Importing that helper would eliminate duplication and centralize the definition.♻️ Proposed refactor
Add the import at the top of the file:
+import { hasPermissiveAllowedType } from '../../support/generated-value-quality.js';Then update the condition:
const allowedTypes = getAllowedTypesForScenarioRow(row); - if (allowedTypes.includes('string') || allowedTypes.includes('unknown')) { + if (hasPermissiveAllowedType(allowedTypes)) { return true; }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/core-ui/src/tests/interaction/matrix/support/schema-interaction-scenario-builder.js` at line 753, Replace the duplicated condition check allowedTypes.includes('string') || allowedTypes.includes('unknown') with a call to the existing hasPermissiveAllowedType helper function. First, add an import statement for hasPermissiveAllowedType from the module where it is already defined. Then, update the if statement at the specified location to invoke hasPermissiveAllowedType(allowedTypes) instead of the inline condition check, eliminating code duplication and centralizing the permissive type logic in a single location.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@packages/core-ui/src/tests/interaction/matrix/support/schema-interaction-scenario-builder.js`:
- Line 753: Replace the duplicated condition check
allowedTypes.includes('string') || allowedTypes.includes('unknown') with a call
to the existing hasPermissiveAllowedType helper function. First, add an import
statement for hasPermissiveAllowedType from the module where it is already
defined. Then, update the if statement at the specified location to invoke
hasPermissiveAllowedType(allowedTypes) instead of the inline condition check,
eliminating code duplication and centralizing the permissive type logic in a
single location.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: beb589d2-48d1-4272-99ef-c1e9c24a74de
📒 Files selected for processing (8)
apps/web/src/stories/shared-schema-definition.stories.jspackage.jsonpackages/core-ui/js/gui_components/shared/domain-command-help-metadata.jspackages/core-ui/js/gui_components/shared/test-data/help/help-model-builder.jspackages/core-ui/src/tests/interaction/matrix/support/schema-interaction-scenario-builder.jspackages/core-ui/src/tests/interaction/support/generated-value-quality.jspackages/core/js/faker/faker-helper-keyword-definitions.jsscripts/generate-schema-interaction-matrix.mjs
💤 Files with no reviewable changes (1)
- package.json
🚧 Files skipped from review as they are similar to previous changes (2)
- packages/core-ui/js/gui_components/shared/domain-command-help-metadata.js
- packages/core/js/faker/faker-helper-keyword-definitions.js
|
closes #228 |
Summary by CodeRabbit
unknownas an acceptable allowed type when verifying row compatibility.