From 53c40f6da27a718e174f0398e0c7b1ed68d79238 Mon Sep 17 00:00:00 2001 From: Tarik Moussa Date: Fri, 31 Jul 2026 00:51:27 +0200 Subject: [PATCH] chore: interne Host-Adresse durch generischen Hostnamen ersetzt Ersetzt die private LAN-IP des Jetson durch jetson.local in Doku, Shell-Skripten, .env.example und Docstrings. Funktional betroffen ist nur ein os.environ.setdefault-Fallback im Spike; gesetzte Env-Vars (OLLAMA_BASE_URL, GROBID_URL) haben weiterhin Vorrang. uv.lock bleibt unveraendert (enthaelt Versionsnummern, keine Adressen). Co-Authored-By: Claude Opus 4.8 --- .env.example | 2 +- codex/config.py | 2 +- docs/SESSION-2026-06-17-open-items.md | 4 ++-- docs/audit/DATA-QUALITY-2026-06-15.md | 4 ++-- docs/infra/grobid-jetson.md | 24 ++++++++++++------------ docs/infra/jetson-ssh-stability.md | 2 +- infra/reingest_canonical_ids.sh | 2 +- ingest_all.sh | 4 ++-- scripts/ra_grobid_backfill.py | 2 +- spike/F13_synthesis_spike.py | 4 ++-- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.env.example b/.env.example index 8bd512a..91890b5 100644 --- a/.env.example +++ b/.env.example @@ -30,7 +30,7 @@ EMBEDDING_DIM=1024 # Required by OpenAlex ToS when making automated requests. OPENALEX_MAILTO=you@example.com -# Nougat HTTP-Server (Jetson: http://192.168.178.103:8080 | lokal: http://localhost:8080) +# Nougat HTTP-Server (Jetson: http://jetson.local:8080 | lokal: http://localhost:8080) # Used by `codex ingest --rich` for full-PDF Mathpix Markdown output. NOUGAT_URL=http://localhost:8080 diff --git a/codex/config.py b/codex/config.py index fbc6eb6..1c6bd30 100644 --- a/codex/config.py +++ b/codex/config.py @@ -120,7 +120,7 @@ class Settings(BaseSettings): description=( "Ollama base URL for wiki synthesis. " "When None, falls back to OLLAMA_BASE_URL " - "(http://192.168.178.103:11434 for the Jetson). " + "(http://jetson.local:11434 for the Jetson). " "Set WIKI_LLM_URL to override." ), ) diff --git a/docs/SESSION-2026-06-17-open-items.md b/docs/SESSION-2026-06-17-open-items.md index 1d0a8d7..ce2cd3d 100644 --- a/docs/SESSION-2026-06-17-open-items.md +++ b/docs/SESSION-2026-06-17-open-items.md @@ -6,8 +6,8 @@ DONE; R-E deferred). This file is only the **loose ends**. ## 1. ✅ RESOLVED — Jetson is online (the tunnel had dropped, not the host) - What looked like the Jetson going offline was the **SSH tunnel** breaking, not the - host. The Jetson (`192.168.178.103`) is online. Re-open the tunnel with keepalive: - `ssh -o ServerAliveInterval=15 -f -N -L 5433:localhost:5432 alfred@192.168.178.103`. + host. The Jetson (`jetson.local`) is online. Re-open the tunnel with keepalive: + `ssh -o ServerAliveInterval=15 -f -N -L 5433:localhost:5432 alfred@jetson.local`. Better still: run long ops in tmux-on-Jetson (item #4) to avoid the tunnel entirely. ## 2. ✅ DONE — R-F accent re-clean diff --git a/docs/audit/DATA-QUALITY-2026-06-15.md b/docs/audit/DATA-QUALITY-2026-06-15.md index e5f3b5c..6303290 100644 --- a/docs/audit/DATA-QUALITY-2026-06-15.md +++ b/docs/audit/DATA-QUALITY-2026-06-15.md @@ -30,7 +30,7 @@ incomplete, or unrepresentative data. This document is that second axis — a - **Live DB:** Jetson PostgreSQL via an SSH tunnel (open it first): ``` - ssh -f -N -L 5433:localhost:5432 alfred@192.168.178.103 + ssh -f -N -L 5433:localhost:5432 alfred@jetson.local ``` - **Credentials:** `.env.jetson-ingest` (gitignored) holds `DATABASE_URL` (`postgresql://researcher:…@localhost:5433/papers`). The `researcher` role is @@ -377,7 +377,7 @@ is self-contained so a cold session can pick it up. last 2/29. - **How:** no new code — ingest already merges + dedups `api_citations + pdf_citations` ([codex/ingest.py:288](../../codex/ingest.py)). GROBID server is - already configured (`GROBID_URL=http://192.168.178.103:8070` in + already configured (`GROBID_URL=http://jetson.local:8070` in `.env.jetson-ingest`). Download free arXiv PDFs, re-ingest with `source_path`. - **Acceptance:** the 2 theses gain references; published papers gain GROBID-parsed refs beyond OpenAlex/S2 coverage; citing coverage 27/29 → 29/29. diff --git a/docs/infra/grobid-jetson.md b/docs/infra/grobid-jetson.md index 7a43e92..8790d13 100644 --- a/docs/infra/grobid-jetson.md +++ b/docs/infra/grobid-jetson.md @@ -1,7 +1,7 @@ # GROBID on the Jetson (aarch64) — deploy runbook **Status:** ACTIVE -**Host:** `alfred@192.168.178.103` — NVIDIA Jetson Orin Nano (aarch64, 8 GB RAM, 8 GB swap, 6 cores) +**Host:** `alfred@jetson.local` — NVIDIA Jetson Orin Nano (aarch64, 8 GB RAM, 8 GB swap, 6 cores) **Service:** GROBID reference extraction for roadmap **R-A** (`scripts/ra_grobid_backfill.py`) **Last updated:** 2026-06-17 **Verified:** 2026-06-17 — `grobid/grobid:0.9.0-crf` pulled as native `arm64`, `/api/isalive`→`true`, @@ -53,7 +53,7 @@ The SSH user `alfred` is in the `sudo` group but **not** the `docker` group, so once (requires the sudo password): ```bash -ssh alfred@192.168.178.103 +ssh alfred@jetson.local sudo usermod -aG docker alfred # add to docker group (persistent) ``` @@ -62,7 +62,7 @@ only re-evaluated at login — an existing session/`ssh` won't see it; a *new* `ssh` connection will): ```bash -exit && ssh alfred@192.168.178.103 +exit && ssh alfred@jetson.local docker ps # should now work without sudo ``` @@ -94,9 +94,9 @@ the whole stack (that would try to start a second `papers-db`). ```bash # copy this repo's compose file to the Jetson (first time only) -scp infra/docker-compose.yml infra/schema.sql alfred@192.168.178.103:~/codex-infra/ +scp infra/docker-compose.yml infra/schema.sql alfred@jetson.local:~/codex-infra/ -ssh alfred@192.168.178.103 +ssh alfred@jetson.local cd ~/codex-infra docker compose up -d grobid # pulls grobid/grobid:0.9.0-crf (arm64), starts papers-grobid docker compose logs -f grobid # wait for "Started ... in N seconds" (model load ~20–40s) @@ -116,14 +116,14 @@ nothing else in the stack uses it. Idle it still holds ~3.5 GB, so on the 8 GB J keep it stopped and start it only for an R-A run: ```bash -ssh alfred@192.168.178.103 'docker start papers-grobid' # ~30s model load +ssh alfred@jetson.local 'docker start papers-grobid' # ~30s model load curl -s --retry 30 --retry-delay 2 --retry-connrefused \ - http://192.168.178.103:8070/api/isalive # wait for: true + http://jetson.local:8070/api/isalive # wait for: true # ... run R-A from the Mac ... PYTHONPATH=. python scripts/ra_grobid_backfill.py --write -ssh alfred@192.168.178.103 'docker stop papers-grobid' # reclaim ~3.5 GB +ssh alfred@jetson.local 'docker stop papers-grobid' # reclaim ~3.5 GB ``` First-time deploy uses `docker compose up -d grobid` (above); afterwards the @@ -144,7 +144,7 @@ container persists, so `docker start/stop papers-grobid` is all you need. curl -s http://localhost:8070/api/isalive # => true # from the Mac (LAN) — same value the corpus' GROBID_URL points at -curl -s http://192.168.178.103:8070/api/isalive # => true +curl -s http://jetson.local:8070/api/isalive # => true ``` Anything other than `true` (timeout / connection refused / `false`) means the @@ -155,14 +155,14 @@ holds port 8070. ## End-to-end reference-extraction check + running R-A -With `GROBID_URL=http://192.168.178.103:8070` (already set in `.env.jetson-ingest`): +With `GROBID_URL=http://jetson.local:8070` (already set in `.env.jetson-ingest`): ```bash # one PDF, references only — should print N>0 parsed references PYTHONPATH=. python - <<'PY' from codex.parsing.grobid import extract_references refs = extract_references("/Users/tarikmoussa/Desktop/ConformalLabpp/papers/lutz-2024-thesis.pdf", - grobid_url="http://192.168.178.103:8070") + grobid_url="http://jetson.local:8070") print(f"{len(refs)} references; first DOI/arXiv:", next(((r['doi'], r['arxiv_id']) for r in refs if r['doi'] or r['arxiv_id']), None)) PY @@ -172,7 +172,7 @@ Then run the references-only backfill (DB tunnel up — see `docs/audit/DATA-QUALITY-2026-06-15.md`): ```bash -ssh -N -L 5433:localhost:5432 alfred@192.168.178.103 & # DB tunnel +ssh -N -L 5433:localhost:5432 alfred@jetson.local & # DB tunnel cp .env.jetson-ingest .env PYTHONPATH=. python scripts/ra_grobid_backfill.py --zero-edge-only # dry-run first PYTHONPATH=. python scripts/ra_grobid_backfill.py --write # apply diff --git a/docs/infra/jetson-ssh-stability.md b/docs/infra/jetson-ssh-stability.md index 2358f21..ec62c6f 100644 --- a/docs/infra/jetson-ssh-stability.md +++ b/docs/infra/jetson-ssh-stability.md @@ -6,7 +6,7 @@ but has a known workaround (short/idempotent ops). ## Problem (observed) Live data ops run on the **Mac** and reach the Jetson Postgres through an SSH -port-forward tunnel (`ssh -f -N -L 5433:localhost:5432 alfred@192.168.178.103`, +port-forward tunnel (`ssh -f -N -L 5433:localhost:5432 alfred@jetson.local`, `DATABASE_URL` → `localhost:5433`). During the R-A / R-C / R-F work this tunnel **dropped repeatedly mid-run**: any operation longer than a few minutes (corpus re-ingest, the bge-m3 embed loop, the GROBID sweep) had a high chance of failing diff --git a/infra/reingest_canonical_ids.sh b/infra/reingest_canonical_ids.sh index 213862c..5eeec69 100755 --- a/infra/reingest_canonical_ids.sh +++ b/infra/reingest_canonical_ids.sh @@ -25,7 +25,7 @@ TUNNEL_PORT=5433 # ── 1. Preconditions ───────────────────────────────────────────────────────── if ! nc -z localhost "$TUNNEL_PORT" 2>/dev/null; then echo "ERROR: SSH tunnel not active on :$TUNNEL_PORT" - echo "Run: ssh -f -N -L 5433:localhost:5432 alfred@192.168.178.103" + echo "Run: ssh -f -N -L 5433:localhost:5432 alfred@jetson.local" exit 1 fi [[ -f "$ENV_FILE" ]] || { echo "ERROR: $ENV_FILE missing"; exit 1; } diff --git a/ingest_all.sh b/ingest_all.sh index 7cb8586..98c5722 100755 --- a/ingest_all.sh +++ b/ingest_all.sh @@ -2,7 +2,7 @@ # Batch ingest — writes directly to Jetson PostgreSQL via SSH tunnel. # # Prerequisites: -# ssh -f -N -L 5433:localhost:5432 alfred@192.168.178.103 +# ssh -f -N -L 5433:localhost:5432 alfred@jetson.local # uv sync (done once) # # Usage: bash ingest_all.sh 2>&1 | tee ingest_all.log @@ -16,7 +16,7 @@ TUNNEL_PORT=5433 # ── 1. Verify SSH tunnel is active ─────────────────────────────────────────── if ! nc -z localhost "$TUNNEL_PORT" 2>/dev/null; then echo "ERROR: SSH tunnel not active on port $TUNNEL_PORT" - echo "Run: ssh -f -N -L 5433:localhost:5432 alfred@192.168.178.103" + echo "Run: ssh -f -N -L 5433:localhost:5432 alfred@jetson.local" exit 1 fi echo "✓ SSH tunnel active on port $TUNNEL_PORT" diff --git a/scripts/ra_grobid_backfill.py b/scripts/ra_grobid_backfill.py index 5f8ed04..5babbd8 100644 --- a/scripts/ra_grobid_backfill.py +++ b/scripts/ra_grobid_backfill.py @@ -16,7 +16,7 @@ so it is safe, idempotent, and needs only a reachable GROBID server. Prerequisite ------------ A reachable GROBID server. The corpus' ``GROBID_URL`` points at the Jetson -(``http://192.168.178.103:8070``). GROBID now runs natively on that aarch64 host +(``http://jetson.local:8070``). GROBID now runs natively on that aarch64 host via the multi-arch CRF-only image (``grobid/grobid:0.9.0-crf``) — see ``docs/infra/grobid-jetson.md`` for the deploy + docker-permission fix and the ``GET /api/isalive`` check. (The old ``grobid/grobid:0.8.2`` pin was amd64-only, diff --git a/spike/F13_synthesis_spike.py b/spike/F13_synthesis_spike.py index f5972ea..8ee31f4 100644 --- a/spike/F13_synthesis_spike.py +++ b/spike/F13_synthesis_spike.py @@ -3,7 +3,7 @@ NOT a unit test. Not maintained. Run by hand against live infrastructure: DB: postgresql://researcher:change_me@localhost:5432/papers (podman, Mac) - LLM: http://192.168.178.103:11434 (Jetson, qwen2.5:7b) + LLM: http://jetson.local:11434 (Jetson, qwen2.5:7b) Goal: emit 3-5 grounded leads (connection + gap) and a couple of conjectures, then eyeball: @@ -25,7 +25,7 @@ from pathlib import Path # Wire up the live infra without polluting ~/.env os.environ.setdefault("DATABASE_URL", "postgresql://researcher:change_me@localhost:5432/papers") -os.environ.setdefault("OLLAMA_BASE_URL", "http://192.168.178.103:11434") +os.environ.setdefault("OLLAMA_BASE_URL", "http://jetson.local:11434") os.environ.setdefault("SYNTHESIS_LLM_MODEL", "qwen2.5:7b") os.environ.setdefault("SYNTHESIS_TOP_K", "12") -- 2.49.1