fix(validator): path-string symlink semantics + add local-e2e setup script #4
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/validator-symlink-semantics"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Two follow-ups discovered while pre-flighting local platform spin-up (internal#77 dev-department extraction).
Validator (closes task #231)
Previous
validate-tree.pyusedPath.resolve()everywhere — Python's realpath equivalent that follows symlinks. Caused false positives on parent template's cross-repo symlink (dev-lead → sibling repo): validator reportedresolves outside repo rooteven though the platform'sresolveYAMLIncludesaccepts the path becausefilepath.Abs/Reloperate on path STRINGS, not on realpath.Fix: introduce
_abs_no_symlink_resolve()helper usingos.path.abspath(string-only) and_is_inside_root()that mirrors Go'sfilepath.Rel + HasPrefixidiom. All places where the validator emulates the platform security check now use these helpers;Path.resolve()is reserved for cases that need realpath semantics (none currently).Verified:
dev-leadsymlink (was previously hard error).--strictstill 28/28 reachable / 0 orphans / 0../ 0 dups.Local E2E setup script (DX win)
New
.molecule-ci/scripts/local-e2e-setup.sh— bootstraps the/tmp/local-e2e-deploy/sibling-clone fixture used by workspace-server'sTestLocalE2E_*tests. Idempotent (pulls latest) with--freshto wipe and re-clone. Exits non-zero with diagnostics if the parent template'sdev-leadsymlink is missing or broken (catches stale parent-template clones from before PR #5).Verified locally (2026-05-08)
Refs