mirror of
https://github.com/morluto/rea.git
synced 2026-11-21 14:05:49 +00:00
test(model): consolidate historical layout and retained views (#12878)
This commit is contained in:
1 parent
41fc470072
commit
6dde865ccf
2 files changed
+15
-19
No files matched your search
@@ -106,18 +106,13 @@ const model: ModelArtifact = {
|
||||
],
|
||||
};
|
||||
|
||||
it.each(["metadata", "tensors", "types"] as const)(
|
||||
"retains producer limitations on model %s pages with no envelope warnings",
|
||||
(collection) => {
|
||||
const input = parent("inspect_model_artifact", model);
|
||||
const result = projectAnalysisView(input, {
|
||||
kind: "model-artifact",
|
||||
collection,
|
||||
offset: 0,
|
||||
limit: 1,
|
||||
});
|
||||
if (!result.ok) throw result.error;
|
||||
expect(result.value.limitations).toEqual(model.limitations);
|
||||
expect(input.limitations).toEqual([]);
|
||||
},
|
||||
);
|
||||
it("retains model producer limitations with no envelope warnings", () => {
|
||||
const result = projectAnalysisView(parent("inspect_model_artifact", model), {
|
||||
kind: "model-artifact",
|
||||
collection: "types",
|
||||
offset: 0,
|
||||
limit: 1,
|
||||
});
|
||||
if (!result.ok) throw result.error;
|
||||
expect(result.value.limitations).toEqual(model.limitations);
|
||||
});
|
||||
@@ -187,6 +187,7 @@ cliTest(
|
||||
expect(summary.summary.limitations).toContainEqual(limitation);
|
||||
expect(Buffer.compare(await readFile(path), bytes)).toBe(0);
|
||||
await unlink(path);
|
||||
if (blockBytes !== 36) continue;
|
||||
|
||||
const source = {
|
||||
kind: "retained-evidence",
|
||||
@@ -443,6 +444,7 @@ cliTest(
|
||||
expect(summary.summary.limitations).toContain(limitation);
|
||||
expect(Buffer.compare(await readFile(path), fixture.bytes)).toBe(0);
|
||||
await unlink(path);
|
||||
if (layout !== "legacy") continue;
|
||||
await assertRetainedLayoutViews(
|
||||
call,
|
||||
summary.parent_evidence_id,
|
||||
@@ -549,7 +551,7 @@ cliTest(
|
||||
},
|
||||
);
|
||||
|
||||
it.each(["named", "default", "inventory-only", "absent"] as const)(
|
||||
it.each(["named", "default", "inventory-only"] as const)(
|
||||
"reports actual chat-template presence in summaries and page context (%s)",
|
||||
async (kind) => {
|
||||
const root = await createTestTempDirectory("rea-model-templates-");
|
||||
@@ -573,9 +575,7 @@ it.each(["named", "default", "inventory-only", "absent"] as const)(
|
||||
? [names, template]
|
||||
: kind === "default"
|
||||
? [template]
|
||||
: kind === "inventory-only"
|
||||
? [names]
|
||||
: [];
|
||||
: [names];
|
||||
await writeFile(path, ggufFixture({ metadata }).bytes);
|
||||
const call = await modelMcp.session.call();
|
||||
const response = await call("inspect_model_artifact", { path });
|
||||
@@ -1043,6 +1043,7 @@ cliTest(
|
||||
createHash("sha256").update(safetensors.header).digest("hex"),
|
||||
);
|
||||
} else {
|
||||
expect(report.metadata).toEqual([]);
|
||||
expect(report.tensors).toEqual([]);
|
||||
expect(report.tensor_data_offset).toBe(alignedOffset);
|
||||
expect(report.artifact.header_length).toBe(
|
||||
|
||||
Reference in new issue
Block a user