feat(lab): measure RAVNOVES00 R1 quality baseline
This commit is contained in:
@@ -355,6 +355,83 @@ function e37() {
|
||||
};
|
||||
}
|
||||
|
||||
function e38Dimension({
|
||||
accuracy,
|
||||
correct,
|
||||
incorrect,
|
||||
passed,
|
||||
}) {
|
||||
return {
|
||||
correct,
|
||||
incorrect,
|
||||
total: 146,
|
||||
accuracy,
|
||||
target: 0.9,
|
||||
passed,
|
||||
by_stratum: {
|
||||
agree: {
|
||||
correct: 25,
|
||||
incorrect: 4,
|
||||
total: 29,
|
||||
accuracy: 25 / 29,
|
||||
},
|
||||
},
|
||||
confusion: [{
|
||||
reference: "object-present",
|
||||
prediction: "object-present",
|
||||
count: correct,
|
||||
}],
|
||||
};
|
||||
}
|
||||
|
||||
function e38() {
|
||||
return {
|
||||
result_id: `e38-perception-baseline-${"8".repeat(64)}`,
|
||||
created_at_utc: "2026-07-28T02:50:00Z",
|
||||
source_session_id: "20260720T065719Z_viewer_live",
|
||||
source_display_name: "RAVNOVES00",
|
||||
status: "measured-r1-source-scoped-baseline",
|
||||
profile_id: "e38-ravnoves00-r1-development-cart/v1",
|
||||
worker_node: "DESKTOP-OPJ8J04",
|
||||
quality_gate_passed: false,
|
||||
metrics: {
|
||||
development_items: 340,
|
||||
validation_items: 146,
|
||||
terminal_outcomes: 146,
|
||||
accounting_fraction: 1,
|
||||
false_free_claims: 0,
|
||||
high_severity_failures: 14,
|
||||
dimensions: {
|
||||
presence: e38Dimension({
|
||||
accuracy: 0.821918,
|
||||
correct: 120,
|
||||
incorrect: 26,
|
||||
passed: false,
|
||||
}),
|
||||
geometry_association: e38Dimension({
|
||||
accuracy: 0.815068,
|
||||
correct: 119,
|
||||
incorrect: 27,
|
||||
passed: false,
|
||||
}),
|
||||
freshness: e38Dimension({
|
||||
accuracy: 0.952055,
|
||||
correct: 139,
|
||||
incorrect: 7,
|
||||
passed: true,
|
||||
}),
|
||||
},
|
||||
},
|
||||
blocking_checks: [
|
||||
"presence_target_reached",
|
||||
"geometry_association_target_reached",
|
||||
],
|
||||
limitations: ["source-scoped"],
|
||||
authority,
|
||||
access: "read-only",
|
||||
};
|
||||
}
|
||||
|
||||
before(async () => {
|
||||
server = await createServer({
|
||||
appType: "custom",
|
||||
@@ -371,9 +448,9 @@ after(async () => {
|
||||
await server?.close();
|
||||
});
|
||||
|
||||
test("decodes E31–E37 from separate read-only catalogs", async () => {
|
||||
test("decodes E31–E38 from separate read-only catalogs", async () => {
|
||||
const requests = [];
|
||||
const items = [e31(), e32(), e33(), e34(), e35(), e37()];
|
||||
const items = [e31(), e32(), e33(), e34(), e35(), e37(), e38()];
|
||||
const decoded = await fetchAdvancedLaboratoryResults({
|
||||
fetcher: async (input, init) => {
|
||||
requests.push({ input: String(input), method: init?.method });
|
||||
@@ -396,6 +473,9 @@ test("decodes E31–E37 from separate read-only catalogs", async () => {
|
||||
assert.equal(decoded.e37.metrics.reviewedItems, 486);
|
||||
assert.equal(decoded.e37.metrics.validationItems, 146);
|
||||
assert.equal(decoded.e37.qualityTargetEvaluated, false);
|
||||
assert.equal(decoded.e38.metrics.dimensions.presence.accuracy, 0.821918);
|
||||
assert.equal(decoded.e38.metrics.dimensions.freshness.passed, true);
|
||||
assert.equal(decoded.e38.qualityGatePassed, false);
|
||||
assert.deepEqual(requests, [
|
||||
{ input: "/api/v1/laboratory/e31/results?limit=1", method: "GET" },
|
||||
{ input: "/api/v1/laboratory/e32/results?limit=1", method: "GET" },
|
||||
@@ -403,6 +483,7 @@ test("decodes E31–E37 from separate read-only catalogs", async () => {
|
||||
{ input: "/api/v1/laboratory/e34/results?limit=1", method: "GET" },
|
||||
{ input: "/api/v1/laboratory/e35/results?limit=1", method: "GET" },
|
||||
{ input: "/api/v1/laboratory/e37/results?limit=1", method: "GET" },
|
||||
{ input: "/api/v1/laboratory/e38/results?limit=1", method: "GET" },
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -418,7 +499,8 @@ test("rejects authority escalation in an accepted-looking result", async () => {
|
||||
: String(input).includes("/e32/") ? e32()
|
||||
: String(input).includes("/e33/") ? e33()
|
||||
: String(input).includes("/e34/") ? e34()
|
||||
: String(input).includes("/e35/") ? e35() : e37(),
|
||||
: String(input).includes("/e35/") ? e35()
|
||||
: String(input).includes("/e37/") ? e37() : e38(),
|
||||
)), { status: 200 }),
|
||||
}),
|
||||
AdvancedLaboratoryContractError,
|
||||
|
||||
@@ -30,6 +30,10 @@ const e35ResultUrl = new URL(
|
||||
"../src/workspaces/laboratory/E35Result.tsx",
|
||||
import.meta.url,
|
||||
);
|
||||
const e38ResultUrl = new URL(
|
||||
"../src/workspaces/laboratory/E38Result.tsx",
|
||||
import.meta.url,
|
||||
);
|
||||
const e35StylesUrl = new URL(
|
||||
"../src/styles/e35-degradation-recovery.css",
|
||||
import.meta.url,
|
||||
@@ -217,6 +221,24 @@ test("E35 extends the canonical LAB with fault and recovery evidence", async ()
|
||||
);
|
||||
});
|
||||
|
||||
test("E38 reports the frozen R1 baseline through the canonical LAB anatomy", async () => {
|
||||
const [e38Source, advancedSource] = await Promise.all([
|
||||
readFile(e38ResultUrl, "utf8"),
|
||||
readFile(advancedLaboratoryResultUrl, "utf8"),
|
||||
]);
|
||||
|
||||
assert.match(e38Source, /<LaboratoryWorkTemplate/);
|
||||
assert.match(e38Source, /<LaboratoryEvidence/);
|
||||
assert.match(e38Source, /<LaboratoryResultSummary/);
|
||||
assert.match(e38Source, /validation использован только для итоговой оценки/);
|
||||
assert.match(e38Source, /Presence —/);
|
||||
assert.match(e38Source, /R1 и выпуск не приняты/);
|
||||
assert.match(e38Source, /не меняя validation/);
|
||||
assert.doesNotMatch(e38Source, /className="laboratory-(?:summary|result-summary)"/);
|
||||
assert.match(advancedSource, /id: "e38-perception-baseline"/);
|
||||
assert.match(advancedSource, /<E38Result/);
|
||||
});
|
||||
|
||||
test("the primary point-cloud viewer restores from fullscreen on Escape", async () => {
|
||||
const workspacesSource = await readFile(workspacesUrl, "utf8");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user