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 GuideThe installer now detects DynamicTranslation registrations regardless of JSON whitespace, preserving existing plugin entries untouched and preventing duplicate additions on repeated runs; regression tests cover compact, spaced, pretty-printed, empty-list, and nonempty-list cases. Flow diagram for idempotent plugin registrationflowchart TD
A[Read plugins.js] --> B{DynamicTranslation registration found?}
B -->|Yes| C[Preserve existing entry]
B -->|No| D[Add DynamicTranslation registration]
C --> E[Finish without duplicate]
D --> E
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Bound registration lookup and insertion to the decoded JSON array, preserve comments and existing plugin settings, reject unsupported expressions without modifying plugins.js, and propagate parse failure to the CLI. Add 18 regression cases. Local Python 3.12.14 / pytest 9.1.1: 49 passed. Pre-fix negative control: 17 failed, 32 passed. Actual installer repeated twice and resulting authored plugins.js evaluated with Node 24.22.1 successfully. Local verification commit f8d287bb37ad7fabe39cc2348c2cdeab21af7cfc has the identical Git tree c5e58d5.
This was referenced Nov 5, 2026
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.
Summary
Reproduction and provenance
Base main:
83ceac969392e7ea1948652d0b2dd6d06233ddeb.Current head:
5f9d20f8327bc0209ed7679689d3a7a0bb781c04.Previous head:
5cd013fd3bc636bdc6e2d13fcf8cdd1f9bc6e906.The previous implementation corrupts the valid fixture
var $plugins = [];\n// documentation [optional]\nby inserting at the final comment bracket. A leading comment containing{"name":"DynamicTranslation"}incorrectly suppresses registration. Nested parameter names and escaped existing names are also covered now.All 15 original source files were reconstructed from the previous exact head and matched Git blob SHA. The verified local implementation tree
c5e58d5d6d46f6fc342ce957a0920c425672e668matches the published commit tree. This updates the existing Draft rather than opening a duplicate branch or PR.Verification for the current revision
Exact-head CI 41938753929 completed successfully on 2026-11-05 at 00:06:13 UTC:
2cf9c1ad49526b8e7430df9647682d696168bb18, integrating the exact head into the unchanged base. Its tree equals the head tree above. This is merge-ref CI, not a claim that the jobs checked out the bare head.Independent assistant-cloud checks:
Boundaries and remaining risks
Research/source decision: docs/research/plugin-registration.md.
Summary by Sourcery
Prevent duplicate DynamicTranslation plugin registrations during repeated installation.
Bug Fixes:
Tests:
Summary by cubic
Prevents the installer from registering DynamicTranslation twice when run repeatedly. The old compact-only check (
"name":"DynamicTranslation") failed to match the spaced JSON the installer itself writes, so a second invocation appended a duplicate entry.Written for commit 5cd013f. Summary will update on new commits.