Spaces:
Running
Running
Pass-1 verdicts Space; conversion locks until pass 1 is complete
Browse files
app.js
CHANGED
|
@@ -237,7 +237,7 @@ function stampClass(values) {
|
|
| 237 |
// The stamp inks in the verdict's own color; any failing answer turns it red.
|
| 238 |
const vals = Object.values(values);
|
| 239 |
if (vals.includes("no_match") || vals.includes("no")) return "v-no_match";
|
| 240 |
-
if (vals.includes("no_answer")) return "v-no_answer";
|
| 241 |
return "v-match";
|
| 242 |
}
|
| 243 |
|
|
@@ -509,6 +509,36 @@ async function boot() {
|
|
| 509 |
}
|
| 510 |
|
| 511 |
await ensureResultsRepo();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 512 |
// Merge remote history with the local log, remote order first (mergeEvents).
|
| 513 |
// A pull FAILURE is not "no file yet": grading continues from the local log,
|
| 514 |
// and because every push re-pulls first, nothing can be overwritten blind.
|
|
|
|
| 237 |
// The stamp inks in the verdict's own color; any failing answer turns it red.
|
| 238 |
const vals = Object.values(values);
|
| 239 |
if (vals.includes("no_match") || vals.includes("no")) return "v-no_match";
|
| 240 |
+
if (vals.includes("no_answer") || vals.includes("borderline")) return "v-no_answer";
|
| 241 |
return "v-match";
|
| 242 |
}
|
| 243 |
|
|
|
|
| 509 |
}
|
| 510 |
|
| 511 |
await ensureResultsRepo();
|
| 512 |
+
|
| 513 |
+
// Ordering gate: a task can require another task's completion first (the
|
| 514 |
+
// conversion fidelity pass must not open before the blind verdict pass,
|
| 515 |
+
// because it reveals which items the filter kept).
|
| 516 |
+
if (CONFIG.requires) {
|
| 517 |
+
let done = 0;
|
| 518 |
+
try {
|
| 519 |
+
const blob = await downloadFile({
|
| 520 |
+
repo: state.resultsRepo, accessToken: state.auth.accessToken,
|
| 521 |
+
path: `${CONFIG.requires.task}/${state.user}.jsonl`,
|
| 522 |
+
});
|
| 523 |
+
if (blob !== null) {
|
| 524 |
+
const rows = (await blob.text()).split("\n").filter(Boolean).map((l) => JSON.parse(l));
|
| 525 |
+
done = [...latestByKey(rows).values()]
|
| 526 |
+
.filter((ev) => !ev.warmup && CONFIG.requires.fields.every((f) => ev[f])).length;
|
| 527 |
+
}
|
| 528 |
+
} catch { /* unreadable counts as not done — the gate stays shut */ }
|
| 529 |
+
if (done < CONFIG.requires.count) {
|
| 530 |
+
$("#main").replaceChildren(el("p", null,
|
| 531 |
+
`${CONFIG.requires.label} must be finished first — you have graded ` +
|
| 532 |
+
`${done} of ${CONFIG.requires.count} items there. This pass reveals ` +
|
| 533 |
+
"information that must not color that one, so it stays locked until " +
|
| 534 |
+
"you are done."));
|
| 535 |
+
const link = el("a", "open-out", CONFIG.requires.url);
|
| 536 |
+
link.href = CONFIG.requires.url; link.rel = "noopener";
|
| 537 |
+
$("#main").append(link);
|
| 538 |
+
return;
|
| 539 |
+
}
|
| 540 |
+
}
|
| 541 |
+
|
| 542 |
// Merge remote history with the local log, remote order first (mergeEvents).
|
| 543 |
// A pull FAILURE is not "no file yet": grading continues from the local log,
|
| 544 |
// and because every push re-pulls first, nothing can be overwritten blind.
|
config.js
CHANGED
|
@@ -2,7 +2,7 @@ window.CONFIG = {
|
|
| 2 |
task: "conversion",
|
| 3 |
title: "Conversion audit — 152 items",
|
| 4 |
itemsPath: "conversion_items.json",
|
| 5 |
-
build: "
|
| 6 |
landing: "You will judge whether each rewritten exam question still asks the same "
|
| 7 |
+ "question as the original, and whether it stands on its own without the answer "
|
| 8 |
+ "options. 152 items plus 3 discussable warm-ups; expect roughly 1.5–2 hours, "
|
|
@@ -29,6 +29,10 @@ window.CONFIG = {
|
|
| 29 |
hotkeys: { "1":["same_question","yes"], "2":["same_question","no"],
|
| 30 |
"3":["self_contained","yes"], "4":["self_contained","no"] },
|
| 31 |
notePlaceholder: "why (optional)",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
isComplete: (ev) => !!(ev.same_question && ev.self_contained),
|
| 33 |
valuesOf: (ev) => ({ same_question: ev.same_question, self_contained: ev.self_contained }),
|
| 34 |
summarize: (v) => `same:${v.same_question} self:${v.self_contained}`,
|
|
|
|
| 2 |
task: "conversion",
|
| 3 |
title: "Conversion audit — 152 items",
|
| 4 |
itemsPath: "conversion_items.json",
|
| 5 |
+
build: "ef8b962-p1space",
|
| 6 |
landing: "You will judge whether each rewritten exam question still asks the same "
|
| 7 |
+ "question as the original, and whether it stands on its own without the answer "
|
| 8 |
+ "options. 152 items plus 3 discussable warm-ups; expect roughly 1.5–2 hours, "
|
|
|
|
| 29 |
hotkeys: { "1":["same_question","yes"], "2":["same_question","no"],
|
| 30 |
"3":["self_contained","yes"], "4":["self_contained","no"] },
|
| 31 |
notePlaceholder: "why (optional)",
|
| 32 |
+
requires: { task: "verdicts", count: 248,
|
| 33 |
+
fields: ["converts", "answer_stands_alone"],
|
| 34 |
+
label: "Pass 1 (the blind verdict audit)",
|
| 35 |
+
url: "https://localgate-audit-verdicts.static.hf.space" },
|
| 36 |
isComplete: (ev) => !!(ev.same_question && ev.self_contained),
|
| 37 |
valuesOf: (ev) => ({ same_question: ev.same_question, self_contained: ev.self_contained }),
|
| 38 |
summarize: (v) => `same:${v.same_question} self:${v.self_contained}`,
|