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

Drop duplicate host-control tool routes and an unused lock-code list

[._.]/ Adam Eivy453c3b50ec7d
diff --git a/server/lib/fileCore.js b/server/lib/fileCore.js
index 962d8b8199..46419f5b65 100644
--- a/server/lib/fileCore.js
+++ b/server/lib/fileCore.js
@@ -39,8 +39,6 @@ const WIN_RETRY_DELAY_MS = 10;
// rename(2) failures that mean "the destination is momentarily locked", not
// "this rename can never work".
const WIN_RENAME_LOCK_CODES = ['EPERM', 'EACCES', 'EEXIST', 'EBUSY'];
-// read failures with the same transient meaning on the reader side.
-const _WIN_READ_LOCK_CODES = ['EPERM', 'EACCES', 'EBUSY'];
const FILE_WATCH_FALLBACK_POLL_MS = 5000;
/** Normalize Node statfs block counts into byte totals and compatibility aliases. */
diff --git a/server/lib/hostControlRoutes.js b/server/lib/hostControlRoutes.js
index 98bdaf9ace..6d2a5a0a2d 100644
--- a/server/lib/hostControlRoutes.js
+++ b/server/lib/hostControlRoutes.js
@@ -453,9 +453,6 @@ export const HOST_CONTROL_ROUTES = Object.freeze([
'POST /api/digital-twin/import/spotify/browser/import',
'POST /api/digital-twin/twin-evidence/interpret',
- 'POST /api/tools',
- 'PUT /api/tools/:id',
-
// Git in a caller-named directory. Every POST is gated, reads included: git
// runs repository-configured programs (hooks, fsmonitor) even for `status`.
'POST /api/git/*rest',
diff --git a/server/lib/hostControlRoutes.test.js b/server/lib/hostControlRoutes.test.js
index 38c5200714..3f26b8ce05 100644
--- a/server/lib/hostControlRoutes.test.js
+++ b/server/lib/hostControlRoutes.test.js
@@ -130,6 +130,11 @@ describe('HOST_CONTROL_ROUTES (#8716)', () => {
expect(HOST_CONTROL_ROUTES.filter((route) => !reached.has(route))).toEqual([]);
});
+ it('lists each gated route once, so a duplicate cannot hide a block meant to add something else (#12024)', () => {
+ const duplicates = HOST_CONTROL_ROUTES.filter((route, index) => HOST_CONTROL_ROUTES.indexOf(route) !== index);
+ expect(duplicates).toEqual([]);
+ });
+
it('covers Express spellings conservatively while preserving route boundaries', () => {
expect(isHostControlRoute('post', '/API/Apps/example-app/START/')).toBe(true);
expect(hostControlRouteFor('post', '/API/HTML-COMPOSITION/TOOLKIT/SKILLS/INSTALL/')).toBe('POST /api/html-composition/toolkit/skills/install');