betterwithage Claude Opus 4.7 commited on
Commit
63fe823
·
verified ·
1 Parent(s): bb20236

deploy(hf): sync szl-holdings/killinchu@main derived COPY set

Browse files

Reusable Dockerfile-COPY-derived deploy from szl-holdings/killinchu main.
Files: 875 Pruned: 0
Derived from Dockerfile COPY sources (NO hand-maintained allowlist).

Signed-off-by: SZL Holdings <noreply@szlholdings.ai>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Files changed (2) hide show
  1. serve.py +13 -0
  2. static/index.html +51 -1
serve.py CHANGED
@@ -2633,6 +2633,19 @@ async def spa_map() -> FileResponse:
2633
  """SPA history fallback — serves index.html for /map."""
2634
  return FileResponse(INDEX_HTML, media_type="text/html")
2635
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2636
  # ============================================================================
2637
  # END: SPA HISTORY FALLBACK explicit routes
2638
  # ============================================================================
 
2633
  """SPA history fallback — serves index.html for /map."""
2634
  return FileResponse(INDEX_HTML, media_type="text/html")
2635
 
2636
+
2637
+ @app.get("/killinchu")
2638
+ async def spa_killinchu() -> FileResponse:
2639
+ """Explicit route for /killinchu — the exact URL a-11-oy.com links to for this
2640
+ vertical. The built SPA router has NO /killinchu route, so React rendered a
2641
+ "404 · No such route" view into #root directly beneath the always-present live
2642
+ counter-UAS command deck. index.html now carries a try/guarded deck-route guard
2643
+ that hides that empty 404 shell whenever the SPA genuinely 404s and the live
2644
+ deck is present, so /killinchu serves the deck as a complete, honest page.
2645
+ Additive; no existing route shadowed; falls back to INDEX_HTML like the other
2646
+ SPA paths. Signed-off-by: Stephen P. Lutar Jr. <stephenlutar2@gmail.com>"""
2647
+ return FileResponse(INDEX_HTML, media_type="text/html")
2648
+
2649
  # ============================================================================
2650
  # END: SPA HISTORY FALLBACK explicit routes
2651
  # ============================================================================
static/index.html CHANGED
@@ -174,10 +174,12 @@
174
 
175
  <div class="kcd-links">
176
  <a class="primary" href="/uds.html">Open UDS Command Center</a>
177
- <a href="#root">Aerial twin (3D)</a>
178
  <a href="/api/killinchu/v1/honest">Honest disclosure</a>
179
  <a href="/operator">Operator shell v4</a>
180
  <a href="/flow-compartments" title="Flow compartments — engineering method (CFD), not a locked theorem">Flow Compartments (CFD)</a>
 
 
181
  </div>
182
  </div>
183
 
@@ -281,5 +283,53 @@
281
 
282
 
283
  <div id="root"></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
284
  </body>
285
  </html>
 
174
 
175
  <div class="kcd-links">
176
  <a class="primary" href="/uds.html">Open UDS Command Center</a>
177
+ <a href="/drone-3d.html">Aerial twin (3D)</a>
178
  <a href="/api/killinchu/v1/honest">Honest disclosure</a>
179
  <a href="/operator">Operator shell v4</a>
180
  <a href="/flow-compartments" title="Flow compartments — engineering method (CFD), not a locked theorem">Flow Compartments (CFD)</a>
181
+ <a href="https://a-11-oy.com/" rel="noopener" title="killinchu is one vertical of the a11oy governed-inference platform">a11oy platform ↗</a>
182
+ <a href="https://a-11-oy.com/verify" rel="noopener" title="Re-verify a signed a11oy receipt yourself, offline, in your browser">Verify a receipt ↗</a>
183
  </div>
184
  </div>
185
 
 
283
 
284
 
285
  <div id="root"></div>
286
+
287
+ <!-- SZL KILLINCHU DECK-ROUTE GUARD (ADDITIVE) — Sign: Stephen P. Lutar Jr. + Perplexity Computer Agent
288
+ WHY: static/index.html carries the always-present, self-contained, LIVE counter-UAS
289
+ command deck (#szl-cmd-deck) AND the React SPA root (#root). The built SPA router only
290
+ knows a fixed set of paths (/counter-uas, /drones, /map, /swarm, …). For paths it does
291
+ NOT know — notably /killinchu itself, the exact URL a-11-oy.com links to — React renders a
292
+ "404 · No such route" view INTO #root, so a visitor to /killinchu saw a fully live command
293
+ deck with a red "No such route" 404 stacked directly beneath it. Contradictory and
294
+ embarrassing on the flagship defense surface.
295
+ FIX (no bandaid, honest): the live command deck IS the intended page for these deck-only
296
+ entry paths. When — and ONLY when — the SPA has rendered its own "No such route" 404 into
297
+ #root AND the live deck is present, we hide the empty 404 shell so the deck stands alone as
298
+ a complete, honest page. Real SPA routes (which render actual content, never the 404 text)
299
+ are untouched. Nothing is faked: the deck's numbers stay wired to /api/killinchu/v1/*, and
300
+ if a route genuinely has no content the deck's own honest states still show. Pure DOM read;
301
+ no route is added, shadowed, or claimed. Fully try/guarded so it can never break the app. -->
302
+ <script>
303
+ (function(){
304
+ try{
305
+ function rootShows404(){
306
+ var r = document.getElementById("root");
307
+ if(!r) return false;
308
+ var t = (r.textContent || "").trim();
309
+ // The built SPA's NotFound view renders exactly: "404 No such route. Return to overview."
310
+ // We match ONLY that error text, so a real route (which renders actual content) is
311
+ // never touched — the guard reacts to the genuine 404, not to any particular path.
312
+ return /No such route/i.test(t);
313
+ }
314
+ function deckPresent(){ return !!document.getElementById("szl-cmd-deck"); }
315
+ function reconcile(){
316
+ try{
317
+ var r = document.getElementById("root");
318
+ if(!r) return;
319
+ if(deckPresent() && rootShows404()){
320
+ // The SPA has no route for this path; the live command deck IS the page. Hide the
321
+ // empty 404 shell rather than stack a "No such route" error under a live deck.
322
+ r.setAttribute("hidden", "");
323
+ r.style.display = "none";
324
+ }
325
+ }catch(_e){}
326
+ }
327
+ // Run after React has had a chance to mount + render its route (incl. its 404).
328
+ function schedule(){ setTimeout(reconcile, 60); setTimeout(reconcile, 400); setTimeout(reconcile, 1200); }
329
+ if(document.readyState !== "loading") schedule();
330
+ else document.addEventListener("DOMContentLoaded", schedule);
331
+ }catch(_e){ /* additive: never break the app */ }
332
+ })();
333
+ </script>
334
  </body>
335
  </html>