Repository navigation
Effect Service Conventions: 1 issue found
apps/desktop/src/electron/ElectronShell.ts β the invariant comment documenting why remote vscode://vscode-remote/ssh-remote+β¦ deep links must reach the OS handler while every other non-web scheme stays blocked was removed while the protocol allowlist was restructured. Change discipline requires preserving useful comments, invariants, and specification documentation across a restructure; an inline suggestion restoring the comment above SAFE_WEB_PROTOCOLS has been posted.
No other convention violations were found in the changed scope.
Details
Note
Your check run agent prompt is: .macroscope/check-run-agents/effect-service-conventions.md
More information about how Check Run Agents work can be found in our Help Center.
Files examined (in scope):
apps/desktop/src/electron/ElectronShell.tsapps/desktop/src/electron/ElectronShell.test.ts
Checks that passed:
- Imports:
effect/Context,effect/Effect,effect/Layer,effect/Optionare namespace subpath imports; the whole-package named import from@t3tools/contracts(REMOTE_CAPABLE_EDITOR_IDS,remoteSchemeForEditor) is explicitly permitted; the test imports the service module as a namespace (import * as ElectronShell from "./ElectronShell.ts") and usesElectronShell.ElectronShell/ElectronShell.layer. - Service definition: canonical single-file order (imports, pure helpers,
Context.Servicetag with inline interface,make,layer) is unchanged; no standalone shape type;layer = Layer.succeed(ElectronShell, make)is appropriate for this synchronous Electron adapter and was not modified by the PR. - Dependency acquisition and runtime boundaries: no service-instance parameters,
ManagedRuntime.make,runPromise, orrunPromiseExitintroduced;parseSafeExternalUrlandisRemoteEditorUrlremain pure functions. - Errors and predicates: no error types or predicates added or altered.
- Change discipline: the behavior change (tightening the deep-link allowlist) is accompanied by focused tests for both the allowed remote-SSH URL and the rejected non-remote editor URL, which is required rather than excessive.
History reviewed: 064749d (restriction plus tests) and 87e7b7c (drops the explicit : boolean return annotation on isRemoteEditorUrl, inferred identically).
π Agent activity β 1 tool call
π I should check the file's contents first. I'm weighing whether removing that comment about remote deep-links reaching the OS handler counts as losing important invariant documentation, even though the underlying behavior restriction is now captured in the code itself. Checking the rest of the service definition, the Layer.succeed wrapping Electron APIs is pre-existing and outside the changed scope, and the imports and pure URL-parsing function look fine. So the comment removal seems like the only real candidate finding, though I need to weigh it against the rule that I should only report concrete violations introduced in the changed scope rather than defaulting to failure. Let me look at the two commits in this PR to understand what changed. The key finding is that the invariant comment got removed, which violates the discipline of preserving useful comments and specification documentation when moving code β a real regression in the changed scope. I should also check whether other consumers of parseSafeExternalUrl, like similar allowlist logic on the web side, might behave differently across editors such as cursor, though that's more of a behavioral concern than a convention violation. I'll flag the comment removal as an inline comment, likely attached near line 9 where SAFE_WEB_PROTOCOLS is defined, suggesting the comment be restored. As for severity, this feels like a minor discipline issue rather than a hard failure β the check defaults to failure unless things are clean, but removing a documented security invariant during a refactor, while real, seems more like a flag-worthy note than grounds for outright failure.
1. modify_pr β Reviewed the touched Effect service module and its test for the service conventions. The Context.Service tag, inline interface, make, and layer ordering, the effect/* subpath namespace imports, and the named @t3tools/contracts import are all fine, and the behavior change is covered by focused tests. One change-discipline issue: the security invariant comment was dropped during the restructure.
Agent Credits: 36 credits