-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Problem
We introduced bin/lib/paths-common.sh for shared path constants, but several high-traffic scripts still hardcode baudbot_agent, /home/baudbot_agent, and /opt/baudbot values.
This creates drift risk when defaults change and makes future refactors harder.
Proposed solution
- Adopt
bb_init_paths/bb_refresh_release_paths(or equivalent shared env initialization) in remaining shell entrypoints and helper modules. - Replace hardcoded path/user literals with exported variables (
BAUDBOT_AGENT_USER,BAUDBOT_AGENT_HOME,BAUDBOT_RELEASE_ROOT, etc.). - For static unit files/wrappers that cannot source shell helpers, generate or template them from a single source of truth (or document why they remain static).
- Add regression tests for any touched behavior (especially fallback resolution in
bin/baudbot).
Helpful context
Examples of remaining hardcoded references:
bin/baudbot:/opt/baudbot/current,/home/...,sudo -u baudbot_agentbin/lib/baudbot-runtime.sh:/home/$agent_user/...,/opt/baudbot/current, fixedbaudbot_agentreferences in status helpersbin/baudbot.service: hardcodedUser=baudbot_agent,WorkingDirectory=/home/baudbot_agent,ReadOnlyPaths=/opt/baudbotbin/baudbot-firewall.service: hardcodedid -u baudbot_agentbin/env.sh: still defaultsAGENT_USERdirectly instead of consistently consuming shared path init
Related PR context: #113 (path constant centralization)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels