feat(selfhost): warn loudly when the private config mount is empty - #5977
Conversation
LOOPOVER_REPO_CONFIG_DIR silently falls back to built-in defaults for every per-repo and global setting when its host directory is missing or was renamed without updating the bind mount -- Docker just creates an empty directory in its place, with no error anywhere. A prior docker-compose.yml directory-convention rename left unmigrated on a live instance hit exactly this: every repo's config-driven settings (labels, gate, autonomy, ...) silently reverted to defaults with no visible symptom until behavior drifted days later. Adds emptyConfigDirAdvisory (mirrors sqliteBackupAdvisory / publicOriginReachabilityAdvisory's existing shape): a loud boot-time warning plus a loopover_config_dir_empty_acknowledged gauge, silenced via CONFIG_DIR_EMPTY_ACKNOWLEDGED=true for a legitimately fresh install. Also extends selfhost-post-update-check.sh -- the script run after every deploy -- with the same check, so the very next deploy verification catches this instead of relying on someone noticing a behavior change.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Bundle ReportChanges will increase total bundle size by 163 bytes (0.01%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: loopover-uiAssets Changed:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5977 +/- ##
=======================================
Coverage 95.16% 95.16%
=======================================
Files 589 589
Lines 46776 46779 +3
Branches 14934 14936 +2
=======================================
+ Hits 44514 44517 +3
Misses 1511 1511
Partials 751 751
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-15 05:29:11 UTC
⏸️ Suggested Action - Manual Review Review summary Nits — 5 non-blocking
Concerns raised — review before merging
📋 Copy for AI agents — paste into your coding agent
Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
LOOPOVER_REPO_CONFIG_DIRsilently degrades to "no local config" -> every setting falls back to built-in defaults, with zero error, whenever its host directory is missing, unmounted, or was renamed without updating the bind mount. This bit a live instance: a priordocker-compose.ymldirectory-convention rename (./gittensory-config->./loopover-config) was never migrated on that host, Docker silently created an empty directory at the new path, and every repo's config-driven settings (labels, gate, autonomy, ...) reverted to defaults with no visible symptom until behavior drifted.emptyConfigDirAdvisory+emptyConfigDirAcknowledgedGaugeValueinsrc/selfhost/health.ts, mirroring the existingsqliteBackupAdvisory/publicOriginReachabilityAdvisoryshape exactly: a loudconsole.warnat boot plus aloopover_config_dir_empty_acknowledgedPrometheus gauge, silenced viaCONFIG_DIR_EMPTY_ACKNOWLEDGED=truefor a genuinely fresh install with no config written yet.selfhost_config_dirboot log line (src/server.ts) with anentryCount, and extendsscripts/selfhost-post-update-check.sh-- the script run after every deploy -- with the same empty-mount check, so the very next deploy verification catches this instead of relying on a human noticing a behavior change days later.apps/loopover-ui/src/lib/selfhost-env-reference.ts(newCONFIG_DIR_EMPTY_ACKNOWLEDGEDenv var) and updates the "equivalent manual checks" list in the self-hosting operations docs page to match.Test plan
npm run test:ci(full local gate) greennpm audit --audit-level=moderate— 0 vulnerabilitiesemptyConfigDirAdvisory/emptyConfigDirAcknowledgedGaugeValueunit tests: 100% line + branch coverage (verified via lcov)selfhost-post-update-check.shregression tests (empty mount warns; populated mount is silent) using the script's existing fake-docker-on-PATHtest harnessnpm run selfhost:env-referenceregenerated and committed