Preserve artifact file identity and verify hashes

This commit is contained in:
2026-11-25 17:26:31 +00:00
parent fb6c1d3435
commit 3f5b2958cb
3 changed files with 29 additions and 3 deletions

View File

@@ -98,7 +98,7 @@ func (r *restrictedArtifactReader) readFileArtifact(ref promptkit.ArtifactRef) (
// resolveLexicalPath checks cleaned path containment without resolving symlinks.
func (r *restrictedArtifactReader) resolveLexicalPath(rawPath string) (string, error) {
cleanPath := filepath.Clean(strings.TrimSpace(rawPath))
cleanPath := filepath.Clean(rawPath)
candidate := cleanPath
if !filepath.IsAbs(cleanPath) {
candidate = filepath.Join(r.root, cleanPath)