From 9128530589011c7cd85e3d48e7666857991e032e Mon Sep 17 00:00:00 2001 From: oskar Date: Tue, 4 Aug 2026 17:02:12 +0200 Subject: [PATCH] fix(kb): 13 pozostalych odwolan do sciezek sprzed migracji MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Weryfikacja 0-odwolan z 01db57a liczyla tylko podzbior prefiksow — poza nim zostalo 13 wskaznikow w plikach niemarkdownowych i w prozie dokumentow: docs/kb/modules/05-faza3-plan.md -> kb/phases/kb-m5-faza3.md (2x systemd) docs/kb/modules/05-faza4-plan.md -> kb/phases/kb-m5-faza4.md (kb-query app.js) docs/kb/modules/DECYZJE-*.md -> kb/decisions/kb-dokumenty-otwarte.md docs/backlog.md (npm panel admina) -> kb/decisions/backlog-aktywne.md docs/backlog/ (uid/gid floty) -> kb/decisions/backlog-uid-gid-flota.md docs/kb/modules/0X-*.md -> kb/phases/kb-m*.md docs/incidents/2026-07-30-*.md -> kb/incidents/ (3x node-agent) docs/architecture/RECON-multi*.md -> kb/subsystems/recon-multiagent.md jobs/deploy-runner/README.md -> kb/services/job-deploy-runner.md Wyjatek zamierzony: `docs/kb/modules/05-faza3-pilot-streszczen.md` w §11 planu fazy 3 to nazwa artefaktu, ktory nigdy nie powstal — przepiety na docelowa konwencje (kb/phases/kb-m5-faza3-pilot-streszczen.md), zeby przyszly plik wyladowal w nowym drzewie, a nie w skasowanym katalogu. Weryfikacja: skan po 67 sciezkach zmigrowanych w tej galezi (git grep -F na kazdej) = 0 trafien poza docs/sessions (logi historyczne, celowo nietkniete); 0 martwych linkow markdown na 190 plikach; check_okf.py 190/190 ZGODNE. Co-Authored-By: Claude Opus 5 (1M context) --- hosts/vps/runtime/node-agent/docker-compose.override.yml | 2 +- jobs/deploy-runner/systemd/homelab-deploy-runner.service | 2 +- jobs/documents-ingest/systemd/kb-ingest.service | 2 +- jobs/documents-ingest/systemd/kb-ingest.timer | 2 +- kb/phases/kb-m5-faza3.md | 2 +- kb/services/job-documents-ingest.md | 2 +- kb/subsystems/kb-documents-pillar.md | 2 +- scripts/npm/env.example | 2 +- services/control-plane/docker-compose.yml | 2 +- services/kb-query/app/static/app.js | 2 +- services/nextcloud/env.example | 2 +- services/node-agent/src/node_agent.py | 2 +- services/node-agent/tests/test_safe_cleanup.py | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/hosts/vps/runtime/node-agent/docker-compose.override.yml b/hosts/vps/runtime/node-agent/docker-compose.override.yml index ac56513..2be640a 100644 --- a/hosts/vps/runtime/node-agent/docker-compose.override.yml +++ b/hosts/vps/runtime/node-agent/docker-compose.override.yml @@ -4,7 +4,7 @@ services: - NODE_NAME=vps - CHECK_INTERVAL=60 # TEMPORARY mitigation (M1) for the unfiltered-prune incident - # (docs/incidents/2026-07-30-ollama-solaria-vanish.md §7). node-agent runs + # (kb/incidents/2026-07-30-ollama-solaria-vanish.md §7). node-agent runs # `docker container prune()` with NO filters every CHECK_INTERVAL, and the # Docker API removes EVERY non-running container regardless of restart # policy or compose labels — this already destroyed ollama@solaria. On VPS diff --git a/jobs/deploy-runner/systemd/homelab-deploy-runner.service b/jobs/deploy-runner/systemd/homelab-deploy-runner.service index ce192ae..743a34d 100644 --- a/jobs/deploy-runner/systemd/homelab-deploy-runner.service +++ b/jobs/deploy-runner/systemd/homelab-deploy-runner.service @@ -1,5 +1,5 @@ # homelab-deploy-runner.service — host-side executor for control-plane `redeploy` -# actions (docs/architecture/RECON-multiagent-2026-07-27.md D14/D15). +# actions (kb/subsystems/recon-multiagent.md D14/D15). # # Host-level and NOT a container, deliberately: it runs `docker compose` the way # a human deploy does, so relative bind mounts and the compose project name diff --git a/jobs/documents-ingest/systemd/kb-ingest.service b/jobs/documents-ingest/systemd/kb-ingest.service index 236baff..7ecbf01 100644 --- a/jobs/documents-ingest/systemd/kb-ingest.service +++ b/jobs/documents-ingest/systemd/kb-ingest.service @@ -1,4 +1,4 @@ -# kb-ingest.service — module 5 phase 3 step 5 (docs/kb/modules/05-faza3-plan.md §7.1). +# kb-ingest.service — module 5 phase 3 step 5 (kb/phases/kb-m5-faza3.md §7.1). # First systemd unit in this repo: deliberately host-level, not a container — the job # needs simultaneous LAN (Paperless), local DB (kb-postgres@PIHA), and Tailscale (Ollama@ # SOLARIA) access; containerizing it buys nothing here. diff --git a/jobs/documents-ingest/systemd/kb-ingest.timer b/jobs/documents-ingest/systemd/kb-ingest.timer index cf45c5b..45f9e7a 100644 --- a/jobs/documents-ingest/systemd/kb-ingest.timer +++ b/jobs/documents-ingest/systemd/kb-ingest.timer @@ -1,4 +1,4 @@ -# kb-ingest.timer — module 5 phase 3 step 5 (docs/kb/modules/05-faza3-plan.md §7.1). +# kb-ingest.timer — module 5 phase 3 step 5 (kb/phases/kb-m5-faza3.md §7.1). # Daily at 03:30, not hourly: the plan fixes this schedule explicitly (low-traffic window, # and the underlying jobs are full-corpus re-scans each tick — cheap at 186 documents # today, but daily keeps headroom as the corpus grows). Persistent=true catches up after a diff --git a/kb/phases/kb-m5-faza3.md b/kb/phases/kb-m5-faza3.md index 2fb0f92..703afad 100644 --- a/kb/phases/kb-m5-faza3.md +++ b/kb/phases/kb-m5-faza3.md @@ -448,7 +448,7 @@ Próbka 25 dokumentów (stratyfikowana: polisy, faktury, umowy, urzędowe, FLL/s - **kompletność faktów kluczowych** (kwoty, daty, strony, numery), - **jakość tagów** (trafność + zgodność ze słownikiem). -Wynik do `docs/kb/modules/05-faza3-pilot-streszczen.md`: tabela per dokument + wnioski. +Wynik do `kb/phases/kb-m5-faza3-pilot-streszczen.md`: tabela per dokument + wnioski. **Kryterium „lokalny wystarcza na skalę mailową"**: mediana wierności = 2 (zero tolerancji dla przekręconych kwot — to trafia do wiki) i kompletność ≥ 80% punktów API. Jeśli lokalny nie daje rady → decyzja o skali mailowej rozważa API z polityką eskalacji fazy 5 (koszt diff --git a/kb/services/job-documents-ingest.md b/kb/services/job-documents-ingest.md index da1c5dd..186a17b 100644 --- a/kb/services/job-documents-ingest.md +++ b/kb/services/job-documents-ingest.md @@ -103,7 +103,7 @@ so Paperless can read them. If the chown fails (e.g. the job isn't running as root/uid 1000), a warning is logged but the run continues — the write itself already succeeded; fix ownership/perms on `consume/` separately if needed. PIHA's uid/gid convention across the fleet is tracked as its own tech-debt -item (see `docs/backlog/`), not solved here. +item (see `kb/decisions/backlog-uid-gid-flota.md`), not solved here. ## Idempotency — registry diff --git a/kb/subsystems/kb-documents-pillar.md b/kb/subsystems/kb-documents-pillar.md index 51ee2aa..37748fc 100644 --- a/kb/subsystems/kb-documents-pillar.md +++ b/kb/subsystems/kb-documents-pillar.md @@ -12,7 +12,7 @@ links: [] > Dokument-master filaru dokumentow. Stoi pod `kb-00-overview.md`. > Cel: kazda sesja / Claude Code startuje z pelnym kontekstem decyzji. > Status: ARCHITEKTURA ZAMKNIETA (2026-07-01), implementacja modulowa czeka. -> Moduly implementacyjne: `docs/kb/modules/0X-*.md` — puszczane CC jeden po drugim. +> Moduly implementacyjne: `kb/phases/kb-m*.md` — puszczane CC jeden po drugim. --- diff --git a/scripts/npm/env.example b/scripts/npm/env.example index 232f1ab..d382828 100644 --- a/scripts/npm/env.example +++ b/scripts/npm/env.example @@ -6,7 +6,7 @@ NPM_PIHA_PASS=CHANGEME # VPS — public ingress. Panel admina osiagalny WYLACZNIE przez Tailscale mesh # (http://100.95.58.48:81). NIGDY nie uzywac publicznego IP (135.181.153.108:81) — -# patrz docs/backlog.md, wpis o publicznej ekspozycji panelu admina. +# patrz kb/decisions/backlog-aktywne.md, wpis o publicznej ekspozycji panelu admina. NPM_VPS_USER=CHANGEME NPM_VPS_PASS=CHANGEME diff --git a/services/control-plane/docker-compose.yml b/services/control-plane/docker-compose.yml index 6a9dc5c..a026b5e 100644 --- a/services/control-plane/docker-compose.yml +++ b/services/control-plane/docker-compose.yml @@ -81,7 +81,7 @@ services: - /opt/homelab:/opt/homelab # Read-only since the redeploy fix: the executor used to run # scripts/deploy/deploy-node.sh out of this mount (it never worked — see - # jobs/deploy-runner/README.md). Deploys now happen on the node itself, so + # kb/services/job-deploy-runner.md). Deploys now happen on the node itself, so # nothing here needs write access to the checkout. - ../..:/repo:ro - /var/run/docker.sock:/var/run/docker.sock diff --git a/services/kb-query/app/static/app.js b/services/kb-query/app/static/app.js index 483d3d1..4fae60e 100644 --- a/services/kb-query/app/static/app.js +++ b/services/kb-query/app/static/app.js @@ -1,4 +1,4 @@ -// kb-query frontend -- module 5 phase 4 (docs/kb/modules/05-faza4-plan.md §7). Vanilla JS, no +// kb-query frontend -- module 5 phase 4 (kb/phases/kb-m5-faza4.md §7). Vanilla JS, no // build step (plan §2 decision 4): fetch()s /search, renders results grouped by envelope_id. // // Threshold rule (plan §7, task spec): dist < 0.45 green, 0.45-0.55 yellow (still rendered with diff --git a/services/nextcloud/env.example b/services/nextcloud/env.example index 8ae969b..acdba0d 100644 --- a/services/nextcloud/env.example +++ b/services/nextcloud/env.example @@ -2,7 +2,7 @@ # docker-compose.yml and fill in real values. Never commit .env. # LAN IP of the node Nextcloud lands on. Host decided: PIHA (see -# docs/kb/modules/DECYZJE-do-podjecia.md #1). The web port (8220) binds ONLY +# kb/decisions/kb-dokumenty-otwarte.md #1). The web port (8220) binds ONLY # to this interface — never 0.0.0.0. LAN_BIND_IP=192.168.31.5 diff --git a/services/node-agent/src/node_agent.py b/services/node-agent/src/node_agent.py index 2e34dba..3b14b94 100644 --- a/services/node-agent/src/node_agent.py +++ b/services/node-agent/src/node_agent.py @@ -638,7 +638,7 @@ class NodeAgent: NEVER uses containers.prune(): the Docker API removes *every* non-running container, ignoring RestartPolicy and compose labels. That is what deleted `ollama` on SOLARIA 19 s after an operator stopped it - (docs/incidents/2026-07-30-ollama-solaria-vanish.md). No filter can fix + (kb/incidents/2026-07-30-ollama-solaria-vanish.md). No filter can fix it either — `until` filters on creation time, not stop time, so it never protects a long-lived service. diff --git a/services/node-agent/tests/test_safe_cleanup.py b/services/node-agent/tests/test_safe_cleanup.py index b136058..a66f9c5 100644 --- a/services/node-agent/tests/test_safe_cleanup.py +++ b/services/node-agent/tests/test_safe_cleanup.py @@ -1,5 +1,5 @@ """Tests for NodeAgent Docker cleanup — regression cover for the 2026-07-30 -unfiltered-prune incident (docs/incidents/2026-07-30-ollama-solaria-vanish.md). +unfiltered-prune incident (kb/incidents/2026-07-30-ollama-solaria-vanish.md). `containers.prune()` removes EVERY non-running container, ignoring restart policy and compose labels; that is what deleted `ollama` on SOLARIA 19 s after