You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Public entrypoint re-exports document internals, letting consumers bypass the op layer #18
src/index.ts:26 re-exports src/doc.ts wholesale, exposing mset/mdel/apush, the root maps, the bookkeeping map, and the module-global mutation counter. The README states ops are the only way to change a document, but any consumer can import these and mutate nodes/stamps/applied-ids directly, bypassing the stamp/idempotency invariants and coupling consumers to the physical Yjs layout.
Direction: export only the public surface (mint/applyOps/project/migrate/types); keep the low-level map helpers module-private or behind an explicitly-internal entrypoint.
Severity context from a consumer sweep (ComfyUI_frontend, cloud, comfy-cloud-mcp-server, ComfyUI checkouts): no external consumer currently imports the raw maps (nodesMap, linksMap, mset, apush, …) from the package root — the exposure is real but unexercised today. Good time to fix before doc-host/frontend adoption hardens the surface (cloud PR #7130 moves doc-host to the npm package).
Concrete evidence the wildcard export is actively widening the surface: because src/index.ts:31-33 re-exports types.ts/stamps.ts/doc.ts wholesale, two recent commits grew the public API without touching the export statements — 6793d754 (added OPAQUE_WIDGETS_KEY, isOpaqueWidgets) and 98c3c8f (added WIDGET_STORAGE_STRATEGIES, WidgetStorage, widgetStorageFor, widgetStorageOf + op-kind aliases). Every new module-level export silently becomes API. Curated named exports would make widening a deliberate diff. (14-day invariant sweep, 2026-08-21 @ 2792319 — otherwise clean: no test weakening, no writeTarget collapse widening, KA-4/KA-12 coverage grew.)
Activity
coderabbitai commentedon Aug 20, 2026
🔗 Related PRs
Comfy-Org/ComfyUI_frontend#15092 - fix(layout): keep a node layout ref alive until its last holder releases [merged]
Comfy-Org/ComfyUI_frontend#15406 - [DO NOT MERGE] preview: Team Plan V1 workspace settings prototype (billing mock harness) [open]
Comfy-Org/workflow_templates#1157 - fix(i18n): remove the duplicated flip guard that breaks the build [merged]
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!
fix(checks): import-graph profile cruised 0 modules and reported a cl…
fix(checks): import-graph profile cruised 0 modules and reported a cl…
christian-byrne commentedon Aug 21, 2026
Severity context from a consumer sweep (ComfyUI_frontend, cloud, comfy-cloud-mcp-server, ComfyUI checkouts): no external consumer currently imports the raw maps (
nodesMap,linksMap,mset,apush, …) from the package root — the exposure is real but unexercised today. Good time to fix before doc-host/frontend adoption hardens the surface (cloud PR #7130 moves doc-host to the npm package).christian-byrne commentedon Aug 21, 2026
Concrete evidence the wildcard export is actively widening the surface: because
src/index.ts:31-33re-exportstypes.ts/stamps.ts/doc.tswholesale, two recent commits grew the public API without touching the export statements —6793d754(addedOPAQUE_WIDGETS_KEY,isOpaqueWidgets) and98c3c8f(addedWIDGET_STORAGE_STRATEGIES,WidgetStorage,widgetStorageFor,widgetStorageOf+ op-kind aliases). Every new module-level export silently becomes API. Curated named exports would make widening a deliberate diff. (14-day invariant sweep, 2026-08-21 @ 2792319 — otherwise clean: no test weakening, no writeTarget collapse widening, KA-4/KA-12 coverage grew.)test(schema §1, §11): survive #29's entrypoint change, and scope the …
fix: keep the ADR-004 follower read-surface public; hide the rest (#18)
fix: hide document internals from public entrypoint (#29)
feat: enforced read-only snapshot surface for document reads
feat: enforced read-only snapshot surface for document reads
feat: enforced read-only snapshot surface for document reads
feat: enforced read-only snapshot surface for document reads (#55)