Skip to content

Break the pipeline manuscriptReview <-> manuscriptFix static import cycle - #6086

Merged
atomantic merged 1 commit into
mainfrom
claim/issue-5918
Sep 3, 2026
Merged

Break the pipeline manuscriptReview <-> manuscriptFix static import cycle#6086
atomantic merged 1 commit into
mainfrom
claim/issue-5918

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

Breaks the pipeline/manuscriptReview.js <-> pipeline/manuscriptFix.js static ESM import cycle by extracting the review-comment store into a leaf module:

  • New server/services/pipeline/manuscriptComments.js owns the store: schema/sanitizers (sanitizeComment et al.), file persistence (readReview/writeReview, per-series write tail), and accessors (getReview, getComment, updateComment, mergeReviewFromSync, locateComment).
  • manuscriptReview.js keeps 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.js now 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.js mock retargeted to the leaf; no await import() deferral used.
  • Deletes this component's entry from KNOWN_CYCLIC_COMPONENTS in server/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, covers mergeReviewFromSync consumers via re-export).
  • Local mtplx reviewer was inconclusive (request aborted, non-blocking).

#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.
@atomantic
atomantic merged commit e4d25ba into main Sep 3, 2026
7 checks passed
@atomantic
atomantic deleted the claim/issue-5918 branch September 3, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Break the pipeline manuscriptReview <-> manuscriptFix static import cycle

1 participant