feat: add offline Qt6 naming prerequisites and boundary gates
Some checks failed
real-verification / chrome (push) Has been cancelled
real-verification / freecad-oracle (push) Has been cancelled
real-verification / wasm (push) Has been cancelled

This commit is contained in:
2026-08-12 08:17:44 -04:00
parent ca6fe46030
commit 58c0807219
22 changed files with 392 additions and 9 deletions

View File

@@ -0,0 +1,34 @@
#include <emscripten/bind.h>
#include <App/IndexedName.h>
#include <App/MappedName.h>
#include <stdexcept>
#include <string>
namespace
{
std::string freecadPrivateNamingSourceProbe()
{
const Data::IndexedName indexed("Edge12");
if (!indexed || indexed.getIndex() != 12 || std::string(indexed.getType()) != "Edge") {
throw std::runtime_error("FreeCAD IndexedName source probe failed");
}
Data::MappedName name(indexed);
name += ";:M;CUT;:H2a:7,E";
long tag = 0;
int length = 0;
char type = 0;
const int position = name.findTagInElementName(&tag, &length, nullptr, &type);
if (position < 0 || tag != 0x2a || type != 'E') {
throw std::runtime_error("FreeCAD MappedName source probe failed");
}
return name.toString();
}
} // namespace
EMSCRIPTEN_BINDINGS(freecad_private_naming_source_probe)
{
emscripten::function("freecadPrivateNamingSourceProbe", &freecadPrivateNamingSourceProbe);
}

View File

@@ -0,0 +1,27 @@
#pragma once
#define APP_STRING_ID_H
#include <QByteArray>
namespace App
{
class StringIDRef
{
public:
void toBytes(QByteArray& bytes) const
{
bytes.clear();
}
bool operator<(const StringIDRef&) const
{
return false;
}
bool operator==(const StringIDRef&) const
{
return true;
}
};
} // namespace App

View File

@@ -0,0 +1,3 @@
#pragma once
#define FC_LOG_LEVEL_INIT(...)

View File

@@ -0,0 +1,3 @@
#pragma once
#define HAVE_Q_DISABLE_COPY_MOVE

View File

@@ -0,0 +1,16 @@
import createProbe from './dist/freecad-private-naming-source-probe.js'
const probe = await createProbe()
const result = probe.freecadPrivateNamingSourceProbe()
if (result !== 'Edge12;:M;CUT;:H2a:7,E') throw new Error(`Unexpected FreeCAD private naming source probe result: ${result}`)
for (const forbidden of ['freecadNamingAbiVersion', 'freecadNamingCapabilitiesJson', 'freecadNamingEvidenceJson']) {
if (typeof probe[forbidden] === 'function') throw new Error(`Source prerequisite probe must not export production ABI callback ${forbidden}.`)
}
console.log(JSON.stringify({
status: 'source-prerequisite-pass',
freecadVersion: '1.1.1',
sourceCommit: '0108fd4b4850cc46e625b60e53cea7a7bbe69f8d',
linkedSources: ['App/IndexedName.cpp', 'App/MappedName.cpp'],
result,
productionWorkerLinked: false,
}, null, 2))

View File

@@ -43,6 +43,21 @@ publishing the OCCT-only artifact. A successful artifact probe still only
establishes ABI linkage; exact promotion additionally requires valid
MappedNameRef, StringHasher, ElementMap2, stage history, and round-trip evidence.
The repository also carries a prerequisite-only source probe. It builds QtBase
6.8.2 `Qt6Core` for wasm, then compiles the locked FreeCAD `IndexedName.cpp` and
`MappedName.cpp` sources without exporting the production naming callbacks:
```bash
./npmw run build:qt6-wasm-core
./npmw run build:freecad-naming-source-probe
./npmw run test:freecad-naming-source-probe
./npmw run check:freecad-private-naming-boundary
```
Passing this probe establishes that the private source subset and toolchain are
cross-compilable. It does not link the production OCCT Worker, does not close
EX-TSN-02, and does not change `systemExact=false`.
The versioned JSON request carries document `objectId`, stable positive
`objectTag`, prior naming evidence, result object identity, result tag, stage
DAG, STEP/BRep, and OCCT Generated/Modified/Deleted history. No Web fallback is