Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
Reviewer's GuideImplementationRestrict exact and trimmed translation lookups and substring enumeration to own dictionary properties, preventing inherited values from being treated as translations while preserving explicit special-name keys.
TestsAdd regression and control tests for inherited and explicitly declared special-name keys, trimmed lookups, empty translations, and full-mode substring extraction.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Confirmed defect
Translation lookup reads inherited Object.prototype properties as dictionary entries. Missing text such as
constructor,toString, or__proto__returns a function/object instead of the original text, and the sampled debug logging can throw. In full mode, a valid JSON translation namedhasOwnPropertyshadows the method and makes substring matching throw.Change
Only the translation function and a new offline test file change. No dependencies, lockfiles, workflows, installer, credentials, or permissions change. Existing #5, #6, and #7 remain independent and untouched.
Validation
Base:
83ceac969392e7ea1948652d0b2dd6d06233ddeb.Head:
dae56749947263101955bddeb46640c208eda406.Published tree:
fe862b2d43ab39e29ecb7a9f4bd84bfb45008825, identical to the locally tested tree.Hosted CI for the published head passed, as recorded below. Existing development-dependency warnings remain unchanged; #6 tracks the independent dependency refresh. Tests use synthetic JSON/XHR and mocked RPG Maker globals, not a real game or browser acceptance test. This is dictionary lookup correctness, not a general schema validation or security audit. No live game files, user computer, merge, deployment, or release was used.
Summary by Sourcery
Restrict translation resolution to own dictionary entries while preserving existing exact, trimmed, and substring lookup behavior.
Bug Fixes:
hasOwnPropertyentry.Tests:
Summary by cubic
Fixes translation dictionary lookups so inherited
Object.prototypeentries likeconstructorortoStringare no longer returned as translations, and a translation namedhasOwnPropertyno longer breaks full-mode substring matching.Object.prototype.hasOwnProperty.callfor exact, trimmed, and full-mode lookups.Written for commit dae5674. Summary will update on new commits.
Hosted verification
CI run 42345844514 completed successfully for head
dae56749947263101955bddeb46640c208eda406. Node 18.20.8 and 20.20.2 each passed all 93 tests; Python 3.11.18 / pytest 9.2.0 passed all 27 installer tests.All three checkout logs confirm merge ref
687f54a9663e58a934f8f721d4f187f351c1200b. Its parents are the unchanged base and published head, and its tree equals the locally tested/published treefe862b2d43ab39e29ecb7a9f4bd84bfb45008825. This is verified merge-ref CI, not a bare-head checkout. Both changed remote files were read back and matched the tested files byte-for-byte.CommitCheck passed. CodeRabbit skipped the Draft, which is not a review pass; no inline review threads were present. The unchanged npm lockfile still reports 11 development-dependency findings (7 low, 1 moderate, 3 high) in hosted installation output; the independent dependency refresh remains in #6. Existing action-runtime deprecation/cache warnings did not fail the jobs. The PR remains Draft, with no merge or deployment.