Publish curated ITWorx-ModelForge source from 990401737f96c8d46a9f7b0d84994516cadcb6a0

This commit is contained in:
Public Source Publisher committed 2026-09-30 09:23:17 +00:00
1 parent 7082ab955a
commit 848f0d8f8a
434 files changed
+67298 -4315

No files matched your search

+24 -1
View File
@@ -27,8 +27,14 @@ function walk(directory, prefix = "") {
const required = [
"README.md", "SECURITY.md", "CONTRIBUTING.md", "LICENSE", "VERSION",
"PUBLIC_SOURCE_EXPORT.md", "PUBLIC_SOURCE_MANIFEST.json", "docker-compose.yml",
"backend/Dockerfile", "frontend/Dockerfile", "node-agent/Dockerfile", "runtime-worker/Dockerfile",
"docker-compose.validation-tls.yml", "deploy/validation/Caddyfile",
"backend/pyproject.toml", "frontend/package.json", "node-agent/pyproject.toml",
"runtime-worker/pyproject.toml"
"runtime-worker/pyproject.toml", "clients/README.md",
"clients/python/modelforge_client.py", "clients/typescript/modelforge-client.mjs",
"clients/typescript/modelforge-client.d.mts", "scripts/m16_chaos.py",
"scripts/m16_invariants.py", "scripts/m16_soak.py", "scripts/operator_identity.py",
"scripts/rc_isolation_preflight.py", "scripts/rc_stack_retention.py"
];
const missing = required.filter((entry) => !fs.existsSync(path.join(process.cwd(), entry)));
if (missing.length > 0) {
@@ -46,6 +52,7 @@ if (
manifest.schemaVersion !== 1 ||
typeof manifest.sourceRevision !== "string" ||
!/^[0-9a-f]{40}$/u.test(manifest.sourceRevision) ||
manifest.sourceRepository !== "https://git.example.com/example/modelforge" ||
!Array.isArray(manifest.files) ||
manifest.files.length === 0
) {
@@ -53,6 +60,7 @@ if (
}
const declared = new Set();
const manifestEntries = new Map();
for (const entry of manifest.files) {
if (
!entry ||
@@ -71,6 +79,7 @@ for (const entry of manifest.files) {
const collisionKey = entry.path.toLocaleLowerCase("en-US");
if (declared.has(collisionKey)) fail(`Duplicate manifest path: ${entry.path}`);
declared.add(collisionKey);
manifestEntries.set(entry.path, entry);
const absolutePath = path.join(process.cwd(), ...entry.path.split("/"));
if (!fs.existsSync(absolutePath)) fail(`Manifest file is missing: ${entry.path}`);
@@ -84,6 +93,20 @@ for (const entry of manifest.files) {
if (digest !== entry.sha256) fail(`Manifest hash mismatch: ${entry.path}`);
}
for (const relativePath of [
"backend/Dockerfile", "frontend/Dockerfile", "node-agent/Dockerfile", "runtime-worker/Dockerfile"
]) {
const entry = manifestEntries.get(relativePath);
if (!entry) fail(`Manifest does not bind ${relativePath}`);
const text = fs.readFileSync(relativePath, "utf8");
const labels = [...text.matchAll(
/^LABEL\s+org\.opencontainers\.image\.source="([^"]+)"\s*$/gmu
)];
if (labels.length !== 1 || labels[0][1] !== manifest.sourceRepository) {
fail(`${relativePath} source label does not match the manifest sourceRepository`);
}
}
const generated = new Set(["public_source_export.md", "public_source_manifest.json"]);
const unexpected = walk(process.cwd()).filter(
(entry) => !declared.has(entry.toLocaleLowerCase("en-US")) &&