From f5b38a870fcb06324807c9d8f41ce72cd853f46e Mon Sep 17 00:00:00 2001 From: MrPickering Date: Tue, 25 Aug 2026 16:53:43 -0700 Subject: [PATCH] Declare the default port as a const the port checker can see The 4174 allocation in ops-index/engines.json was reported as DRIFT because a destructuring default is invisible to check-ports' deliberately narrow matchers. Behavior unchanged. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01VBQ1D1iapVwHLc3Gzbi7xY Session-Id: 5ff81103-ff56-4481-a0d8-dae58e784c41 Agent: claude-code --- src/server.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/server.js b/src/server.js index 6fd7d5b..085f8ea 100644 --- a/src/server.js +++ b/src/server.js @@ -235,7 +235,11 @@ function collectBody(request, limit = 256 * 1024) { }); } -export function createEnviewServer({ roots, port = 4174, token, maxDepth = 4 }) { +// Allocated in ops-index/engines.json; a destructuring default is invisible to the port +// checker's matchers, so the allocation is declared as a const it can see. +const DEFAULT_PORT = 4174; + +export function createEnviewServer({ roots, port = DEFAULT_PORT, token, maxDepth = 4 }) { const authToken = token || randomBytes(24).toString('hex'); // Only files discovered by a scan may be touched. A path arriving in a request is checked // against this set rather than sanitised — an allowlist cannot be escaped by clever encoding.