Skip to content

devenv: path:<dir> lines (devcloud 0.11.0) - #356

Merged
SSFSKIM merged 1 commit into
mainfrom
devenv-path-docs
Oct 23, 2026
Merged

SSFSKIM merged 1 commit into
mainfrom
devenv-path-docs

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 23, 2026

Copy link
Copy Markdown
Owner

What and why

devenv/env gets a third line form, path:<dir>. Each one names a directory relative to the repository root and puts it first on PATH, for the setup scripts and for sessions in the checkout. Before this, a repository whose CI runs its tools from a project environment had no way to hand that to sessions on a devcloud host. The first case was CI's .venv/bin placed first on PATH. On a host, python3 was the system's and lacked the repository's packages, and literal values could only replace PATH.

The runner's change is in the person's config repository and has landed there. This PR documents it:

  • devcloud/skills/devenv/SKILL.md: the env bullet names path: lines and when a repository needs one.
  • The devcloud spec: §7 and I4 describe the line and the SessionStart hook. A dated Decision Log entry records why it is a hook and which alternatives lost.
  • devcloud 0.11.0.

How it reaches each consumer:

  • env.sh gets one block that removes the directories from PATH wherever they are and puts them back first, in order. Sourcing it repeatedly, interleaved with other prepends, leaves each directory present once and at the front. The scripts, devenv launches and the shell-rc hook all source it.
  • Sessions started outside devenv, such as a seat on a host or claude started in the checkout, read only .claude/settings.local.json. Its env values cannot prepend. For a project with path: lines, the runner keeps one SessionStart hook there, recognised by a fixed marker. The hook appends a line sourcing .devbox/env.sh to $CLAUDE_ENV_FILE, which Claude Code runs before every Bash command.
  • A plain PATH= line is refused.

Evidence

  • Runner tests: 121 pass in the config repository, 16 of them new:
    • parsing and refusals;
    • bash and zsh idempotence when other prepends are interleaved;
    • a hook command run against a root containing a space and a single quote;
    • the hook added once, replaced when the checkout moves, and removed when the paths go away, with other hooks kept;
    • lexical paths that keep symlinks unresolved;
    • the fingerprint.
  • Live check: in a scratch project with path:bin, a real claude -p session started in the checkout, not through devenv, ran the project's bin/ tool by name. That directory came first on its PATH.
  • Skill eval: two fresh agents got the same scenario, a repository whose CI runs from .venv. With the new SKILL.md text the agent wrote path:.venv/bin. With the old text it wrote no PATH handling and said a session would need a manual source .venv/bin/activate && claude launch.

Review

  • First runner commit: doperpowers:reviewer-medium found four problems, all fixed in the second commit:
    • only the head of PATH was checked, so PATH grew with each nested shell;
    • symlinks in a path: directory were resolved;
    • colons in a directory were accepted, though PATH cannot represent them;
    • the hook's ownership depended on the checkout's location.

Residue

None.

Sminos-Session: devcloud setup#639ca648 (macbook on macbook)

…devcloud 0.11.0)

The devenv skill and the devcloud spec (§7, I4, Decision Log) describe
devenv/env's new path: lines, which the person's devenv runner now
supports: env.sh puts each directory first on PATH, and a SessionStart
hook in .claude/settings.local.json hands env.sh to sessions started
outside devenv through CLAUDE_ENV_FILE. The first repository written
with the skill ran its CI's Python from .venv, which a host session's
python3 could not reach.

Sminos-Session: devcloud setup#639ca648 (macbook on macbook)
@SSFSKIM
SSFSKIM merged commit c0a8240 into main Oct 23, 2026
10 checks passed
@SSFSKIM
SSFSKIM deleted the devenv-path-docs branch October 23, 2026 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant