chore: checkpoint web Blender migration source, tools and docs
Accumulated uncommitted work: GHOST Web backend, WebGL/GPU web layer, web workflow engine and protocol, tooling, docs and task records. Large generated evidence, user-testing archives, build snapshots and imported test assets remain untracked. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,7 @@ export const SERVER_OPERATOR_JOB_BUDGET = {
|
||||
maxPropertiesBytes: 64 * 1024,
|
||||
maxPropertyCount: 128,
|
||||
maxStringPropertyBytes: 4096,
|
||||
maxArrayLength: 64,
|
||||
maxSourceBytes: 512 * 1024 * 1024,
|
||||
minTimeoutMs: 1000,
|
||||
maxTimeoutMs: 10 * 60 * 1000,
|
||||
@@ -155,10 +156,15 @@ function validateProperties(value: unknown): Record<string, BlenderOperatorPrope
|
||||
if (entries.length > SERVER_OPERATOR_JOB_BUDGET.maxPropertyCount) throw new ServerOperatorJobValidationError("properties exceed the property-count budget");
|
||||
for (const [key, item] of entries) {
|
||||
if (!KEY.test(key)) throw new ServerOperatorJobValidationError(`property key ${key} is invalid`);
|
||||
if (!((typeof item === "string" && new TextEncoder().encode(item).byteLength <= SERVER_OPERATOR_JOB_BUDGET.maxStringPropertyBytes) ||
|
||||
(typeof item === "number" && Number.isFinite(item)) || typeof item === "boolean")) {
|
||||
throw new ServerOperatorJobValidationError(`property ${key} must be a bounded typed scalar`);
|
||||
const scalar = (part: unknown): boolean => (typeof part === "string" && new TextEncoder().encode(part).byteLength <= SERVER_OPERATOR_JOB_BUDGET.maxStringPropertyBytes) ||
|
||||
(typeof part === "number" && Number.isFinite(part)) || typeof part === "boolean";
|
||||
if (Array.isArray(item)) {
|
||||
if (item.length > SERVER_OPERATOR_JOB_BUDGET.maxArrayLength ||
|
||||
Array.from(item).some((part) => !scalar(part) || typeof part !== typeof item[0])) {
|
||||
throw new ServerOperatorJobValidationError(`property ${key} must be a bounded homogeneous array`);
|
||||
}
|
||||
}
|
||||
else if (!scalar(item)) throw new ServerOperatorJobValidationError(`property ${key} must be a bounded scalar or array`);
|
||||
}
|
||||
if (new TextEncoder().encode(stableJSON(value)).byteLength > SERVER_OPERATOR_JOB_BUDGET.maxPropertiesBytes) throw new ServerOperatorJobValidationError("properties exceed the byte budget");
|
||||
return value as Record<string, BlenderOperatorPropertyValue>;
|
||||
|
||||
Reference in New Issue
Block a user