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
refactor(gjc): enforce that the engine does not depend on the app
A closed core is only possible while the part that would close depends on
nothing it cannot take with it. The engine - the Rust core, the desktop shell,
and the worker with its SDK adapter and protocol - shares no file path with the
historical upstream, so it is the part that can move. That property held by
construction rather than by rule, and one convenient import would have ended it
without anyone noticing.
`gjc-command-surface.generated.ts` is generated from the installed runtime but
lived in server/modules/providers/, which forced the adapter to import the app
to read it. It now sits beside the engine that generates it and the app imports
it from there, which is the direction that survives a split.
eslint now classifies the engine and fails any import from it into a backend
module. The rule is last in the list because this plugin lets a later rule
re-allow what an earlier one denied: written first, the barrel allowance above
it silently reopened the door, and a mutation test importing through
modules/database/index.js passed. Its first form also used `to` as a sibling of
`disallow`, which the plugin ignores - that version rejected the engine's own
internal imports, seventeen of them, while allowing exactly what it was written
to stop.
gjc-cli.js and gjc-worker-node-runtime.ts stay outside the classified engine
rather than being exempted inside it. gjc-cli.js still reaches into the app for
providerAuthService and the notification orchestrator, and only to supply
defaults its caller can already override, so injecting that pair at the wiring
point is the whole remaining job. Listing them now would describe a boundary
that does not exist.
"The GJC engine may not import the app around it, barrel included. Move the shared piece next to the engine, or pass it through server/gjc-worker-protocol.ts.",
0 commit comments