Save verified native IFC import and user validation evidence

Real IFC2X3/IFC4 import tested. Full BIM authoring/export remains out of scope; 349-second building import performance remains to optimize.
This commit is contained in:
2026-09-16 04:27:37 +08:00
parent 9a7c4f0335
commit 72152ef356
120 changed files with 3020296 additions and 114 deletions

View File

@@ -13,6 +13,8 @@ const git = (args, cwd = native, input) => execFileSync('git', args, {
cwd, env, input, encoding: 'utf8', maxBuffer: 32 * 1024 * 1024,
}).trim();
const parent = git(['rev-parse', 'HEAD']);
const previousSnapshot = process.env.FREECAD_SNAPSHOT_PARENT;
const commitParent = previousSnapshot ? git(['rev-parse', '--verify', `${previousSnapshot}^{commit}`]) : parent;
const branch = `workspace-snapshot-${new Date().toISOString().replace(/[:.]/g, '-')}`;
const excluded = new Set(['node_modules', '.git', '__pycache__', 'dist', 'offline-package',
'continuation-runs', 'periodic-optimization', 'scheduler-bin']);
@@ -31,6 +33,7 @@ function addFiles(relative, predicate = () => true) {
}
addFiles('web/src'); addFiles('web/tools'); addFiles('web/public/api');
addFiles('web/public/samples');
for (const name of ['ifcopenshell-notice.txt', 'ifcopenshell-COPYING.txt', 'ifcopenshell-COPYING.LESSER.txt']) addFiles(`web/public/${name}`);
for (const name of fs.readdirSync(path.join(root, 'web'))) {
if (/\.(html|json|ts)$/.test(name)) addFiles(`web/${name}`);
}
@@ -79,10 +82,10 @@ const unique = [...new Set(entries)].sort();
for (let index = 0; index < unique.length; index += 150)
git([`--git-dir=${gitDir}`, `--work-tree=${root}`, 'add', '-f', '--', ...unique.slice(index, index + 150)], root);
const tree = git(['write-tree']);
const commit = git(['commit-tree', tree, '-p', parent], native,
'Save FreeCAD Web workspace sources and user validation evidence\n\nIFC native binding remains incomplete; preserve accurate test results.\n');
const commit = git(['commit-tree', tree, '-p', commitParent], native,
'Save verified native IFC import and user validation evidence\n\nReal IFC2X3/IFC4 import tested. Full BIM authoring/export remains out of scope; 349-second building import performance remains to optimize.\n');
git(['update-ref', `refs/heads/${branch}`, commit, '0000000000000000000000000000000000000000']);
const receipt = { status: 'committed_locally', branch, commit, parent, sourceTree, externalFiles: unique.length,
const receipt = { status: 'committed_locally', branch, commit, parent: commitParent, sourceBase: parent, sourceTree, externalFiles: unique.length,
nativeChangedFiles: nativeChanged.length, remote: 'https://gitea.meswork.com/wangdequan/FreeCADWasmDev.git',
omissions: ['WASM/build artifacts', 'dependency sources', 'node_modules', 'agent/session logs', 'credentials', 'RAM-backed IfcOpenShell source'],
primaryIndexPreserved: true, mainPreserved: true };