Break the pipeline manuscriptReview <-> manuscriptFix static import cycle - #6086
Merged
Conversation
#5918) Move the review-comment store (schema, sanitizers, persistence, accessors) into pipeline/manuscriptComments.js. manuscriptReview.js keeps seed orchestration and re-exports the store API; manuscriptFix.js reads comments through the leaf. Drops the #5918 baseline entry from the import-cycle ratchet.
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
Breaks the
pipeline/manuscriptReview.js<->pipeline/manuscriptFix.jsstatic ESM import cycle by extracting the review-comment store into a leaf module:server/services/pipeline/manuscriptComments.jsowns the store: schema/sanitizers (sanitizeCommentet al.), file persistence (readReview/writeReview, per-series write tail), and accessors (getReview,getComment,updateComment,mergeReviewFromSync,locateComment).manuscriptReview.jskeeps only seed orchestration (seedReviewFromFindings,findingKey,REVIEW_RUN_MODES) and re-exports the store API, so all existing importers (routes,seriesReview,editorialScore,readerPanel, sync receive paths) keep working unchanged.manuscriptFix.jsnow reads comments through the leaf (./manuscriptComments.js) instead of the review module. Remaining edge is one-directional: review -> fix (shapers) and review/fix -> comments.manuscriptFixUndo.test.jsmock retargeted to the leaf; noawait import()deferral used.KNOWN_CYCLIC_COMPONENTSinserver/services/serviceImportCycles.test.js.Closes #5918
Test plan
serviceImportCycles.test.js— ratchet passes with the Break the pipeline manuscriptReview <-> manuscriptFix static import cycle #5918 entry removed and reports no new cycle (both directions asserted).manuscriptReview.test.js,manuscriptFixUndo.test.js— pass (52 tests across the three files).manuscriptFix.test.js,seriesReview.run.test.js,readerPanel.test.js,editorialScore.test.js,routes/pipeline/manuscript.locate.test.js— pass (84 tests).routes/peerSync.test.js,routes/pipeline.test.js— pass (234 tests, coversmergeReviewFromSyncconsumers via re-export).mtplxreviewer was inconclusive (request aborted, non-blocking).