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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: close the host-control header comment and cover the open GitHub sync route (#9013)
[._.]/ Adam Eivy8b331327ed4d
diff --git a/server/lib/hostControlRoutes.js b/server/lib/hostControlRoutes.jsindex 1eb921b483..d3420a1945 100644--- a/server/lib/hostControlRoutes.js+++ b/server/lib/hostControlRoutes.js@@ -83,6 +83,7 @@* other read-only GET route. Mutable routes (`PUT` flags/secrets, `POST`* archive/unarchive, `POST` secret sync) execute `gh` with the user's GitHub* account and change external state; they require operator authority.+ */import { isPlainObject } from './objects.js';import { escapeRegExp } from './textUtils.js';diff --git a/server/routes/hostControlFamilies.test.js b/server/routes/hostControlFamilies.test.jsindex 44dce5bbc8..02be4814d9 100644--- a/server/routes/hostControlFamilies.test.js+++ b/server/routes/hostControlFamilies.test.js@@ -39,6 +39,7 @@ const github = vi.hoisted(() => ({setRepoArchived: vi.fn(),setSecret: vi.fn(),syncSecretToRepos: vi.fn(),+ syncRepos: vi.fn(),}));vi.mock('../services/github.js', () => github);@@ -135,6 +136,7 @@ describe('host-control gate on agent, loop, provider and policy writes (#8721)',github.setRepoArchived.mockResolvedValue({ archived: true });github.setSecret.mockResolvedValue({ success: true });github.syncSecretToRepos.mockResolvedValue({ synced: true });+ github.syncRepos.mockResolvedValue({ repos: [] });});it('refuses a remote password-free caller, direct or proxied, before anything runs or is written', async () => {@@ -165,8 +167,10 @@ describe('host-control gate on agent, loop, provider and policy writes (#8721)',['post', '/api/loops/loop-1/stop'],['put', '/api/settings', { location: { lat: null, lon: null } }],['put', '/api/cos/config', { avatarStyle: 'svg' }],+ ['post', '/api/github/repos/sync'],]) statuses.push((await call(remote(), write)).status);- expect(statuses).toEqual([200, 200, 200, 200]);+ expect(statuses).toEqual([200, 200, 200, 200, 200]);+ expect(github.syncRepos).toHaveBeenCalledTimes(1);expect(featureAgents.stopFeatureAgent).toHaveBeenCalledTimes(1);expect(loops.stopLoop).toHaveBeenCalledTimes(1);expect([settingsWrite, cosConfigWrite].map((write) => write.mock.calls.length)).toEqual([1, 1]);@@ -180,11 +184,13 @@ describe('host-control gate on agent, loop, provider and policy writes (#8721)',['post', '/api/loops/loop-1/trigger'],['post', '/api/voice/studio/setup'],['post', '/api/apps/example-app/launch-videos/publish'],+ ['post', '/api/github/repos/example%2Fexample/archive'],['put', '/api/settings', { codeReview: { reviewers: ['claude'] } }],['put', '/api/cos/config', { maxConcurrentAgents: 2 }],]) statuses.push((await call(local(), write, proxyClient)).status);- expect(statuses).toEqual([200, 200, 200, 200, 200, 200]);+ expect(statuses).toEqual([200, 200, 200, 200, 200, 200, 200]);}+ expect(github.setRepoArchived).toHaveBeenCalledWith('example/example', true);expect(featureAgents.activateFeatureAgent).toHaveBeenCalledTimes(2);expect(loops.triggerLoop).toHaveBeenCalledTimes(2);expect([settingsWrite, cosConfigWrite].map((write) => write.mock.calls.length)).toEqual([2, 2]);