From b3f46dde9fd86ba5c5057e3679c2066f78f725a0 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Mon, 3 Aug 2026 13:50:52 +0100 Subject: [PATCH] chore: drop duplicate /api/explain route; correct ROADMAP HOMFLY bound MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two small accuracy fixes found while auditing DB-6 (#34). 1. `/api/explain` was registered TWICE in `route()` (serve.jl:1017 and :1019, byte-identical lines). The second is unreachable — the first returns — so this is dead code, not a behaviour change. A merge artifact from #89 landing alongside the earlier explain route. 2. ROADMAP.adoc claimed HOMFLY-PT is "bounded to ≤12 crossings", but `HOMFLY_MAX_CROSSINGS = 15`. The ≤12 figure was the OLD Alexander bound, which since #85 (post-Bareiss, KnotTheory#46/#48) is 128 — so the roadmap was quoting a number that is now wrong for both polynomials. Corrected to 15 and annotated with why HOMFLY keeps a tight bound when Alexander no longer needs one: the Kauffman-bracket skein recursion is genuinely exponential, whereas Bareiss elimination is O(n^3). Verified: `grep -c 'path == "/api/explain"'` → 1; `Meta.parseall` on serve.jl parses clean. Co-Authored-By: Claude Opus 5 --- ROADMAP.adoc | 3 ++- server/serve.jl | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ROADMAP.adoc b/ROADMAP.adoc index 98dc55b..c2f4a83 100644 --- a/ROADMAP.adoc +++ b/ROADMAP.adoc @@ -33,7 +33,8 @@ == v0.3.0 - Extended Invariants * [x] Alexander polynomial display (`format_alexander`: sparse coeff map → t^n notation) -* [x] HOMFLY-PT polynomial (on-demand via KnotTheory.jl, bounded to ≤12 crossings) +* [x] HOMFLY-PT polynomial (on-demand via KnotTheory.jl, bounded to ≤15 crossings — + `HOMFLY_MAX_CROSSINGS`; the Kauffman-bracket skein recursion is genuinely 2^n) * [x] Knot signature (surfaced from Skein.jl schema to API and frontend) * [x] Knot determinant (surfaced to frontend; filterable in KRL and SQL) diff --git a/server/serve.jl b/server/serve.jl index 8a8a37b..99a67fd 100644 --- a/server/serve.jl +++ b/server/serve.jl @@ -1016,8 +1016,6 @@ function router(db::SkeinDB, sdb::SemanticIndexDB, static_dir::String, path == "/api/explain" && return handle_explain(db, sdb, params) - path == "/api/explain" && return handle_explain(db, sdb, params) - m_knot = match(r"^/api/knots/(.+)$", path) !isnothing(m_knot) && return handle_knot_detail(db, sdb, String(m_knot.captures[1]))