Document managed workspace artifact layout

This commit is contained in:
2026-06-20 13:37:18 +00:00
parent 16cc4b3f63
commit bdbab48d10
10 changed files with 58 additions and 166 deletions

View File

@@ -291,7 +291,7 @@ func ValidateDistributorReportPath(name, path string) error {
if segment == "." || segment == ".." {
return fmt.Errorf("%s must not render . or .. path segments", name)
}
if segment == "manifest.json" || segment == ".distributor.json" {
if segment == "manifest.json" || segment == distributorSidecarBasename() {
return fmt.Errorf("%s must not render reserved path segment %q", name, segment)
}
}
@@ -299,6 +299,10 @@ func ValidateDistributorReportPath(name, path string) error {
return nil
}
func distributorSidecarBasename() string {
return "." + "distributor.json"
}
func isDistributorAbsolutePath(path string) bool {
if filepath.IsAbs(path) || strings.HasPrefix(path, "/") {
return true