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
if(changed.mode!=="100644"&&changed.mode!=="100755"||typeofchanged.content!=="string")thrownewError("Publication file is not an approved regular file.")
thrownewError("Runner workspace changed after approval; refusing publication.")
74
106
}
75
107
}
76
108
@@ -121,7 +153,7 @@ function validateChangedFiles(files: RunnerWorkspaceChangedFile[], writablePaths
121
153
for(constfileoffiles){
122
154
constpath=file.relativePath.replaceAll("\\","/")
123
155
if(!path||path.startsWith("/")||path.split("/").some((part)=>part===""||part==="."||part===".."||part===".git"||part===".codebox"))thrownewError(`Changed file has a denied path: ${file.relativePath}`)
124
-
if(![file.beforeMode,file.afterMode].filter(Boolean).every((mode)=>mode==="100644"))thrownewError(`Changed file has an unsupported mode: ${file.relativePath}`)
156
+
if(![file.beforeMode,file.afterMode].filter(Boolean).every((mode)=>mode==="100644"||mode==="100755"))thrownewError(`Changed file has an unsupported mode: ${file.relativePath}`)
125
157
if(!writablePaths.some((pattern)=>relativePathMatchesExcludePattern(path,pattern)))thrownewError(`Changed file is outside writable_paths: ${file.relativePath}`)
126
158
}
127
159
}
@@ -133,7 +165,53 @@ function validatePatchPaths(patch: string, changed: RunnerWorkspaceChangedFile[]
if(paths.length===0||paths.some((path)=>!declared.has(path)))thrownewError("Patch paths do not exactly correspond to canonical changed-files.")
168
+
if(paths.length===0||paths.some((path)=>!declared.has(path))||[...declared].some((path)=>!paths.includes(path)))thrownewError("Patch paths do not exactly correspond to canonical changed-files.")
if(actual.size!==declared.size||[...actual].some((path)=>!declared.has(path)))thrownewError("Applied workspace differs from the canonical changed-files manifest.")
207
+
for(constfileofchanged){
208
+
constvalue=after.get(file.relativePath)
209
+
if(file.status==="deleted"){
210
+
if(value)thrownewError(`Canonical deletion was not applied: ${file.relativePath}`)
211
+
continue
212
+
}
213
+
if(!value||value.mode!==file.afterMode)thrownewError(`Applied file mode does not match canonical manifest: ${file.relativePath}`)
0 commit comments