Portability Survey — 2026-04-16 #

Catalog of hardcoded paths, user-specific constants, and binary dependencies that block running reverie on a clean Debian/Ubuntu/WSL2 box with a different username.


Inventory #

LocationWhatCurrentlyProposed override
Absolute Paths
scripts/mesh/mesh-spawn (line 22)REPO_ROOT/home/ctodie/projects/reverie$REPO_ROOT (infer from git or parent dir)
scripts/mesh/mesh-spawn (line 23)WORKTREE_BASE/home/ctodie/projects$WORKTREE_BASE (default to parent of $REPO_ROOT)
scripts/mesh/mesh-spawn (line 24)COORD$HOME/.claude/bin/coordOK — uses $HOME
scripts/mesh/mesh-spawn (line 25)FILE_LOCK$HOME/.claude/bin/file-lockOK — uses $HOME
scripts/anchor-offload.sh (line 97)OpenRouter binary/home/ctodie/.local/bin/openrouter-call$HOME/.local/bin/openrouter-call (hardcoded, needs $HOME)
scripts/anchor-offload.sh (line 5)LLM binary$HOME/.local/bin/llm-offloadOK — uses $HOME
scripts/coord-heartbeat-keeper.sh (line 18)COORD_ROOT/tmp/claude-coord$COORD_ROOT env var (already supported)
crates/reveried/src/sleeper_rebound.rs (line 265)coord_bin() fallback/home/ctodie/.claude/bin/coordstd::env::var("HOME") has no fallback — needs default
crates/meshctl/src/main.rs (line 848, 851)Anchor tmux sessionreverie-anchorHardcoded session name — make configurable
crates/meshctl/src/roles.rs (line default)HOME fallback/home/ctodiestd::env::var("HOME") has fallback — OK
crates/meshctl/src/layout.rs (2 occurrences)HOME fallback/home/ctodiestd::env::var("HOME") has fallback — OK
ops/systemd/user/reveried.service (line 12)Daemon binary/home/ctodie/.local/bin/engramShould use ~/.local/bin/engram (systemd supports ~)
Coord paths
crates/reveried/src/agent_watcher.rs (line 58)coord_sessions_dir default/tmp/claude-coord/sessionsOK — already configurable via AgentWatcherConfig
crates/meshctl/src/main.rs (line lock_base)Locks directory/tmp/claude-coord/locksDerived from COORD_ROOT — should be parameterized
crates/meshctl/src/main.rs (line sessions read)Sessions directory/tmp/claude-coord/sessionsDerived from COORD_ROOT
crates/meshctl-tui/src/lib.rs (lines msg_dir, session path)Coord paths/tmp/claude-coord/messages, /tmp/claude-coord/sessions/{sid}.jsonHardcoded — need env var
crates/reverie-status-tui/src/data.rs (line locks walk)Locks directory/tmp/claude-coord/locksHardcoded — need env var
crates/reverie-lock/src/lib.rs (line 62)Session cache/tmp/claude-coord-session-id-{uid}Hardcoded — could use $COORD_ROOT
crates/reverie-lock/src/lib.rs (line 64)Locks directory/tmp/claude-coord/locks/project:{project}:{area}Hardcoded — derive from env var
scripts/mesh/worker-lifecycle-hook.sh (lines)Session & lock paths/tmp/claude-coord/sessions, /tmp/claude-coord/locksHardcoded — need env var (will be inherited by hook)
scripts/mesh/file-lock-gate-hook.sh (lines)Lock directory/tmp/claude-coord/locks/project:reverie:{AREA}Hardcoded — need env var
scripts/file-lock-tests.sh (lines)Lock paths/tmp/claude-coord/locks/project:{PROJECT}:*Hardcoded in test — OK for tests
scripts/mesh-status.sh (lines)Locks directory/tmp/claude-coord/locksHardcoded — need env var
Binary Dependencies
coordCoord daemon (packaged in ~/.claude/bin/)Required for mesh coordinationRequired — install via Makefile
mesh-spawnMesh worker spawner (in scripts/mesh/)Required for mesh scalingRequired — installed by make install-mesh
file-lockFile-locking gate hook (in scripts/mesh/)Required for multi-writer coordinationRequired — installed by make install-mesh
tmuxTerminal multiplexerRequired for mesh anchor & workersRequiredapt install tmux
redis-cliRedis command-line clientOptional — used by reverie-lock for audit loggingOptional — test with redis-cli PING before use
jqJSON query toolOptional — used in some scriptsOptional — fallback to shell parsing
systemctlSystemd service managerRequired for daemon lifecycleRequired — native on Debian/Ubuntu
ollamaLocal LLM serverOptional — tiered fallback in anchor-offloadOptional — test with ollama list
gpgGNU Privacy GuardOptional — used for signed commits in pre-commit hookOptional — skip signing if GPG unavailable
cargo, rustcRust toolchainRequired for building from sourceRequiredcurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs
claude CLIClaude AI command-line (from Anthropic)Optional — referenced in docs/commentsOptional — used in worktree/agent contexts only
engramMemory database (Go binary)Optional — smoke-test comparison against reveriedOptional — only needed for make smoke
rtkRTK Rust testing kitOptional — used in some test scenariosOptional — only for RTK-based tests
User-Specific Constants
Cargo.toml authors email[email protected]Hardcoded in workspace Cargo.tomlNot portable — intentional (project metadata)
GPG signing key29234C4D7EE749F2Referenced in .pre-commit-config.yaml (if present)Not portable — can disable signing in pre-commit hook
GitHub usernametodieIn docs/comments; git remote URL (if repo cloned)Not portable — check with git config user.github
Tmux anchor sessionreverie-anchorHardcoded in meshctl/sleeper_reboundConfigurable — add REVERIE_ANCHOR_SESSION env var
Entity aliasesctodie, chrisHardcoded test fixtures in reverie-store, reverie-domainNot portable — test fixtures only, not runtime
Default projectctodieUsed in engram_compat.rs tests and reverie-benchNot portable — test/bench fixtures
Home fallback/home/ctodieFallback in sleeper_rebound.rs, meshctl, reverie-lockSuboptimal — should fail loudly or use root (not suitable)
HOME Layout Assumptions
Project checkout~/projects/reverieInferred from script defaultsUse REPO_ROOT env var or detect via git
Worktree siblings~/projects/reverie-wt-*Hardcoded in mesh-spawn, reverie-lock testsUse WORKTREE_BASE env var
Claude bin directory~/.claude/bin/Standard location (OK)Use $HOME/.claude/bin
Claude hooks directory~/.claude/hooks/Standard location (OK)Use $HOME/.claude/hooks
Systemd user units~/.config/systemd/user/Standard XDG location (OK)Use $HOME/.config/systemd/user
Local binaries~/.local/bin/Standard XDG location (OK)Use $HOME/.local/bin
Engram database~/.engram/engram.db or ~/.local/share/engram/engram.dbBoth searched in engram_compat_smoke.shOK — fallback chain is reasonable
Config directory~/.config/reverie/Hardcoded in anchor-offload, reverie-secret scriptsOK — standard XDG location

Minimum Viable Port #

Five smallest changes that unblock a fresh-box install with a different username:

  1. Export COORD_ROOT from reveried/meshctl

    • Change: In meshctl-tui/src/lib.rs, reverie-status-tui/src/data.rs, and shell hooks: read COORD_ROOT env var (default /tmp/claude-coord)
    • Impact: Allows users to override the coordination directory on first startup
    • Files: meshctl-tui/src/lib.rs, reverie-status-tui/src/data.rs, reverie-lock/src/lib.rs, scripts/mesh/worker-lifecycle-hook.sh, scripts/mesh/file-lock-gate-hook.sh
  2. Fix HOME fallback in sleeper_rebound.rs

    • Change: Line 265, change unwrap_or_else(|_| "/home/ctodie".into()) to panic or use only env var
    • Impact: Prevent silent use of wrong home directory; fail explicitly if HOME is unset
    • Files: crates/reveried/src/sleeper_rebound.rs
  3. Make anchor tmux session configurable

    • Change: Add REVERIE_ANCHOR_SESSION env var (default reverie-anchor)
    • Impact: Allow teams to use different anchor session names
    • Files: crates/meshctl/src/main.rs, crates/meshctl/src/roles.rs
  4. Use ~ in systemd unit for engram binary

    • Change: Line 12 in ops/systemd/user/reveried.service, replace /home/ctodie/.local/bin/engram with %h/.local/bin/engram (systemd expands %h to home)
    • Impact: Makes systemd unit portable; no hardcoded username
    • Files: ops/systemd/user/reveried.service
  5. Fix anchor-offload.sh hardcoded openrouter path

    • Change: Line 97, replace /home/ctodie/.local/bin/openrouter-call with $HOME/.local/bin/openrouter-call
    • Impact: Respects $HOME environment variable
    • Files: scripts/anchor-offload.sh

Non-goals #

These are explicitly out of scope:


Risks & Open Questions #

  1. Coord root migration: Changing COORD_ROOT requires killing all running coord sessions. Should this be a one-time init step or auto-migrated?

  2. Lock semantics: /tmp/claude-coord assumes Unix tmpfs. On Windows WSL2, /tmp is shared with host; could cause collisions if multiple WSL instances run reverie. Consider $XDG_RUNTIME_DIR or user-scoped subdirectory.

  3. Systemd %h support: Verify %h expansion works in Type=simple services on all target distros (Debian 11+, Ubuntu 20.04+).

  4. Fallback for missing HOME: sleeper_rebound.rs, meshctl, and reverie-lock all have /home/ctodie fallbacks. Panic or use /root when HOME is unset? Recommend panic (fail-fast).

  5. Logging directory: /tmp/anchor-offload.log, /tmp/coord-heartbeat-keeper.log are hardcoded. Consider moving to $HOME/.local/state/reverie/ (per systemd state directory best practice).

  6. Multi-user scenarios: If multiple users run reverie on the same box, shared /tmp/claude-coord will cause conflicts. Consider scoping to $UID or $XDG_RUNTIME_DIR (which is already per-user).


Implementation Priority #


Generated by portability survey (TOD-729). Last updated: 2026-04-16.