Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

guard that git.js still exports the helpers the resume path calls

[._.]/ Adam Eivy8461acb0295b
diff --git a/server/services/git.test.js b/server/services/git.test.js
index eb092d6ef0..7953b05da7 100644
--- a/server/services/git.test.js
+++ b/server/services/git.test.js
@@ -276,3 +276,20 @@ describe('extractAgentSummary', () => {
});
});
+
+// Every suite that exercises the resume path mocks `./git.js` wholesale, so a
+// helper that was renamed or never exported stays invisible there and only fails
+// at runtime (an ollama review pass flagged exactly this shape as a suspected bug).
+// This asserts the real module against the real caller — the one place a mocked
+// suite structurally cannot check.
+describe('git.js exports the helpers the agent resume path calls', () => {
+ it('exposes every function agentWorktreeCleanup.resolveResumePointer uses', async () => {
+ const git = await vi.importActual('./git.js');
+ for (const name of [
+ 'getBranch', 'getStatusPorcelain', 'getBranchComparison',
+ 'isBranchMergedInto', 'getWorktreeBranches', 'getDefaultBranch'
+ ]) {
+ expect(typeof git[name], `git.${name} must be exported`).toBe('function');
+ }
+ });
+});