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
codecora home resolution is duplicated three ways: update_check differs when CODECORA_HOME is set; skills falls back to the cwd #344
Found while reviewing #343 (config trust store). The 'CodeCora home' is resolved by three different pieces of code:
crates/tole-core/src/skills.rs (~91-100): $CODECORA_HOME/tole/skills/..., else $HOME|$USERPROFILE/.codecora/tole/skills/..., and if neither HOME nor USERPROFILE exists it falls back to . (the current directory).
crates/tole-core/src/update_check.rs (~52-64): codecora_home() appends .codecora/tole even when CODECORA_HOME IS set ($CODECORA_HOME/.codecora/tole), so with CODECORA_HOME=/x skills live in /x/tole/ but the update cache lands in /x/.codecora/tole/.
Inconsistent data location when CODECORA_HOME is set (update-check cache vs skills).
Security-relevant: when HOME/USERPROFILE are unset, skills resolve to ./.codecora/tole/skills/<name> — i.e. inside the (possibly cloned, untrusted) project directory, which is exactly what the config trust store was careful to avoid (an empty or relative root would put the store inside the hostile repo).
Expected
One shared resolver (home root = $CODECORA_HOME or $HOME|$USERPROFILE/.codecora; an empty or relative value is treated as unset/refused; NO cwd fallback), used by skills, update-check and the config trust store, with tests for set/unset/empty/relative. Keep tole-core's published API unchanged or add one small public fn deliberately. Note CODECORA_HOME semantics must be decided once (is the tole data dir $CODECORA_HOME/tole as skills.rs and the issue text assume?).
Found by
Review of PR #343 (agent report) + reading both helpers.
Activity