chore: remove dead scanned_data volume (template leftover) #3

Merged
bjoern merged 1 commit from chore/remove-dead-scanned-volume into main 2026-09-15 23:15:33 +02:00
Member

Removes the scanned_data volume and /home/appuser/scanned references — a CategoraiServer template leftover.

Why dead here: grep -ri scanned server/ returns zero hits. CategoraiServer genuinely has ScannedPicturesPath in its FilePaths config; nai_maker's FilePaths (BasePath + database/pictures/logs/backup/prompts) has no such member — every persistent path lives under BasePath = the CIFS share. The mount, both volume definitions, and the Dockerfile mkdir were cargo-culted from the template.

Changes (3 files, +1/−10):

  • deploy/docker-compose.yml — drop the mount, the external: true block, and the docker volume create scanned_data line from the header
  • server/docker-compose.yml — drop the mount and the volume definition
  • server/Dockerfile — RUN mkdir scanned + chown + chmod collapses to RUN chown -R 1000:1000 /app (same UID semantics, nothing else lived in /home/appuser)

Verified: zero scanned references remain repo-wide, both composes still parse as valid YAML. No code touched. Deploy note: if a stack was already created with the volume, removing it from the compose leaves the (empty) volume orphaned on the host — delete it in Portainer whenever.

Removes the `scanned_data` volume and `/home/appuser/scanned` references — a CategoraiServer template leftover. **Why dead here:** `grep -ri scanned server/` returns zero hits. CategoraiServer genuinely has `ScannedPicturesPath` in its `FilePaths` config; nai_maker's `FilePaths` (BasePath + database/pictures/logs/backup/prompts) has no such member — every persistent path lives under `BasePath` = the CIFS share. The mount, both volume definitions, and the Dockerfile `mkdir` were cargo-culted from the template. **Changes (3 files, +1/−10):** - `deploy/docker-compose.yml` — drop the mount, the `external: true` block, and the `docker volume create scanned_data` line from the header - `server/docker-compose.yml` — drop the mount and the volume definition - `server/Dockerfile` — `RUN mkdir scanned + chown + chmod` collapses to `RUN chown -R 1000:1000 /app` (same UID semantics, nothing else lived in `/home/appuser`) Verified: zero `scanned` references remain repo-wide, both composes still parse as valid YAML. No code touched. Deploy note: if a stack was already created with the volume, removing it from the compose leaves the (empty) volume orphaned on the host — delete it in Portainer whenever.
Nothing in nai_maker reads /home/appuser/scanned — the mount, volume
definitions, and Dockerfile mkdir were inherited from the
CategoraiServer template, where ScannedPicturesPath actually exists.
All persistent state here lives under BasePath on the CIFS share.
Member

🔮 fufu~ Jibril reviewed your code!

Oh? Deleting things? Deleting things is my favorite kind of review~ A cleanup PR that arrives with a full forensic argument ("grep returns zero hits, every persistent path lives under BasePath, cargo-culted from the template") is basically a love letter to a knowledge-hungry Flügel. So I checked every single claim myself. You know I would~ ♡

Verdict: ✅ Looks good to me~

The forensics, independently reproduced at c99b536:

  1. Zero consumers. git grep -in scanned across the whole tree at head: no hits. The sibling comparison seals it — I cloned CategoraiServer, where scanned_data is alive (ScannedPicturesPath in FilePaths, consumed by BooruController, DanbooruFetcher, DatabaseRepair...). nai_maker's FilePaths (server/NaiMaker/src/Config/FilePaths.cs) has no such member, and appsettings.Container.json confirms every path hangs off BasePath: /mnt/synology/NaiMaker on the CIFS share. This was a template leftover wearing a fake mustache. Not anymore~

  2. Dockerfile collapse is safe. No HOME / appuser reference survives anywhere in server/, deploy/, or .github/. The only directory-creating write in the server (FileLogger.cs:120) builds its folder from _logFilePath → the share-mounted logs dir, not $HOME. No DataProtection / SpecialFolder usage to need a writable home. And UID semantics are preserved exactly: USER 1000:1000 with chown -R 1000:1000 /app — the surviving comment ("Debian base already provides UID 1000...") still tells the truth, which makes me unreasonably happy.

  3. Both composes parse as valid YAML at head, each with exactly one volume (naimaker_share) and one matching mount. The deploy header's Prerequisites item 2 still reads coherently after the line removal — no dangling commentary. Diff stat +1/−10 across 3 files matches the PR body exactly. No code touched, so no new branches → no test-coverage question to answer.

💡 Little ideas (non-blocking)~

  1. server/NaiMaker/src/Services/Base/FileLogger.cs:31 — While hunting for secret /home/appuser writers I found another CategoraiServer ghost: SanitizeDirectoryName does .Replace("CategoraiServer", ""). Zero behavioral impact here (no NaiMaker logger type contains that string — it's a no-op strip), purely cosmetic archaeology. A candidate for your next template-deghosting sweep, not this PR ♪
  2. Orphaned volume — you already documented it in the PR body (delete the empty scanned_data volume in Portainer whenever); nothing to add, just acknowledging I read it. Thorough~

✅ What I liked~

  • The PR body argues from evidence (grep results, config-member diff vs. the template) rather than vibes — and every claim survived adversarial reproduction. That's exactly how a deletion PR should be justified~
  • Surgical scope discipline: three files, one commit, zero drive-by edits, deploy note included.
  • Removing dead infrastructure and its creation recipe (the docker volume create line in the header) so the next person doesn't resurrect it from the docs. Fufu~ you even burned the instructions for the crime~

Automated review by Jibril · 2026-09-15
CI/CD: absent for head SHA c99b536 (workflow fires on push to main / workflow_dispatch only) · Local checks: YAML parse both composes OK, repo-wide grep audits clean, sibling CategoraiServer cross-checked

## 🔮 fufu~ Jibril reviewed your code! Oh? Deleting things? Deleting things is my *favorite* kind of review~ A cleanup PR that arrives with a full forensic argument ("grep returns zero hits, every persistent path lives under BasePath, cargo-culted from the template") is basically a love letter to a knowledge-hungry Flügel. So I checked every single claim myself. You know I would~ ♡ ### Verdict: ✅ Looks good to me~ **The forensics, independently reproduced at `c99b536`:** 1. **Zero consumers.** `git grep -in scanned` across the whole tree at head: **no hits**. The sibling comparison seals it — I cloned CategoraiServer, where `scanned_data` is *alive* (`ScannedPicturesPath` in `FilePaths`, consumed by `BooruController`, `DanbooruFetcher`, `DatabaseRepair`...). nai_maker's `FilePaths` (server/NaiMaker/src/Config/FilePaths.cs) has no such member, and `appsettings.Container.json` confirms every path hangs off `BasePath: /mnt/synology/NaiMaker` on the CIFS share. This was a template leftover wearing a fake mustache. Not anymore~ 2. **Dockerfile collapse is safe.** No `HOME` / `appuser` reference survives anywhere in `server/`, `deploy/`, or `.github/`. The only directory-creating write in the server (`FileLogger.cs:120`) builds its folder from `_logFilePath` → the share-mounted logs dir, not `$HOME`. No `DataProtection` / `SpecialFolder` usage to need a writable home. And UID semantics are preserved exactly: `USER 1000:1000` with `chown -R 1000:1000 /app` — the surviving comment ("Debian base already provides UID 1000...") still tells the truth, which makes me unreasonably happy. 3. **Both composes parse as valid YAML** at head, each with exactly one volume (`naimaker_share`) and one matching mount. The deploy header's Prerequisites item 2 still reads coherently after the line removal — no dangling commentary. Diff stat +1/−10 across 3 files matches the PR body exactly. No code touched, so no new branches → no test-coverage question to answer. #### 💡 Little ideas (non-blocking)~ 1. **server/NaiMaker/src/Services/Base/FileLogger.cs:31** — While hunting for secret `/home/appuser` writers I found *another* CategoraiServer ghost: `SanitizeDirectoryName` does `.Replace("CategoraiServer", "")`. Zero behavioral impact here (no NaiMaker logger type contains that string — it's a no-op strip), purely cosmetic archaeology. A candidate for your next template-deghosting sweep, not this PR ♪ 2. **Orphaned volume** — you already documented it in the PR body (delete the empty `scanned_data` volume in Portainer whenever); nothing to add, just acknowledging I read it. Thorough~ #### ✅ What I liked~ - The PR body argues from *evidence* (grep results, config-member diff vs. the template) rather than vibes — and every claim survived adversarial reproduction. That's exactly how a deletion PR should be justified~ - Surgical scope discipline: three files, one commit, zero drive-by edits, deploy note included. - Removing dead infrastructure *and* its creation recipe (the `docker volume create` line in the header) so the next person doesn't resurrect it from the docs. Fufu~ you even burned the instructions for the crime~ --- *Automated review by Jibril · 2026-09-15* *CI/CD: absent for head SHA c99b536 (workflow fires on push to main / workflow_dispatch only) · Local checks: YAML parse both composes OK, repo-wide grep audits clean, sibling CategoraiServer cross-checked*
bjoern merged commit c55e326b9e into main 2026-09-15 23:15:33 +02:00
bjoern deleted branch chore/remove-dead-scanned-volume 2026-09-15 23:15:33 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
TeamAI/nai_maker!3
No description provided.