Repository navigation
Effect Service Conventions: 1 issue found
apps/server/src/vcs/GitVcsDriverCore.ts — Backend behavior of statusDetails changes (working-tree line stats now come from a single git diff HEAD --numstat instead of summed diff + diff --cached), but no focused tests accompany the change. Change discipline requires focused tests for backend behavior changes.
Additional risk noted in the inline comment: git diff HEAD --numstat exits non-zero in a repository with no commits (unborn HEAD), and runGitStdout is invoked without allowNonZeroExit, so statusDetails can now fail where the previous two-command form succeeded.
No import, service-definition, dependency-acquisition, or error-modeling 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/server/src/vcs/GitVcsDriverCore.ts (changed region around lines 1470-1620) plus apps/server/src/vcs/GitVcsDriverCore.test.ts for existing statusDetails coverage.
Checks performed:
- Imports/namespaces: unchanged by this PR; no consolidated
"effect"named imports introduced. - Service definition/layout: no service moved, renamed, or re-shaped;
Context.Service,make,layerstructure untouched. - Dependency acquisition: no new
Layer.succeed,ManagedRuntime.make,runPromise, or service-instance parameters introduced;Effect.allwithconcurrency: "unbounded"remains inside the existingEffect.fnconstructor. - Errors/predicates: no error classes, discriminators, or
Schema.ispredicates changed; existingEffect.catchTagsusage retained. - Change discipline: behavior change without focused tests — reported inline on the changed
runGitStdout(... ["diff", "HEAD", "--numstat"])block.
The existing "repository status" describe block in GitVcsDriverCore.test.ts covers branch/upstream deltas but contains no assertion over per-file insertion/deletion counts, so the merged-numstat behavior is currently unpinned.
🔍 Agent activity — 1 tool call
💭 I'm looking at a diff that changes how git numstat is handled—combining unstaged and staged changes into a single
diff HEAD --numstatcall. This is a behavioral shift, but it's not related to Effect service conventions, so the linter check shouldn't flag it. Let me verify the surrounding code to make sure no convention violations were introduced. Looking at the change discipline guidelines, this PR modifies backend behavior around numstat computation without adding corresponding tests, which seems like it could be a concrete violation. The instructions are pretty clear that behavioral changes should have focused tests, though I'm wondering how strictly to apply that convention here. Let me look for existing tests around statusDetails numstat to see if there's already coverage that might need updating. This is a behavior fix addressing double-counting when files are both staged and unstaged, but no test was added. The conventions require focused tests when backend behavior changes, which is a legitimate finding here since GitVcsDriverCore is an Effect service implementation being refactored. I'm weighing whether to fail the check—it defaults to failure unless there are no findings, so I need to decide if this missing test is significant enough to warrant that outcome. The instruction is explicit: "If backend behavior changes, require focused tests." The PR modifies backend behavior in statusDetails by merging numstat, yet there are no test changes in the diff at all. That's a defensible violation. Let me check the existing tests around that area to see if there's already a numstat-related test I could reference. I need to flag that the PR is missing a focused test for the behavior change—specifically, a case where a file is both staged and modified in the working tree, since the new approach usinggit diff HEADwill handle this differently than before. There's also a potential regression to watch for sincegit diff HEAD --numstatwon't capture untracked files. SorunGitStdoutwithoutallowNonZeroExitthrows aGitCommandErrorwhen there's no commit history, which meansgit diff HEAD --numstatfails in an unborn HEAD state. This breaksstatusDetailsentirely, whereas the previous implementation handled bothdiff --numstatanddiff --cached --numstatgracefully. That's a regression I need to flag under the requirement for focused tests when backend behavior changes. I'll add an inline review.
1. modify_pr — Effect service conventions review: one finding — a backend behavior change in GitVcsDriverCore.statusDetails lands without focused test coverage.
Agent Credits: 42 credits