Skip to content

refactor(source-control): git and process behaviour comes from forge …

MacroscopeApp / Macroscope - Effect Service Conventions completed Oct 24, 2026 in 7m 14s

Effect Service Conventions: 5 findings

  • apps/server/src/git/GitManager.ts: changeRequestTermsFor returns an Effect without a named operation span; three new operations use bare rather than Service.operation span names.
  • apps/server/src/vcs/GitVcsDriverCore.ts: readBranchBase returns an Effect without a named operation span; two ref-fetch operations use bare span names.

Inline comments contain the requested fixes.

Details

Warning

  • Invalid effort level "max" in front matter. Fell back to "low". Valid values are: low, medium, high.

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.

Reviewed all 18 changed files (no prior completed review)


πŸ” Agent activity β€” 42 tool calls

πŸ’­ Inspecting for violations I need to inspect targeted areas for violations, especially focusing on backend changes. The diff might exclude tests, but I can still inspect those tests with thorough research. I'm keeping an eye on the time budget, as it's important to manage that alongside the inspections. Overall, I want to ensure that I'm covering all essential aspects without missing anything crucial during this process.

1. browse_code β€” At PR head inspect changed GitManager.ts and GitVcsDriverCore.ts for newly introduced Effect service convention violations: reusable functions wrapping Effect.gen rather than Effect.fn, changed error handling / spans, and focused tests for new backend behavior (branch base and host ref). Provide precise paths and lines; note tests present.

πŸ’­ Inspecting research details I need to look into the relevant changes regarding hallucinations in my research. It's important to ignore any irrelevant differences and focus on the specifics that matter. I’ll inspect any changed lines carefully to ensure I’m grasping the most accurate information. This way, I can better understand the context and implications. It's a meticulous process, but I think it’ll help clarify my findings significantly. Let me dive into that!

2. browse_code β€” apps/server/src/git/GitManager.ts

3. browse_code β€” apps/server/src/vcs/GitVcsDriverCore.ts

4. browse_code β€” apps/server/src/vcs/VcsProcess.ts

πŸ’­ Evaluating bug details It seems like there's a concrete bug with shareBranchBase where it's using input.cwd instead of the worktree cwd, but the git config works fine. I should definitely check the focused tests to ensure there's proper coverage for this issue. Researching the tests might help clarify if they adequately cover this situation or not. Getting this right could improve my understanding and maybe even lead to a better solution!

5. browse_code β€” Check tests at PR head specifically for new functionality: GitLab refs/merge-requests head checkout and review guide; t3-merge-base writing and gh-merge-base compatibility and GitHub recordBranchBase; VcsProcess host classifier/concurrency. Cite test names and paths, identify changed backend behavior entirely missing focused tests. Do not report unchanged code.

πŸ’­ Verifying test searches I'm thinking about verifying tests through focused research. It’s important to make sure that the information I’m working with is accurate and relevant to the context. I want to explore various sources and approach this systematically. Maybe I could break down the tests into categories or specific areas I want to assess. It’ll help me be organized and thorough when I gather the necessary information. Let's get started on this!

6. browse_code β€” Search all repository tests for t3-merge-base, gh-merge-base, recordBranchBase, refs/merge-requests/, fetchRefIntoBranch, fetchRefCommit and report actual focused tests relevant to changed behavior, with names. Are there new tests in PR head?

7. modify_pr β€” Submitted review with 1 inline comment

8. browse_code β€” packages/source-control-github/src/server/GitHubSourceControlProvider.ts

9. browse_code β€” docs/internals/effect-services.md

10. browse_code β€” docs/internals/effect-services.md

11. browse_code β€” docs/internals/effect-services.md

12. browse_code β€” At PR head only changed lines in supplied diff: identify concrete Effect service convention violations other than shareBranchBase span name. Specifically new reusable functions arrow returning effects in GitManager, GitVcsDriverCore, VcsProcess and GitHub provider; distinguish inline callback and pure helper. Brief answer.

13. browse_code β€” Check whether newly added const changeRequestTermsFor = (cwd: string) => sourceControlProvider(cwd).pipe(...) at GitManager.ts line 667 is a reusable Effect-returning helper, and whether const sourceControlProvider = ... on line 666 was preexisting. Answer short.

πŸ’­ Evaluating function usage I’m thinking about the new reusable function effect that’s returning. The rule specifies that reusable functions should use named Effect.fn instead of arrow functions that return Effect.gen. This wording is a bit tricky because it mentions no functions wrapping Effect.gen, but the documentation implies arrow returns are also not acceptable. I see that changing RequestTermsFor is a helper for duplicated calls and I/O, so I need to flag that.

14. modify_pr β€” Submitted review with 1 inline comment β€” not performed: the agent's request was refused before it ran

15. modify_pr β€” POST repos/{owner}/{repo}/pulls/{pull_number}/comments

16. modify_pr β€” PATCH repos/{owner}/{repo}/pulls/comments/4365280188

17. browse_code β€” apps/server/src/git/GitManager.ts

18. browse_code β€” apps/server/src/git/GitManager.ts

19. browse_code β€” No need extensive; find if new keyedPermit helper in VcsProcess.ts is pure or uses imperative Semaphore.makeUnsafe, and whether naming as Effect.fn is required under convention given it returns permit higher-order callback. Short.

20. browse_code β€” apps/server/src/git/GitManager.ts

21. browse_code β€” Does new readBranchBase arrow in GitVcsDriverCore.ts line 3372 return an Effect and get reused, and is its definition changed in this PR? Short.

22. modify_pr β€” POST repos/{owner}/{repo}/pulls/{pull_number}/comments

23. browse_code β€” apps/server/src/vcs/GitVcsDriverCore.ts

24. browse_code β€” Does GitManager.ts newly added shareBranchBase named Effect.fn('shareBranchBase') diverge naming pattern or match makeGitVcsDriverCore top-level span naming? No need response beyond one sentence.

25. browse_code β€” apps/server/src/git/GitManager.ts

26. modify_pr β€” POST repos/{owner}/{repo}/pulls/{pull_number}/comments

27. browse_code β€” apps/server/src/git/GitManager.ts

28. browse_code β€” apps/server/src/vcs/GitVcsDriverCore.ts

29. browse_code β€” apps/server/src/git/GitManager.ts

30. browse_code β€” apps/server/src/vcs/VcsProcess.ts

31. browse_code β€” apps/server/src/vcs/GitVcsDriverCore.ts

32. modify_pr β€” POST repos/{owner}/{repo}/pulls/{pull_number}/comments

33. browse_code β€” apps/server/src/vcs/GitVcsDriverCore.ts

34. browse_code β€” apps/server/src/git/GitManager.ts

35. browse_code β€” docs/internals/effect-services.md

36. browse_code β€” apps/server/src/vcs/GitVcsDriverCore.ts

37. browse_code β€” Quickly verify GitManager.changeRequestTermsFor has two calls in changed diff and is reusable, not merely inline callback. one sentence.

38. browse_code β€” apps/server/src/git/GitManager.ts

39. browse_code β€” apps/server/src/git/GitManager.ts

40. browse_code β€” apps/server/src/git/GitManager.ts

41. browse_code β€” apps/server/src/vcs/GitVcsDriverCore.ts

42. browse_code β€” apps/server/src/git/GitManager.ts


Agent Credits: 168 credits

Token usage: 336 uncached input Β· 2,813,713 cache-read input Β· 355,492 cache-write input Β· 14,059 output
Agent Credits may also include non-token charges from external tools such as web research.