* fix(security): remove hardcoded secrets, patch command injection, tighten CORS and Cypher guard
- run_import_workflow.py, run_multi_import.py: replace hardcoded budget
password with BUDGET_PASSWORD env-var (fail-fast if unset)
- server.js /ingest: replace shell-interpolated exec() with execFile()
so user-controlled title/body cannot inject shell commands
- authentik-values.yaml: blank out bootstrap_password and bootstrap_token
so they must be supplied at deploy time via --set or sealed-secret
- cluster-dashboard main.py: restrict CORS from allow_origins=["*"] to
env-configurable whitelist (default: dashboard.researchstack.info),
methods to GET, headers to Authorization+Content-Type
- neo4j_obsidian_connector_router.js (both copies): replace permissive
prefix-only readOnly regex with a deny-list that blocks
CREATE/MERGE/DELETE/DETACH/SET/REMOVE/DROP anywhere in the query, and
route readOnly queries through session.readTransaction()
Co-Authored-By: Allaun Silverfox <bigdataiscoming+9i37y6j2@protonmail.com>
* fix(security): add CALL procedure allowlist for Cypher readOnly, add OPTIONS to CORS
- Cypher guard: restore positive allowlist for CALL targets (only db.* and
apoc.meta.* allowed in readOnly mode). Extract cypherReadOnlyViolation()
helper for clarity. Both copies updated.
- CORS: add OPTIONS to allow_methods so preflight requests succeed.
Co-Authored-By: Allaun Silverfox <bigdataiscoming+9i37y6j2@protonmail.com>
* fix(security): use negative lookahead for CALL allowlist, remove dead CALL\s*\{ branch
- Replace two-regex CALL check with single negative-lookahead
CYPHER_CALL_DISALLOWED_RE = /\bCALL\s+(?!db\.|apoc\.meta\.)/i
This correctly blocks queries containing ANY disallowed CALL target,
even when bundled alongside an allowed CALL db.* or CALL apoc.meta.*.
- Remove dead CALL\s*\{ alternative from CYPHER_WRITE_RE — the trailing
\b never matched because { is a non-word character.
- Both copies updated identically.
Co-Authored-By: Allaun Silverfox <bigdataiscoming+9i37y6j2@protonmail.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Allaun Silverfox <bigdataiscoming+9i37y6j2@protonmail.com>
- Define TranslationResistance, TransportMetric, and TransportSpace
- Formalize Randers metric F = alpha + beta with Riemannian base and Lyapunov drift
- Connect to PIST via pistMass as transport cost functional
- Define IntelligenceDensity T = C/tau as system capability metric
- Provide executable witnesses for all definitions
- Follow AGENTS.md naming conventions and Q16_16 arithmetic
Build: 3561 jobs, 0 errors (lake build)
Per AGENTS.md: Lean is the source of truth. All computational gates have #eval witnesses.
- Define TranslationResistance, TransportMetric, and TransportSpace
- Formalize Randers metric F = alpha + beta with Riemannian base and Lyapunov drift
- Connect to PIST via pistMass as transport cost functional
- Define IntelligenceDensity T = C/tau as system capability metric
- Provide executable witnesses for all definitions
- Follow AGENTS.md naming conventions and Q16_16 arithmetic
Build: 3561 jobs, 0 errors (lake build)
Per AGENTS.md: Lean is the source of truth. All computational gates have #eval witnesses.
Document discrepancies between the aspirational architecture (in the
flake/docs) and what's actually deployed. Covers control plane location,
edge Caddy divergence, Traefik port, cross-namespace services, and
hostname mismatches. Load the research-stack-infrastructure-bootstrap
skill for the actual deployment procedure.
Build: no build needed
- Change middleware address from authentik-server.services.svc.cluster.local
to authentik-server.authentik.svc.cluster.local (Authentik lives in
authentik namespace, not services)
- Create ExternalName service authentik-server in services namespace so
the rs-auth Ingress can route to the cross-namespace service
Build: no build needed
Architecture alignment:
- Rewrite k3s-server.nix from aspirational role=server to actual role=agent
(cupfox is the real control-plane at 100.110.163.82:6443)
- Update flake.nix: correct serverAddr for all nodes, annotate dead nodes,
fix hostname from nixos-laptop to nixos
- Update join-agent.sh default SERVER to cupfox
- Document actual vs intended architecture in comments
Ingress:
- Add rs-apps-books Ingress for audiobookshelf (/apps/books → media ns)
- Add strip-apps-books middleware for prefix stripping
- Create ray-ingress.yaml for Ray dashboard at /server/ray
Ray:
- Fix raycluster.yaml: enable dashboard, mount /dev/dri on gpu-workers
- Point gpu-workers to qfox-1 (was neon-64gb)
- Remove nvidia.com/gpu resource dependency (use /dev/dri via Mesa)
Security:
- Move OPENID_CLIENT_SECRET from plaintext to K8s Secret ref
- Update manifest to use valueFrom.secretKeyRef
Cleanup:
- Remove 53 committed test PNG screenshots from git tracking
- Remove auth-state.json from git tracking
- Add *.png, *.json to tests/.gitignore
Build: no build needed
- Homarr OIDC env vars set (sso-homarr)
- Database created at /data/db.sqlite
- Config schema updated to v2
- Onboard wizard needs final UI completion
Build: 3313 jobs, 0 errors
- Libraries created via API (204 on creation + path update)
- Paths: /media/movies, /media/tv, /media/music
- SSO-Auth plugin Active, SSO button on login page
- Paths may need manual setting through Dashboard UI
Build: 3313 jobs, 0 errors
- Vaultwarden signups enabled then disabled after user created
- vaultwarden-api configured with allaun@researchstack.info
- API verified responding at vaultapi.researchstack.info
Build: 3313 jobs, 0 errors (lake build Compiler)
- Bootstrapped microvm-racknerd node on its live Tailscale IP 100.80.39.40.
- Connected racknerd to the central QFox cluster.
- Assigned racknerd to its own vps zone with 1G capacity.
- Made garage-cluster-init.sh robust and idempotent.
- Updated comments and topology mappings.
Build: 3313 jobs, 0 errors (lake build)
Architectural plan for Tailscale mesh + Ray + VCN + compute surfaces.
5-layer stack:
1. Tailscale connects everything (WireGuard, DERP relay)
2. Ray schedules work across the mesh
3. VCN compresses data (50x bandwidth reduction)
4. FrameDispatcher routes by tag
5. Compute surfaces execute (GPU/CPU/Ethernet/framebuffer/MCU)
Key insight: every device in the Tailscale mesh is a potential
compute node. Framebuffer and Ethernet surfaces turn devices
that "cant run Ray" into compute participants.
4 phases:
1. Ray over Tailscale (mostly done)
2. Multi-tier scheduling (probe done, placement pending)
3. Framebuffer + Ethernet integration (host-side pending)
4. Edge devices (ESP32, 1-Wire sensors)
New tier between CPU_FFMPEG and FRAMEBUFFER:
GPU_CUDA(7) > GPU_VAAPI(6) > GPU_APU(5) > CPU_FFMPEG(4) >
ETHERNET(3) > FRAMEBUFFER(2) > ESP32(1) > RELAY(0)
- _detect_virtio_net(): probes /sys/class/net for virtio driver (0x1af4)
- PistPacket computation via TX/RX descriptor rings
- Host vhost-user backend does matrix transforms
- CRC32 hardware offload = witness verification
- Works in any VM with network (even without framebuffer)
ray_vcn_bridge.py: Ray transport for the VCN-LUPINE bridge.
Replaces GPUNodeConnection TCP/MKV transport with Ray ObjectRef.
FrameDispatcher, BraidBackend, CUDABackend are unchanged — only
the wire between daemon and GPU node changes.
- RayBraidBackend: compute actor matching VCNBraidBackend pattern
- RayCUDABackend: GPU actor with /dev/dri (Mesa, no NVIDIA plugin)
- RayVCNBridge: full bridge as Ray actor (replaces daemon)
- RayGPUNodeConnection: drop-in for GPUNodeConnection
- SyncBraidWrapper/SyncCUDAWrapper: bridge Ray actors to sync interface
STRAND 42B → 63B, CROSSING 42B → 22B, PIST 24B → 57B
Batch 10: 5ms (0.5ms/frame), 10/10 non-empty
- Add detection for integrated AMD graphics (APUs/iGPUs) based on hardware model name
- Configure UMA-friendly full-range yuvj420p format to reduce system memory bandwidth footprint by 50%
- Force lossless constant QP (-qp 0) and full PC range to prevent clamping loss
- Re-run syntax checks and Lean compiler verification tests
Build: 3313 jobs, 0 errors (lake build)
- ray_vcn_transport.py: @ray.remote wrappers for braid VCN encode/decode
- Distributed encode on CPU workers, compute on GPU workers
- RayVCNTransport actor with frame counter + ObjectRef storage
- FAMM-gated encode task, batch encode/decode helpers
- 20 strands in 576ms (28.8ms/strand), 20/20 CRC ok
- raycluster.yaml: KubeRay cluster on qfox-1
- Head + CPU worker + GPU worker (RTX 4070 SUPER via /dev/dri)
- No NVIDIA device plugin — Mesa direct device access
- Tolerations for desktop taint on qfox-1
- num-gpus instead of custom GPU resource
- fix-nftables-k3s.sh: nftables forward rules for flannel/cni0
- nftables default policy=drop blocks pod-to-pod networking
- systemd service nftables-k3s-fix for persistence
- KubeRay operator moved to nixos (control plane can reach API server)
- FFmpeg 8.0 + reedsolo installed in Ray head pod via conda
- Vectorized create_yuv420_frame when numpy is available to eliminate the 500k-iteration scalar Python loop.
- Pre-filled memoryview slice buffers in the fallback path.
- Updated 4-Infrastructure/AGENTS.md to document the optimization.
Build: 3313 jobs, 0 errors (lake build)