refactor(core): own edit protocol contract#2167
Conversation
0263661 to
742c449
Compare
21bf4f1 to
3e37058
Compare
ccdacbf to
a97ef8e
Compare
8674f33 to
9149838
Compare
a97ef8e to
8657d4e
Compare
7367bc9 to
a0e9003
Compare
8657d4e to
4ea5e9c
Compare
a0e9003 to
ec35495
Compare
4ea5e9c to
4465a5a
Compare
ec35495 to
a7cb697
Compare
4465a5a to
8fd2307
Compare
a7cb697 to
ec27019
Compare
8fd2307 to
3ef06c2
Compare
ec27019 to
f2e9e31
Compare
3ef06c2 to
53d9022
Compare
f2e9e31 to
a691499
Compare
53d9022 to
184f662
Compare
a691499 to
f25e511
Compare
184f662 to
c2c8a93
Compare
f25e511 to
9aa0b74
Compare
d609bdf to
4122ba6
Compare
52688c3 to
58e16a2
Compare
4122ba6 to
a2237c5
Compare
37f5dda to
e1e8f5b
Compare
miguel-heygen
left a comment
There was a problem hiding this comment.
Independent exact-head review at 562544f68de4f769cdb1faac633b7c8341dbd0fb.
The ownership move is structurally sound: packages/core/src/editing/draftMarkers.ts:1 is dependency-free and preserves the five wire values byte-for-byte; both legacy subpaths remain compatibility forwarders (packages/core/src/studio-api/helpers/draftMarkers.ts:1, packages/studio-server/src/helpers/draftMarkers.ts:1), while browser consumers now import the Core-owned contract directly.
I also audited the new package-cycle gate end to end. scripts/check-package-cycles.mjs:34 builds runtime workspace edges only, the Tarjan walk reports full strongly connected components, and the exception is exact-component scoped rather than suppressing arbitrary cycles. The focused suite passes 3/3 locally, the live workspace check reports only the one documented compatibility SCC, and all exact-head required CI—including eight regression shards, Windows, global install, CodeQL, and Graphite—is green.
No blocking or important findings.
Verdict: APPROVE
Reasoning: The contract now lives at the browser-safe ownership boundary without breaking either compatibility export, and the new cycle guard fails closed for every non-exempt runtime SCC with focused coverage and green exact-head CI.
— Magi

What
Move edit-protocol constants into a browser-safe core contract and enforce package-cycle boundaries.
Why
Core runtime imported a deprecated studio-server forwarding seam, sustaining an architectural cycle.
How
Make core own the draft/edit marker contract, let studio-server re-export compatibility names, migrate internal consumers, and gate new runtime cycles.
Test plan