Reuse checked reflection inputs before acquiring controller ownership
This commit is contained in:
@@ -385,7 +385,8 @@ test("public reflection contains nominal contracts and callable descriptors with
|
||||
components: [],
|
||||
routes: {},
|
||||
};
|
||||
const snapshot = publicDefinitionSnapshot(plan, installation);
|
||||
const kernel = compileKernelProgram(plan) as import("../src/execution-world/inspection.js").InspectionKernel;
|
||||
const snapshot = publicDefinitionSnapshot(plan, installation, kernel);
|
||||
assert.ok(snapshot.rows.interfaces.length);
|
||||
assert.ok(snapshot.rows.queries.length);
|
||||
assert.ok(snapshot.rows.conformances.length);
|
||||
@@ -400,5 +401,13 @@ test("public reflection contains nominal contracts and callable descriptors with
|
||||
assert.ok(!publicText.includes('"' + privateKey + '"'), privateKey);
|
||||
assert.ok(publicText.includes('"descriptor"'));
|
||||
assert.ok(publicText.includes('"scope":"class"'));
|
||||
assert.equal(snapshot.id, publicDefinitionSnapshot(plan, installation).id);
|
||||
assert.equal(snapshot.id, publicDefinitionSnapshot(plan, installation, kernel).id);
|
||||
// Historical checked availability must survive a newer host compiler. If
|
||||
// reflection silently regenerates the Kernel, this evidence disappears.
|
||||
const historical = structuredClone(kernel);
|
||||
const installed = historical.operations.find((operation) => !operation.unsupported)!;
|
||||
assert.ok(installed);
|
||||
installed.unsupported = "CHECKED_HISTORICAL_UNSUPPORTED";
|
||||
const historicalSnapshot = publicDefinitionSnapshot(plan, installation, historical);
|
||||
assert.match(JSON.stringify(historicalSnapshot.rows.conformances), /CHECKED_HISTORICAL_UNSUPPORTED/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user