You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug] databases.toml can be seeded with a tempdir database path — daemon then silently serves a doomed default DB (data-loss class) #1648
Some process on Jul 9 (test harness or a daemon run pointed at a temp DB) seeded the USER-LEVEL registry with its temporary database path. Every daemon boot since then loads that registry and serves the temp-dir database as "Default".
Two aggravating factors:
The boot log lies: nodespaced logs db_path=~/.nodespace/database/nodespace.db at startup while the registry routes the default database to the temp path — the served DB and the logged path disagree.
macOS periodically purges /var/folders temp dirs — all user data written to that "Default" database is destined for silent deletion. Symptom for a real user: notes vanish / app comes up empty.
Fix direction
Tests/dev harnesses must never write the user-level registry: registry path must follow the DB-path override (or honor an env like NODESPACE_HOME) so temp-DB runs use a temp registry.
Boot should log the actual registry-resolved default path, not the flag/env value it ignored.
Boot-time sanity check: if the default database path is missing or resides under a system temp location, warn loudly and fall back to (or re-register) the standard ~/.nodespace/database path instead of silently serving a doomed DB.
Acceptance
Running the test suites never mutates ~/.nodespace/databases.toml.
A registry whose default path is gone/temp produces a visible warning + safe fallback, and the boot log reflects the DB actually served.
NODESPACE_HOME now resolves the registry (databases.toml) and the served DB default through the same home dir, so redirecting one no longer poisons the other. Boot re-points a default that lives under a system temp dir (while the registry itself doesn't) to the standard path and logs the registry-resolved served path. The real-binary spawn harnesses (test-support, e2e daemon-harness, benchmark script) set NODESPACE_HOME so test runs never touch ~/.nodespace.
Adversarially re-reviewed: repair only fires for a genuinely-doomed default and preserves unrelated registered DBs; healthy/community boot is an unchanged no-op. Note (follow-up): registry-only isolation — daemon.toml/models still resolve via HOME (pre-existing, out of scope here).
Activity
Resolve the registry path through NODESPACE_HOME so a redirected DB c…
mstomar125 commentedon Jul 14, 2026
Resolved by #1655 (merged to main
cec45296).NODESPACE_HOMEnow resolves the registry (databases.toml) and the served DB default through the same home dir, so redirecting one no longer poisons the other. Boot re-points a default that lives under a system temp dir (while the registry itself doesn't) to the standard path and logs the registry-resolved served path. The real-binary spawn harnesses (test-support, e2e daemon-harness, benchmark script) set NODESPACE_HOME so test runs never touch ~/.nodespace.Adversarially re-reviewed: repair only fires for a genuinely-doomed default and preserves unrelated registered DBs; healthy/community boot is an unchanged no-op. Note (follow-up): registry-only isolation — daemon.toml/models still resolve via HOME (pre-existing, out of scope here).