Skip to content

refactor(eve): resolve every sandbox path through one resolver - #1466

Draft
chadhietala wants to merge 1 commit into
mainfrom
simplify-commit-review-skill-paths
Draft

refactor(eve): resolve every sandbox path through one resolver#1466
chadhietala wants to merge 1 commit into
mainfrom
simplify-commit-review-skill-paths

Conversation

@chadhietala

@chadhietala chadhietala commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Found

  • resolveSandboxSkillRoot kept its own probe-and-join built on HOME_SKILL_SUFFIX — a second spelling of the .agents/skills tail MODEL_SKILL_ROOT already carries, with nothing keeping them in step.
  • resolveSandboxSeedFilePath had become a wrapper narrowing fix(eve): skills - resolve $HOME paths in file tools #1459's new resolver to skill paths, which its only caller cannot trigger (seed files come from WORKSPACE_ROOT or MODEL_SKILL_ROOT).

Did
Both now go through resolveSandboxModelPath, and MODEL_SKILL_ROOT is derived from MODEL_HOME_ROOT, so $HOME and the skills tail are each written once. −24/+11; neither helper was exported from the package.

Validated
84 unit tests pass across skill-paths and the read/write/glob/grep tools — $HOME expansion, bare $HOME, $HOME_DIR lookalikes, unusable-home fallback, probe caching. One edit points the seed assertion at the surviving resolver. tsc --noEmit, lint, fmt, guard:invariants clean.

#1459 added `resolveSandboxModelPath` to expand a leading `$HOME` for the
sandbox file tools, but left two older paths doing the same work their own
way.

`resolveSandboxSkillRoot` kept its own probe-and-join, which needed
`HOME_SKILL_SUFFIX` — a second spelling of the `.agents/skills` tail that
`MODEL_SKILL_ROOT` already carries, with nothing to keep the two in step.
Resolving `MODEL_SKILL_ROOT` through the new resolver produces the same
root in both the usable-home and fallback cases, so the join helper and
the duplicate suffix are gone and the skills location is written once.

`resolveSandboxSeedFilePath` had become a wrapper that narrowed the
resolver to skill paths only. Seed files come from exactly two roots —
`WORKSPACE_ROOT` and `MODEL_SKILL_ROOT` — so the narrowing could not
change any real input, and the single call site now calls the resolver
directly.

`MODEL_SKILL_ROOT` is derived from `MODEL_HOME_ROOT` so `$HOME` also
appears once.

Signed-off-by: Chad Hietala <chadhietala@gmail.com>
@chadhietala chadhietala added the simplify-devbox Simplification found by the automated devbox code review label Jul 31, 2026
@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
eve-docs Ready Ready Preview Jul 31, 2026 3:00pm
eve-docs-4759 Ready Ready Preview, v0 Jul 31, 2026 3:00pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

simplify-devbox Simplification found by the automated devbox code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant