ultra11y 5.57.2 → 5.57.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.opencode/plugins/ultra11y.js +1 -1
- package/package.json +1 -1
- package/scripts/ultra11y.mjs +43 -11
- package/skills/review-a11y/SKILL.md +1 -1
- package/skills/review-a11y/scripts/ultra11y.mjs +43 -11
- package/skills/ultra11y/SKILL.md +1 -1
- package/skills/ultra11y/references/mcp.md +2 -1
- package/skills/ultra11y/references/orchestrators.md +7 -5
- package/skills/ultra11y/references/verify.md +5 -1
- package/skills/ultra11y/scripts/ultra11y.mjs +43 -11
- package/skills/ultra11y/templates/gitlab-ci.yml +1 -1
- package/src/adjudicate.ts +40 -8
- package/src/cli.ts +23 -4
- package/src/mcp/handlers.ts +1 -0
- package/src/mcp/tools.ts +2 -1
- package/src/types.ts +1 -1
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"name": "ultra11y",
|
|
11
11
|
"source": "./",
|
|
12
12
|
"description": "RGAA 4.1.2 accessibility audits on a WCAG 2.2 AA core: automatic review before commit, push and pull request, plus dated, evidenced Markdown, HTML and per-page conformance reports in Claude Code.",
|
|
13
|
-
"version": "5.57.
|
|
13
|
+
"version": "5.57.3",
|
|
14
14
|
"author": { "name": "maxgfr" },
|
|
15
15
|
"homepage": "https://github.com/SocialGouv/ultra11y",
|
|
16
16
|
"repository": "https://github.com/SocialGouv/ultra11y",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultra11y",
|
|
3
3
|
"description": "RGAA 4.1.2 accessibility audits, the French State's standard, on a WCAG 2.2 AA core: automatic review before commit, push and pull request, plus dated, evidenced Markdown, HTML and per-page conformance reports. Never declares conforming what it has not verified.",
|
|
4
|
-
"version": "5.57.
|
|
4
|
+
"version": "5.57.3",
|
|
5
5
|
"author": { "name": "maxgfr" },
|
|
6
6
|
"homepage": "https://github.com/SocialGouv/ultra11y",
|
|
7
7
|
"repository": "https://github.com/SocialGouv/ultra11y",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultra11y",
|
|
3
3
|
"description": "RGAA 4.1.2 accessibility audits, the French State's standard, on a WCAG 2.2 AA core: automatic review before commit, push and pull request, plus dated, evidenced Markdown, HTML and per-page conformance reports. Never declares conforming what it has not verified.",
|
|
4
|
-
"version": "5.57.
|
|
4
|
+
"version": "5.57.3",
|
|
5
5
|
"author": { "name": "maxgfr", "url": "https://github.com/maxgfr" },
|
|
6
6
|
"homepage": "https://github.com/SocialGouv/ultra11y",
|
|
7
7
|
"repository": "https://github.com/SocialGouv/ultra11y",
|
|
@@ -44,7 +44,7 @@ import { fileURLToPath } from "node:url";
|
|
|
44
44
|
// does not carry it, so a user's own ultra11y.js is never clobbered. Kept as text, not as
|
|
45
45
|
// an export (see above).
|
|
46
46
|
const ULTRA11Y_OPENCODE_PLUGIN = "ULTRA11Y_OPENCODE_PLUGIN";
|
|
47
|
-
const ULTRA11Y_PLUGIN_VERSION = "5.57.
|
|
47
|
+
const ULTRA11Y_PLUGIN_VERSION = "5.57.3";
|
|
48
48
|
const PLUGIN_ID = "ultra11y";
|
|
49
49
|
const SKILL_NAMES = ["ultra11y", "review-a11y"];
|
|
50
50
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultra11y",
|
|
3
|
-
"version": "5.57.
|
|
3
|
+
"version": "5.57.3",
|
|
4
4
|
"description": "Audit d'accessibilité RGAA 4.1.2, le référentiel de l'État : rapport daté, grille des 106 critères, backlog et tickets. Moteur statique, navigateur et jugement IA contre-vérifié. Il ne déclare jamais conforme ce qu'il n'a pas vérifié. Socle WCAG 2.2 AA.",
|
|
5
5
|
"homepage": "https://socialgouv.github.io/ultra11y/",
|
|
6
6
|
"type": "module",
|
package/scripts/ultra11y.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { join as join56, relative as relative7, resolve as resolve19, sep as sep
|
|
|
6
6
|
import { fileURLToPath as fileURLToPath6, pathToFileURL as pathToFileURL3 } from "url";
|
|
7
7
|
|
|
8
8
|
// src/types.ts
|
|
9
|
-
var VERSION = "5.57.
|
|
9
|
+
var VERSION = "5.57.3";
|
|
10
10
|
var SCHEMA_VERSION = 2;
|
|
11
11
|
function isAdjudicated(by) {
|
|
12
12
|
return by === "agent" || by === "human";
|
|
@@ -68627,6 +68627,11 @@ function applyAdjudication(audit2, adj, opts = {}) {
|
|
|
68627
68627
|
else itemIssues.set(criteriaId, [issue]);
|
|
68628
68628
|
};
|
|
68629
68629
|
const uncovered = (criteriaId) => notFolded.add(criteriaId);
|
|
68630
|
+
const gapIssues = /* @__PURE__ */ new Map();
|
|
68631
|
+
const gap = (criteriaId) => {
|
|
68632
|
+
notFolded.add(criteriaId);
|
|
68633
|
+
gapIssues.set(criteriaId, `criterion ${criteriaId}: missing from the adjudication (coverage gap)`);
|
|
68634
|
+
};
|
|
68630
68635
|
canonicalizeAdjudication(adj);
|
|
68631
68636
|
const itemCounts = /* @__PURE__ */ new Map();
|
|
68632
68637
|
for (const item of adj.items) itemCounts.set(item.criteriaId, (itemCounts.get(item.criteriaId) ?? 0) + 1);
|
|
@@ -68642,14 +68647,14 @@ function applyAdjudication(audit2, adj, opts = {}) {
|
|
|
68642
68647
|
open.add(item.criteriaId);
|
|
68643
68648
|
if (byId2.has(item.criteriaId)) continue;
|
|
68644
68649
|
if (Object.hasOwn(expected, item.criteriaId)) uncovered(item.criteriaId);
|
|
68645
|
-
else
|
|
68650
|
+
else gap(item.criteriaId);
|
|
68646
68651
|
}
|
|
68647
68652
|
} else {
|
|
68648
68653
|
for (const r of audit2.residualRisks) {
|
|
68649
68654
|
open.add(r.criteriaId);
|
|
68650
68655
|
if (byId2.has(r.criteriaId)) continue;
|
|
68651
68656
|
if (Object.hasOwn(expected, r.criteriaId)) uncovered(r.criteriaId);
|
|
68652
|
-
else
|
|
68657
|
+
else gap(r.criteriaId);
|
|
68653
68658
|
}
|
|
68654
68659
|
}
|
|
68655
68660
|
for (const it of adj.items) {
|
|
@@ -68832,13 +68837,25 @@ function applyAdjudication(audit2, adj, opts = {}) {
|
|
|
68832
68837
|
}
|
|
68833
68838
|
}
|
|
68834
68839
|
}
|
|
68835
|
-
|
|
68836
|
-
|
|
68840
|
+
const notInWorklist = [...gapIssues.keys()];
|
|
68841
|
+
if (opts.strict && (issues.length || notInWorklist.length)) {
|
|
68842
|
+
return {
|
|
68843
|
+
ok: false,
|
|
68844
|
+
audit: audit2,
|
|
68845
|
+
issues: [...gapIssues.values(), ...issues],
|
|
68846
|
+
applied: 0,
|
|
68847
|
+
stillManual: 0,
|
|
68848
|
+
rejected: 0,
|
|
68849
|
+
rejectedCriteria: [],
|
|
68850
|
+
notInWorklist,
|
|
68851
|
+
grounding
|
|
68852
|
+
};
|
|
68837
68853
|
}
|
|
68838
68854
|
const rejectedCriteria = adj.items.map((it) => it.criteriaId).filter((id) => itemIssues.has(id));
|
|
68839
68855
|
for (const id of itemIssues.keys()) if (!rejectedCriteria.includes(id)) rejectedCriteria.push(id);
|
|
68840
68856
|
const rejectedSet = notFolded;
|
|
68841
|
-
const rejectedWhy = (id) => expected[id] ?? residualRejectedReason(itemIssues.get(id)?.[0] ?? "refused by the gate");
|
|
68857
|
+
const rejectedWhy = (id) => expected[id] ?? (gapIssues.has(id) ? residualNotInWorklistReason() : residualRejectedReason(itemIssues.get(id)?.[0] ?? "refused by the gate"));
|
|
68858
|
+
const complete = issues.length === 0 && notInWorklist.length === 0;
|
|
68842
68859
|
const next = structuredClone(audit2);
|
|
68843
68860
|
const critById = new Map(next.criteria.map((c2) => [c2.id, c2]));
|
|
68844
68861
|
const newFindings = [];
|
|
@@ -68898,7 +68915,7 @@ function applyAdjudication(audit2, adj, opts = {}) {
|
|
|
68898
68915
|
next.packAdjudication = { standard: adj.standard, criteria: [...carried.values()] };
|
|
68899
68916
|
next.findings = [...next.findings, ...newFindings];
|
|
68900
68917
|
next.adjudicated = { date: adj.auditDate, applied, stillManual, ...rejectedCriteria.length ? { rejected: rejectedCriteria.length } : {} };
|
|
68901
|
-
return { ok:
|
|
68918
|
+
return { ok: complete, audit: next, issues, applied, stillManual, rejected: rejectedCriteria.length, rejectedCriteria, notInWorklist, grounding };
|
|
68902
68919
|
}
|
|
68903
68920
|
for (const it of adj.items) {
|
|
68904
68921
|
const c2 = critById.get(it.criteriaId);
|
|
@@ -68942,7 +68959,7 @@ function applyAdjudication(audit2, adj, opts = {}) {
|
|
|
68942
68959
|
next.residualRisks = next.residualRisks.filter((r) => byId2.get(r.criteriaId)?.verdict === "manual" || rejectedSet.has(r.criteriaId)).map((r) => rejectedSet.has(r.criteriaId) ? { ...r, reason: rejectedWhy(r.criteriaId) } : r);
|
|
68943
68960
|
recomputeTallies(next);
|
|
68944
68961
|
next.adjudicated = { date: adj.auditDate, applied, stillManual, ...rejectedCriteria.length ? { rejected: rejectedCriteria.length } : {} };
|
|
68945
|
-
return { ok:
|
|
68962
|
+
return { ok: complete, audit: next, issues, applied, stillManual, rejected: rejectedCriteria.length, rejectedCriteria, notInWorklist, grounding };
|
|
68946
68963
|
}
|
|
68947
68964
|
function agentSeverity(v, advisory) {
|
|
68948
68965
|
if (v === "bloquant" || v === "majeur" || v === "mineur") return v;
|
|
@@ -69008,6 +69025,7 @@ function recomputeTallies(a) {
|
|
|
69008
69025
|
}
|
|
69009
69026
|
var residualScanReason = () => "Rendering criterion \u2014 decide on the rendered DOM (`scan`).";
|
|
69010
69027
|
var residualUndecidableReason = () => "Left as an explicit residual risk (not decidable from the available evidence).";
|
|
69028
|
+
var residualNotInWorklistReason = () => "Not in the adjudication that was folded (coverage gap) \u2014 no verdict was offered, so none was refused. Adjudicate this criterion.";
|
|
69011
69029
|
var residualRejectedReason = (why) => `Adjudication refused by the gate \u2014 ${why.replace(/^criterion \S+: /, "")}. Re-adjudicate this criterion.`;
|
|
69012
69030
|
var SNIPPET_SHOWN = 200;
|
|
69013
69031
|
var CAPTURE_FILES = ["dom.html", "styles.json", "boxes.json", "css.json", "probes.json", "axe.json", "axtree.json", "screen.png"];
|
|
@@ -77799,6 +77817,7 @@ function handleFold(args2, cwd) {
|
|
|
77799
77817
|
stillManual: r.stillManual,
|
|
77800
77818
|
rejected: r.rejected,
|
|
77801
77819
|
rejectedCriteria: r.rejectedCriteria,
|
|
77820
|
+
notInWorklist: r.notInWorklist,
|
|
77802
77821
|
issues: r.issues,
|
|
77803
77822
|
conformancePct: r.audit.conformancePct,
|
|
77804
77823
|
grounding: r.grounding
|
|
@@ -78335,7 +78354,7 @@ var WRITE_TOOLS = [
|
|
|
78335
78354
|
{
|
|
78336
78355
|
name: "ultra11y_fold",
|
|
78337
78356
|
title: "Fold an adjudication into the audit",
|
|
78338
|
-
description: "WRITES TO THE PROJECT (with write:true): land the verdicts you wrote on the ultra11y_adjudicate worklist \u2014 the counterpart of `verify --apply`. Send the decisions only (criteriaId, verdict, justification, citations, findings, reason): the server re-derives the evidence and applies the SAME gate \u2014 a C must cite the evidence it cleared, an NC must carry groundable findings. Partial by default: a refused verdict stays \xAB to assess \xBB and is listed in rejectedCriteria with its reason; strict:true lands nothing if anything is refused. Dry-run by default (the gate's verdict, nothing written); write:true writes <out>/audit-latest.json, and ledger:true records the ACCEPTED verdicts in the verdict ledger.",
|
|
78357
|
+
description: "WRITES TO THE PROJECT (with write:true): land the verdicts you wrote on the ultra11y_adjudicate worklist \u2014 the counterpart of `verify --apply`. Send the decisions only (criteriaId, verdict, justification, citations, findings, reason): the server re-derives the evidence and applies the SAME gate \u2014 a C must cite the evidence it cleared, an NC must carry groundable findings. Partial by default: a refused verdict stays \xAB to assess \xBB and is listed in rejectedCriteria with its reason; an open criterion the file never mentions is not a refusal and is listed apart in notInWorklist; strict:true lands nothing if anything is refused. Dry-run by default (the gate's verdict, nothing written); write:true writes <out>/audit-latest.json, and ledger:true records the ACCEPTED verdicts in the verdict ledger.",
|
|
78339
78358
|
inputSchema: {
|
|
78340
78359
|
type: "object",
|
|
78341
78360
|
properties: {
|
|
@@ -81964,6 +81983,7 @@ function replayLedgerFile(p, ledger, lang) {
|
|
|
81964
81983
|
stillManual: r.stillManual,
|
|
81965
81984
|
rejected: r.rejected,
|
|
81966
81985
|
rejectedCriteria: r.rejectedCriteria,
|
|
81986
|
+
notInWorklist: r.notInWorklist,
|
|
81967
81987
|
replayed: rp.fresh.length,
|
|
81968
81988
|
stale: rp.stale,
|
|
81969
81989
|
obsolete: rp.obsolete,
|
|
@@ -81995,6 +82015,13 @@ function replayLedgerFile(p, ledger, lang) {
|
|
|
81995
82015
|
}
|
|
81996
82016
|
return 0;
|
|
81997
82017
|
}
|
|
82018
|
+
function reportNotInWorklist(ids2, lang) {
|
|
82019
|
+
if (!ids2.length) return;
|
|
82020
|
+
const shown = ids2.slice(0, 40).join(", ") + (ids2.length > 40 ? ` \u2026 +${ids2.length - 40}` : "");
|
|
82021
|
+
console.error(
|
|
82022
|
+
lang === "fr" ? `\u2139 ${ids2.length} crit\xE8re(s) hors de la liste \u2014 absent(s) de ce fichier, rien n'a \xE9t\xE9 refus\xE9 ; ils restent \xE0 \xE9valuer : ${shown}` : `\u2139 ${ids2.length} criterion(ia) not in this worklist \u2014 absent from this file, nothing was refused; they stay to assess: ${shown}`
|
|
82023
|
+
);
|
|
82024
|
+
}
|
|
81998
82025
|
function applyAdjudicationFile(p, adj, lang) {
|
|
81999
82026
|
const inFlag = p.flags.in;
|
|
82000
82027
|
if (typeof inFlag !== "string" || !inFlag) {
|
|
@@ -82019,6 +82046,7 @@ function applyAdjudicationFile(p, adj, lang) {
|
|
|
82019
82046
|
else {
|
|
82020
82047
|
console.error(lang === "fr" ? `\u2717 Adjudication rejet\xE9e (${r.issues.length} probl\xE8me(s)) :` : `\u2717 Adjudication rejected (${r.issues.length} issue(s)):`);
|
|
82021
82048
|
for (const i2 of r.issues) console.error(` \u2717 ${i2}`);
|
|
82049
|
+
reportNotInWorklist(r.notInWorklist, lang);
|
|
82022
82050
|
}
|
|
82023
82051
|
return 1;
|
|
82024
82052
|
}
|
|
@@ -82028,6 +82056,7 @@ function applyAdjudicationFile(p, adj, lang) {
|
|
|
82028
82056
|
);
|
|
82029
82057
|
for (const i2 of r.issues) console.error(` \u2717 ${i2}`);
|
|
82030
82058
|
}
|
|
82059
|
+
if (!p.flags.json) reportNotInWorklist(r.notInWorklist, lang);
|
|
82031
82060
|
const out2 = typeof p.flags.out === "string" ? p.flags.out : ".";
|
|
82032
82061
|
mkdirSync20(out2, { recursive: true });
|
|
82033
82062
|
const auditPath = join56(out2, "audit-latest.json");
|
|
@@ -82058,6 +82087,7 @@ function applyAdjudicationFile(p, adj, lang) {
|
|
|
82058
82087
|
stillManual: r.stillManual,
|
|
82059
82088
|
rejected: r.rejected,
|
|
82060
82089
|
rejectedCriteria: r.rejectedCriteria,
|
|
82090
|
+
notInWorklist: r.notInWorklist,
|
|
82061
82091
|
issues: r.issues,
|
|
82062
82092
|
conformancePct: r.audit.conformancePct,
|
|
82063
82093
|
findings: r.audit.findings.length,
|
|
@@ -82069,7 +82099,7 @@ function applyAdjudicationFile(p, adj, lang) {
|
|
|
82069
82099
|
);
|
|
82070
82100
|
else
|
|
82071
82101
|
console.log(
|
|
82072
|
-
lang === "fr" ? `\u2713 ${r.applied} crit\xE8re(s) adjug\xE9(s), ${r.stillManual} laiss\xE9(s) en r\xE9siduel${r.rejected ? `, ${r.rejected} refus\xE9(s)` : ""} \u2192 ${auditPath}` : `\u2713 ${r.applied} criterion(ia) adjudicated, ${r.stillManual} left residual${r.rejected ? `, ${r.rejected} refused` : ""} \u2192 ${auditPath}`
|
|
82102
|
+
lang === "fr" ? `\u2713 ${r.applied} crit\xE8re(s) adjug\xE9(s), ${r.stillManual} laiss\xE9(s) en r\xE9siduel${r.rejected ? `, ${r.rejected} refus\xE9(s)` : ""}${r.notInWorklist.length ? `, ${r.notInWorklist.length} hors de la liste` : ""} \u2192 ${auditPath}` : `\u2713 ${r.applied} criterion(ia) adjudicated, ${r.stillManual} left residual${r.rejected ? `, ${r.rejected} refused` : ""}${r.notInWorklist.length ? `, ${r.notInWorklist.length} not in this worklist` : ""} \u2192 ${auditPath}`
|
|
82073
82103
|
);
|
|
82074
82104
|
return 0;
|
|
82075
82105
|
}
|
|
@@ -82343,6 +82373,7 @@ async function cmdJudge(p) {
|
|
|
82343
82373
|
console.error(lang === "fr" ? `\u2717 Adjudication rejet\xE9e (${r.issues.length} probl\xE8me(s)) :` : `\u2717 Adjudication rejected (${r.issues.length} issue(s)):`);
|
|
82344
82374
|
for (const i2 of r.issues.slice(0, 40)) console.error(` \u2717 ${i2}`);
|
|
82345
82375
|
if (r.issues.length > 40) console.error(` \u2026 +${r.issues.length - 40}`);
|
|
82376
|
+
reportNotInWorklist(r.notInWorklist, lang);
|
|
82346
82377
|
return 1;
|
|
82347
82378
|
}
|
|
82348
82379
|
if (r.rejected > 0) {
|
|
@@ -82352,6 +82383,7 @@ async function cmdJudge(p) {
|
|
|
82352
82383
|
for (const i2 of r.issues.slice(0, 40)) console.error(` \u2717 ${i2}`);
|
|
82353
82384
|
if (r.issues.length > 40) console.error(` \u2026 +${r.issues.length - 40}`);
|
|
82354
82385
|
}
|
|
82386
|
+
reportNotInWorklist(r.notInWorklist, lang);
|
|
82355
82387
|
mkdirSync20(out2, { recursive: true });
|
|
82356
82388
|
const auditPath = join56(out2, "audit-latest.json");
|
|
82357
82389
|
writeFileSync23(auditPath, `${JSON.stringify(auditDocumentFor(r.audit, adj.standard, lang), null, 2)}
|
|
@@ -82372,7 +82404,7 @@ async function cmdJudge(p) {
|
|
|
82372
82404
|
);
|
|
82373
82405
|
}
|
|
82374
82406
|
console.log(
|
|
82375
|
-
lang === "fr" ? `\u2713 ${r.applied} crit\xE8re(s) adjug\xE9(s), ${r.stillManual} laiss\xE9(s) en r\xE9siduel${r.rejected ? `, ${r.rejected} refus\xE9(s)` : ""} \u2192 ${auditPath}` : `\u2713 ${r.applied} criterion(ia) adjudicated, ${r.stillManual} left residual${r.rejected ? `, ${r.rejected} refused` : ""} \u2192 ${auditPath}`
|
|
82407
|
+
lang === "fr" ? `\u2713 ${r.applied} crit\xE8re(s) adjug\xE9(s), ${r.stillManual} laiss\xE9(s) en r\xE9siduel${r.rejected ? `, ${r.rejected} refus\xE9(s)` : ""}${r.notInWorklist.length ? `, ${r.notInWorklist.length} hors de la liste` : ""} \u2192 ${auditPath}` : `\u2713 ${r.applied} criterion(ia) adjudicated, ${r.stillManual} left residual${r.rejected ? `, ${r.rejected} refused` : ""}${r.notInWorklist.length ? `, ${r.notInWorklist.length} not in this worklist` : ""} \u2192 ${auditPath}`
|
|
82376
82408
|
);
|
|
82377
82409
|
return 0;
|
|
82378
82410
|
}
|
|
@@ -3,7 +3,7 @@ name: review-a11y
|
|
|
3
3
|
description: "Use to REVIEW changed frontend code for accessibility: staged files, a working diff, branch, or PR; prompts such as 'review a11y', 'is this accessible?', or 'anything to fix before merge?'; and hook or CI findings on a change. Run the bundled install-free engine with cross-file JSX/TSX analysis, then adjudicate candidates and return a severity-ranked WCAG 2.2 AA review with file:line fixes, residual rendering risks, and a verdict. Use `ultra11y` instead for whole-repo audits, dated conformance reports, country standards, PRD backlogs, or authoring accessible markup."
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
|
-
version: 5.57.
|
|
6
|
+
version: 5.57.3
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# review-a11y — accessibility review of changed code
|
|
@@ -6,7 +6,7 @@ import { join as join56, relative as relative7, resolve as resolve19, sep as sep
|
|
|
6
6
|
import { fileURLToPath as fileURLToPath6, pathToFileURL as pathToFileURL3 } from "url";
|
|
7
7
|
|
|
8
8
|
// src/types.ts
|
|
9
|
-
var VERSION = "5.57.
|
|
9
|
+
var VERSION = "5.57.3";
|
|
10
10
|
var SCHEMA_VERSION = 2;
|
|
11
11
|
function isAdjudicated(by) {
|
|
12
12
|
return by === "agent" || by === "human";
|
|
@@ -68627,6 +68627,11 @@ function applyAdjudication(audit2, adj, opts = {}) {
|
|
|
68627
68627
|
else itemIssues.set(criteriaId, [issue]);
|
|
68628
68628
|
};
|
|
68629
68629
|
const uncovered = (criteriaId) => notFolded.add(criteriaId);
|
|
68630
|
+
const gapIssues = /* @__PURE__ */ new Map();
|
|
68631
|
+
const gap = (criteriaId) => {
|
|
68632
|
+
notFolded.add(criteriaId);
|
|
68633
|
+
gapIssues.set(criteriaId, `criterion ${criteriaId}: missing from the adjudication (coverage gap)`);
|
|
68634
|
+
};
|
|
68630
68635
|
canonicalizeAdjudication(adj);
|
|
68631
68636
|
const itemCounts = /* @__PURE__ */ new Map();
|
|
68632
68637
|
for (const item of adj.items) itemCounts.set(item.criteriaId, (itemCounts.get(item.criteriaId) ?? 0) + 1);
|
|
@@ -68642,14 +68647,14 @@ function applyAdjudication(audit2, adj, opts = {}) {
|
|
|
68642
68647
|
open.add(item.criteriaId);
|
|
68643
68648
|
if (byId2.has(item.criteriaId)) continue;
|
|
68644
68649
|
if (Object.hasOwn(expected, item.criteriaId)) uncovered(item.criteriaId);
|
|
68645
|
-
else
|
|
68650
|
+
else gap(item.criteriaId);
|
|
68646
68651
|
}
|
|
68647
68652
|
} else {
|
|
68648
68653
|
for (const r of audit2.residualRisks) {
|
|
68649
68654
|
open.add(r.criteriaId);
|
|
68650
68655
|
if (byId2.has(r.criteriaId)) continue;
|
|
68651
68656
|
if (Object.hasOwn(expected, r.criteriaId)) uncovered(r.criteriaId);
|
|
68652
|
-
else
|
|
68657
|
+
else gap(r.criteriaId);
|
|
68653
68658
|
}
|
|
68654
68659
|
}
|
|
68655
68660
|
for (const it of adj.items) {
|
|
@@ -68832,13 +68837,25 @@ function applyAdjudication(audit2, adj, opts = {}) {
|
|
|
68832
68837
|
}
|
|
68833
68838
|
}
|
|
68834
68839
|
}
|
|
68835
|
-
|
|
68836
|
-
|
|
68840
|
+
const notInWorklist = [...gapIssues.keys()];
|
|
68841
|
+
if (opts.strict && (issues.length || notInWorklist.length)) {
|
|
68842
|
+
return {
|
|
68843
|
+
ok: false,
|
|
68844
|
+
audit: audit2,
|
|
68845
|
+
issues: [...gapIssues.values(), ...issues],
|
|
68846
|
+
applied: 0,
|
|
68847
|
+
stillManual: 0,
|
|
68848
|
+
rejected: 0,
|
|
68849
|
+
rejectedCriteria: [],
|
|
68850
|
+
notInWorklist,
|
|
68851
|
+
grounding
|
|
68852
|
+
};
|
|
68837
68853
|
}
|
|
68838
68854
|
const rejectedCriteria = adj.items.map((it) => it.criteriaId).filter((id) => itemIssues.has(id));
|
|
68839
68855
|
for (const id of itemIssues.keys()) if (!rejectedCriteria.includes(id)) rejectedCriteria.push(id);
|
|
68840
68856
|
const rejectedSet = notFolded;
|
|
68841
|
-
const rejectedWhy = (id) => expected[id] ?? residualRejectedReason(itemIssues.get(id)?.[0] ?? "refused by the gate");
|
|
68857
|
+
const rejectedWhy = (id) => expected[id] ?? (gapIssues.has(id) ? residualNotInWorklistReason() : residualRejectedReason(itemIssues.get(id)?.[0] ?? "refused by the gate"));
|
|
68858
|
+
const complete = issues.length === 0 && notInWorklist.length === 0;
|
|
68842
68859
|
const next = structuredClone(audit2);
|
|
68843
68860
|
const critById = new Map(next.criteria.map((c2) => [c2.id, c2]));
|
|
68844
68861
|
const newFindings = [];
|
|
@@ -68898,7 +68915,7 @@ function applyAdjudication(audit2, adj, opts = {}) {
|
|
|
68898
68915
|
next.packAdjudication = { standard: adj.standard, criteria: [...carried.values()] };
|
|
68899
68916
|
next.findings = [...next.findings, ...newFindings];
|
|
68900
68917
|
next.adjudicated = { date: adj.auditDate, applied, stillManual, ...rejectedCriteria.length ? { rejected: rejectedCriteria.length } : {} };
|
|
68901
|
-
return { ok:
|
|
68918
|
+
return { ok: complete, audit: next, issues, applied, stillManual, rejected: rejectedCriteria.length, rejectedCriteria, notInWorklist, grounding };
|
|
68902
68919
|
}
|
|
68903
68920
|
for (const it of adj.items) {
|
|
68904
68921
|
const c2 = critById.get(it.criteriaId);
|
|
@@ -68942,7 +68959,7 @@ function applyAdjudication(audit2, adj, opts = {}) {
|
|
|
68942
68959
|
next.residualRisks = next.residualRisks.filter((r) => byId2.get(r.criteriaId)?.verdict === "manual" || rejectedSet.has(r.criteriaId)).map((r) => rejectedSet.has(r.criteriaId) ? { ...r, reason: rejectedWhy(r.criteriaId) } : r);
|
|
68943
68960
|
recomputeTallies(next);
|
|
68944
68961
|
next.adjudicated = { date: adj.auditDate, applied, stillManual, ...rejectedCriteria.length ? { rejected: rejectedCriteria.length } : {} };
|
|
68945
|
-
return { ok:
|
|
68962
|
+
return { ok: complete, audit: next, issues, applied, stillManual, rejected: rejectedCriteria.length, rejectedCriteria, notInWorklist, grounding };
|
|
68946
68963
|
}
|
|
68947
68964
|
function agentSeverity(v, advisory) {
|
|
68948
68965
|
if (v === "bloquant" || v === "majeur" || v === "mineur") return v;
|
|
@@ -69008,6 +69025,7 @@ function recomputeTallies(a) {
|
|
|
69008
69025
|
}
|
|
69009
69026
|
var residualScanReason = () => "Rendering criterion \u2014 decide on the rendered DOM (`scan`).";
|
|
69010
69027
|
var residualUndecidableReason = () => "Left as an explicit residual risk (not decidable from the available evidence).";
|
|
69028
|
+
var residualNotInWorklistReason = () => "Not in the adjudication that was folded (coverage gap) \u2014 no verdict was offered, so none was refused. Adjudicate this criterion.";
|
|
69011
69029
|
var residualRejectedReason = (why) => `Adjudication refused by the gate \u2014 ${why.replace(/^criterion \S+: /, "")}. Re-adjudicate this criterion.`;
|
|
69012
69030
|
var SNIPPET_SHOWN = 200;
|
|
69013
69031
|
var CAPTURE_FILES = ["dom.html", "styles.json", "boxes.json", "css.json", "probes.json", "axe.json", "axtree.json", "screen.png"];
|
|
@@ -77799,6 +77817,7 @@ function handleFold(args2, cwd) {
|
|
|
77799
77817
|
stillManual: r.stillManual,
|
|
77800
77818
|
rejected: r.rejected,
|
|
77801
77819
|
rejectedCriteria: r.rejectedCriteria,
|
|
77820
|
+
notInWorklist: r.notInWorklist,
|
|
77802
77821
|
issues: r.issues,
|
|
77803
77822
|
conformancePct: r.audit.conformancePct,
|
|
77804
77823
|
grounding: r.grounding
|
|
@@ -78335,7 +78354,7 @@ var WRITE_TOOLS = [
|
|
|
78335
78354
|
{
|
|
78336
78355
|
name: "ultra11y_fold",
|
|
78337
78356
|
title: "Fold an adjudication into the audit",
|
|
78338
|
-
description: "WRITES TO THE PROJECT (with write:true): land the verdicts you wrote on the ultra11y_adjudicate worklist \u2014 the counterpart of `verify --apply`. Send the decisions only (criteriaId, verdict, justification, citations, findings, reason): the server re-derives the evidence and applies the SAME gate \u2014 a C must cite the evidence it cleared, an NC must carry groundable findings. Partial by default: a refused verdict stays \xAB to assess \xBB and is listed in rejectedCriteria with its reason; strict:true lands nothing if anything is refused. Dry-run by default (the gate's verdict, nothing written); write:true writes <out>/audit-latest.json, and ledger:true records the ACCEPTED verdicts in the verdict ledger.",
|
|
78357
|
+
description: "WRITES TO THE PROJECT (with write:true): land the verdicts you wrote on the ultra11y_adjudicate worklist \u2014 the counterpart of `verify --apply`. Send the decisions only (criteriaId, verdict, justification, citations, findings, reason): the server re-derives the evidence and applies the SAME gate \u2014 a C must cite the evidence it cleared, an NC must carry groundable findings. Partial by default: a refused verdict stays \xAB to assess \xBB and is listed in rejectedCriteria with its reason; an open criterion the file never mentions is not a refusal and is listed apart in notInWorklist; strict:true lands nothing if anything is refused. Dry-run by default (the gate's verdict, nothing written); write:true writes <out>/audit-latest.json, and ledger:true records the ACCEPTED verdicts in the verdict ledger.",
|
|
78339
78358
|
inputSchema: {
|
|
78340
78359
|
type: "object",
|
|
78341
78360
|
properties: {
|
|
@@ -81964,6 +81983,7 @@ function replayLedgerFile(p, ledger, lang) {
|
|
|
81964
81983
|
stillManual: r.stillManual,
|
|
81965
81984
|
rejected: r.rejected,
|
|
81966
81985
|
rejectedCriteria: r.rejectedCriteria,
|
|
81986
|
+
notInWorklist: r.notInWorklist,
|
|
81967
81987
|
replayed: rp.fresh.length,
|
|
81968
81988
|
stale: rp.stale,
|
|
81969
81989
|
obsolete: rp.obsolete,
|
|
@@ -81995,6 +82015,13 @@ function replayLedgerFile(p, ledger, lang) {
|
|
|
81995
82015
|
}
|
|
81996
82016
|
return 0;
|
|
81997
82017
|
}
|
|
82018
|
+
function reportNotInWorklist(ids2, lang) {
|
|
82019
|
+
if (!ids2.length) return;
|
|
82020
|
+
const shown = ids2.slice(0, 40).join(", ") + (ids2.length > 40 ? ` \u2026 +${ids2.length - 40}` : "");
|
|
82021
|
+
console.error(
|
|
82022
|
+
lang === "fr" ? `\u2139 ${ids2.length} crit\xE8re(s) hors de la liste \u2014 absent(s) de ce fichier, rien n'a \xE9t\xE9 refus\xE9 ; ils restent \xE0 \xE9valuer : ${shown}` : `\u2139 ${ids2.length} criterion(ia) not in this worklist \u2014 absent from this file, nothing was refused; they stay to assess: ${shown}`
|
|
82023
|
+
);
|
|
82024
|
+
}
|
|
81998
82025
|
function applyAdjudicationFile(p, adj, lang) {
|
|
81999
82026
|
const inFlag = p.flags.in;
|
|
82000
82027
|
if (typeof inFlag !== "string" || !inFlag) {
|
|
@@ -82019,6 +82046,7 @@ function applyAdjudicationFile(p, adj, lang) {
|
|
|
82019
82046
|
else {
|
|
82020
82047
|
console.error(lang === "fr" ? `\u2717 Adjudication rejet\xE9e (${r.issues.length} probl\xE8me(s)) :` : `\u2717 Adjudication rejected (${r.issues.length} issue(s)):`);
|
|
82021
82048
|
for (const i2 of r.issues) console.error(` \u2717 ${i2}`);
|
|
82049
|
+
reportNotInWorklist(r.notInWorklist, lang);
|
|
82022
82050
|
}
|
|
82023
82051
|
return 1;
|
|
82024
82052
|
}
|
|
@@ -82028,6 +82056,7 @@ function applyAdjudicationFile(p, adj, lang) {
|
|
|
82028
82056
|
);
|
|
82029
82057
|
for (const i2 of r.issues) console.error(` \u2717 ${i2}`);
|
|
82030
82058
|
}
|
|
82059
|
+
if (!p.flags.json) reportNotInWorklist(r.notInWorklist, lang);
|
|
82031
82060
|
const out2 = typeof p.flags.out === "string" ? p.flags.out : ".";
|
|
82032
82061
|
mkdirSync20(out2, { recursive: true });
|
|
82033
82062
|
const auditPath = join56(out2, "audit-latest.json");
|
|
@@ -82058,6 +82087,7 @@ function applyAdjudicationFile(p, adj, lang) {
|
|
|
82058
82087
|
stillManual: r.stillManual,
|
|
82059
82088
|
rejected: r.rejected,
|
|
82060
82089
|
rejectedCriteria: r.rejectedCriteria,
|
|
82090
|
+
notInWorklist: r.notInWorklist,
|
|
82061
82091
|
issues: r.issues,
|
|
82062
82092
|
conformancePct: r.audit.conformancePct,
|
|
82063
82093
|
findings: r.audit.findings.length,
|
|
@@ -82069,7 +82099,7 @@ function applyAdjudicationFile(p, adj, lang) {
|
|
|
82069
82099
|
);
|
|
82070
82100
|
else
|
|
82071
82101
|
console.log(
|
|
82072
|
-
lang === "fr" ? `\u2713 ${r.applied} crit\xE8re(s) adjug\xE9(s), ${r.stillManual} laiss\xE9(s) en r\xE9siduel${r.rejected ? `, ${r.rejected} refus\xE9(s)` : ""} \u2192 ${auditPath}` : `\u2713 ${r.applied} criterion(ia) adjudicated, ${r.stillManual} left residual${r.rejected ? `, ${r.rejected} refused` : ""} \u2192 ${auditPath}`
|
|
82102
|
+
lang === "fr" ? `\u2713 ${r.applied} crit\xE8re(s) adjug\xE9(s), ${r.stillManual} laiss\xE9(s) en r\xE9siduel${r.rejected ? `, ${r.rejected} refus\xE9(s)` : ""}${r.notInWorklist.length ? `, ${r.notInWorklist.length} hors de la liste` : ""} \u2192 ${auditPath}` : `\u2713 ${r.applied} criterion(ia) adjudicated, ${r.stillManual} left residual${r.rejected ? `, ${r.rejected} refused` : ""}${r.notInWorklist.length ? `, ${r.notInWorklist.length} not in this worklist` : ""} \u2192 ${auditPath}`
|
|
82073
82103
|
);
|
|
82074
82104
|
return 0;
|
|
82075
82105
|
}
|
|
@@ -82343,6 +82373,7 @@ async function cmdJudge(p) {
|
|
|
82343
82373
|
console.error(lang === "fr" ? `\u2717 Adjudication rejet\xE9e (${r.issues.length} probl\xE8me(s)) :` : `\u2717 Adjudication rejected (${r.issues.length} issue(s)):`);
|
|
82344
82374
|
for (const i2 of r.issues.slice(0, 40)) console.error(` \u2717 ${i2}`);
|
|
82345
82375
|
if (r.issues.length > 40) console.error(` \u2026 +${r.issues.length - 40}`);
|
|
82376
|
+
reportNotInWorklist(r.notInWorklist, lang);
|
|
82346
82377
|
return 1;
|
|
82347
82378
|
}
|
|
82348
82379
|
if (r.rejected > 0) {
|
|
@@ -82352,6 +82383,7 @@ async function cmdJudge(p) {
|
|
|
82352
82383
|
for (const i2 of r.issues.slice(0, 40)) console.error(` \u2717 ${i2}`);
|
|
82353
82384
|
if (r.issues.length > 40) console.error(` \u2026 +${r.issues.length - 40}`);
|
|
82354
82385
|
}
|
|
82386
|
+
reportNotInWorklist(r.notInWorklist, lang);
|
|
82355
82387
|
mkdirSync20(out2, { recursive: true });
|
|
82356
82388
|
const auditPath = join56(out2, "audit-latest.json");
|
|
82357
82389
|
writeFileSync23(auditPath, `${JSON.stringify(auditDocumentFor(r.audit, adj.standard, lang), null, 2)}
|
|
@@ -82372,7 +82404,7 @@ async function cmdJudge(p) {
|
|
|
82372
82404
|
);
|
|
82373
82405
|
}
|
|
82374
82406
|
console.log(
|
|
82375
|
-
lang === "fr" ? `\u2713 ${r.applied} crit\xE8re(s) adjug\xE9(s), ${r.stillManual} laiss\xE9(s) en r\xE9siduel${r.rejected ? `, ${r.rejected} refus\xE9(s)` : ""} \u2192 ${auditPath}` : `\u2713 ${r.applied} criterion(ia) adjudicated, ${r.stillManual} left residual${r.rejected ? `, ${r.rejected} refused` : ""} \u2192 ${auditPath}`
|
|
82407
|
+
lang === "fr" ? `\u2713 ${r.applied} crit\xE8re(s) adjug\xE9(s), ${r.stillManual} laiss\xE9(s) en r\xE9siduel${r.rejected ? `, ${r.rejected} refus\xE9(s)` : ""}${r.notInWorklist.length ? `, ${r.notInWorklist.length} hors de la liste` : ""} \u2192 ${auditPath}` : `\u2713 ${r.applied} criterion(ia) adjudicated, ${r.stillManual} left residual${r.rejected ? `, ${r.rejected} refused` : ""}${r.notInWorklist.length ? `, ${r.notInWorklist.length} not in this worklist` : ""} \u2192 ${auditPath}`
|
|
82376
82408
|
);
|
|
82377
82409
|
return 0;
|
|
82378
82410
|
}
|
package/skills/ultra11y/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: ultra11y
|
|
|
3
3
|
description: "Use to AUDIT a site, repository, or page against RGAA 4.1.2, the French State's accessibility standard (référentiel de l'État), on a WCAG 2.2 AA core (other country standards as packs); produce a dated conformance report, criterion grid, PRD backlog, or tickets; AUTHOR accessible markup; fix accessibility; or wire a repo gate and rendered-DOM capture pipeline. The bundled install-free engine runs 102 static checks tied to success criteria, while the agent adjudicates judgment criteria and routes rendering criteria to browser scans; check/verify reject invented non-conformities and never declare conforming what was not verified. Use `review-a11y` instead for a review scoped only to a diff, branch, or PR."
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
|
-
version: 5.57.
|
|
6
|
+
version: 5.57.3
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# ultra11y — audit WCAG 2.2 AA and write accessible markup
|
|
@@ -205,7 +205,8 @@ decisions only (`criteriaId`, `verdict`, `justification`, `citations`, `findings
|
|
|
205
205
|
the server re-derives the evidence from the audit (`audit_file`, or a fresh audit of `globs`)
|
|
206
206
|
and applies the same gate: a `C` cites the evidence it cleared, an `NC` carries groundable
|
|
207
207
|
findings. Partial by default — a refused verdict stays « to assess » and is named in
|
|
208
|
-
`rejectedCriteria` with its reason in `issues
|
|
208
|
+
`rejectedCriteria` with its reason in `issues` (an open criterion the file never mentions is not a
|
|
209
|
+
refusal: it is named apart in `notInWorklist`); `strict: true` lands nothing if anything is
|
|
209
210
|
refused. It is a dry run unless `write: true`, which writes `<out>/audit-latest.json` (default
|
|
210
211
|
the project root, like the CLI); `ledger: true` also merges the **accepted** verdicts into
|
|
211
212
|
`.ultra11y/verdicts/<standard>.json`, never a refused one. A verdict a named human auditor
|
|
@@ -61,8 +61,8 @@ $ENGINE verify --manual --in "$RUN/audit-latest.json" --out "$RUN" --json
|
|
|
61
61
|
# snippet } copied from the criterion's own evidence (references/judgment.md).
|
|
62
62
|
|
|
63
63
|
# 4. FOLD — partial by default: every verdict the gate accepts lands, every refusal is named
|
|
64
|
-
# in `rejectedCriteria[]` / `issues[]`, and a criterion absent from the file
|
|
65
|
-
#
|
|
64
|
+
# in `rejectedCriteria[]` / `issues[]`, and a criterion absent from the file — a coverage
|
|
65
|
+
# gap, not a refusal — is named apart in `notInWorklist[]` and stays to assess. A verdict for a criterion a previous fold already decided is refused too
|
|
66
66
|
# (« not open for adjudication »), so re-applying a file on the written-back audit is safe.
|
|
67
67
|
# Exit 1 only when nothing landed. `--strict` makes it all-or-nothing (exit 1
|
|
68
68
|
# on any refusal, audit left untouched).
|
|
@@ -220,9 +220,11 @@ Read exit codes from the process, **not** from a pipeline — `cmd --json | head
|
|
|
220
220
|
- `audit --json` → the `AuditResult` (also at `<out>/audit-latest.json`): `findings[]` with
|
|
221
221
|
stable `findingId`, `criteriaId`, `severity`, `file`, `line`; `residualRisks[]`;
|
|
222
222
|
`conformancePct` — the **automatic static pass rate**, not a conformance rate.
|
|
223
|
-
- `verify --apply --json` → `{ ok, auditPath, applied, stillManual, rejected, rejectedCriteria[],
|
|
224
|
-
conformancePct, findings, grounding }`; `ok: false` when nothing landed.
|
|
225
|
-
|
|
223
|
+
- `verify --apply --json` → `{ ok, auditPath, applied, stillManual, rejected, rejectedCriteria[], notInWorklist[],
|
|
224
|
+
issues[], conformancePct, findings, grounding }`; `ok: false` when nothing landed. `rejected` counts only
|
|
225
|
+
the verdicts the gate refused; the open criteria the file never mentioned (a lot, a truncated
|
|
226
|
+
sweep) are `notInWorklist[]`. Count on `applied + stillManual + rejected + notInWorklist.length`,
|
|
227
|
+
never on the exit code alone.
|
|
226
228
|
- With `--prune`, **`ok: false` does not mean "nothing was applied"**. The CLI computes the
|
|
227
229
|
coverage and grounding verdicts first, but `applyPrune` writes the pruned
|
|
228
230
|
`audit-latest.json` and repairs the `--ledger` file BEFORE `ok` is derived — so a trial that
|
|
@@ -143,7 +143,11 @@ Fold the verdicts back FAIL-CLOSED:
|
|
|
143
143
|
node scripts/ultra11y.mjs verify --apply ADJUDICATE.todo.json --in audit.json --out .
|
|
144
144
|
```
|
|
145
145
|
It rejects a null verdict, a `C`/`NA` without a `justification`, an `NC` without a groundable
|
|
146
|
-
finding, a `manual` without a `reason`, or any uncovered residual criterion.
|
|
146
|
+
finding, a `manual` without a `reason`, or any uncovered residual criterion. An open criterion the
|
|
147
|
+
file does not mention at all is not a refusal — nothing was offered — and is named apart in
|
|
148
|
+
`notInWorklist[]` (« hors de la liste »): folding a lot of 11 out of 46 criteria reports
|
|
149
|
+
`rejected: 0, notInWorklist: [35 ids]`, never « 35 rejected ». It stays « to assess » and keeps
|
|
150
|
+
`ok: false` (the fold is incomplete); `--strict` still refuses on it. A verdict for a
|
|
147
151
|
criterion that is no longer open — one a previous fold already decided — is likewise refused by
|
|
148
152
|
name (« not open for adjudication »), never re-applied: re-folding the same file on the
|
|
149
153
|
written-back audit answers `ok: false` with that criterion in `rejectedCriteria[]`. Agent `NC`s become
|
|
@@ -6,7 +6,7 @@ import { join as join56, relative as relative7, resolve as resolve19, sep as sep
|
|
|
6
6
|
import { fileURLToPath as fileURLToPath6, pathToFileURL as pathToFileURL3 } from "url";
|
|
7
7
|
|
|
8
8
|
// src/types.ts
|
|
9
|
-
var VERSION = "5.57.
|
|
9
|
+
var VERSION = "5.57.3";
|
|
10
10
|
var SCHEMA_VERSION = 2;
|
|
11
11
|
function isAdjudicated(by) {
|
|
12
12
|
return by === "agent" || by === "human";
|
|
@@ -68627,6 +68627,11 @@ function applyAdjudication(audit2, adj, opts = {}) {
|
|
|
68627
68627
|
else itemIssues.set(criteriaId, [issue]);
|
|
68628
68628
|
};
|
|
68629
68629
|
const uncovered = (criteriaId) => notFolded.add(criteriaId);
|
|
68630
|
+
const gapIssues = /* @__PURE__ */ new Map();
|
|
68631
|
+
const gap = (criteriaId) => {
|
|
68632
|
+
notFolded.add(criteriaId);
|
|
68633
|
+
gapIssues.set(criteriaId, `criterion ${criteriaId}: missing from the adjudication (coverage gap)`);
|
|
68634
|
+
};
|
|
68630
68635
|
canonicalizeAdjudication(adj);
|
|
68631
68636
|
const itemCounts = /* @__PURE__ */ new Map();
|
|
68632
68637
|
for (const item of adj.items) itemCounts.set(item.criteriaId, (itemCounts.get(item.criteriaId) ?? 0) + 1);
|
|
@@ -68642,14 +68647,14 @@ function applyAdjudication(audit2, adj, opts = {}) {
|
|
|
68642
68647
|
open.add(item.criteriaId);
|
|
68643
68648
|
if (byId2.has(item.criteriaId)) continue;
|
|
68644
68649
|
if (Object.hasOwn(expected, item.criteriaId)) uncovered(item.criteriaId);
|
|
68645
|
-
else
|
|
68650
|
+
else gap(item.criteriaId);
|
|
68646
68651
|
}
|
|
68647
68652
|
} else {
|
|
68648
68653
|
for (const r of audit2.residualRisks) {
|
|
68649
68654
|
open.add(r.criteriaId);
|
|
68650
68655
|
if (byId2.has(r.criteriaId)) continue;
|
|
68651
68656
|
if (Object.hasOwn(expected, r.criteriaId)) uncovered(r.criteriaId);
|
|
68652
|
-
else
|
|
68657
|
+
else gap(r.criteriaId);
|
|
68653
68658
|
}
|
|
68654
68659
|
}
|
|
68655
68660
|
for (const it of adj.items) {
|
|
@@ -68832,13 +68837,25 @@ function applyAdjudication(audit2, adj, opts = {}) {
|
|
|
68832
68837
|
}
|
|
68833
68838
|
}
|
|
68834
68839
|
}
|
|
68835
|
-
|
|
68836
|
-
|
|
68840
|
+
const notInWorklist = [...gapIssues.keys()];
|
|
68841
|
+
if (opts.strict && (issues.length || notInWorklist.length)) {
|
|
68842
|
+
return {
|
|
68843
|
+
ok: false,
|
|
68844
|
+
audit: audit2,
|
|
68845
|
+
issues: [...gapIssues.values(), ...issues],
|
|
68846
|
+
applied: 0,
|
|
68847
|
+
stillManual: 0,
|
|
68848
|
+
rejected: 0,
|
|
68849
|
+
rejectedCriteria: [],
|
|
68850
|
+
notInWorklist,
|
|
68851
|
+
grounding
|
|
68852
|
+
};
|
|
68837
68853
|
}
|
|
68838
68854
|
const rejectedCriteria = adj.items.map((it) => it.criteriaId).filter((id) => itemIssues.has(id));
|
|
68839
68855
|
for (const id of itemIssues.keys()) if (!rejectedCriteria.includes(id)) rejectedCriteria.push(id);
|
|
68840
68856
|
const rejectedSet = notFolded;
|
|
68841
|
-
const rejectedWhy = (id) => expected[id] ?? residualRejectedReason(itemIssues.get(id)?.[0] ?? "refused by the gate");
|
|
68857
|
+
const rejectedWhy = (id) => expected[id] ?? (gapIssues.has(id) ? residualNotInWorklistReason() : residualRejectedReason(itemIssues.get(id)?.[0] ?? "refused by the gate"));
|
|
68858
|
+
const complete = issues.length === 0 && notInWorklist.length === 0;
|
|
68842
68859
|
const next = structuredClone(audit2);
|
|
68843
68860
|
const critById = new Map(next.criteria.map((c2) => [c2.id, c2]));
|
|
68844
68861
|
const newFindings = [];
|
|
@@ -68898,7 +68915,7 @@ function applyAdjudication(audit2, adj, opts = {}) {
|
|
|
68898
68915
|
next.packAdjudication = { standard: adj.standard, criteria: [...carried.values()] };
|
|
68899
68916
|
next.findings = [...next.findings, ...newFindings];
|
|
68900
68917
|
next.adjudicated = { date: adj.auditDate, applied, stillManual, ...rejectedCriteria.length ? { rejected: rejectedCriteria.length } : {} };
|
|
68901
|
-
return { ok:
|
|
68918
|
+
return { ok: complete, audit: next, issues, applied, stillManual, rejected: rejectedCriteria.length, rejectedCriteria, notInWorklist, grounding };
|
|
68902
68919
|
}
|
|
68903
68920
|
for (const it of adj.items) {
|
|
68904
68921
|
const c2 = critById.get(it.criteriaId);
|
|
@@ -68942,7 +68959,7 @@ function applyAdjudication(audit2, adj, opts = {}) {
|
|
|
68942
68959
|
next.residualRisks = next.residualRisks.filter((r) => byId2.get(r.criteriaId)?.verdict === "manual" || rejectedSet.has(r.criteriaId)).map((r) => rejectedSet.has(r.criteriaId) ? { ...r, reason: rejectedWhy(r.criteriaId) } : r);
|
|
68943
68960
|
recomputeTallies(next);
|
|
68944
68961
|
next.adjudicated = { date: adj.auditDate, applied, stillManual, ...rejectedCriteria.length ? { rejected: rejectedCriteria.length } : {} };
|
|
68945
|
-
return { ok:
|
|
68962
|
+
return { ok: complete, audit: next, issues, applied, stillManual, rejected: rejectedCriteria.length, rejectedCriteria, notInWorklist, grounding };
|
|
68946
68963
|
}
|
|
68947
68964
|
function agentSeverity(v, advisory) {
|
|
68948
68965
|
if (v === "bloquant" || v === "majeur" || v === "mineur") return v;
|
|
@@ -69008,6 +69025,7 @@ function recomputeTallies(a) {
|
|
|
69008
69025
|
}
|
|
69009
69026
|
var residualScanReason = () => "Rendering criterion \u2014 decide on the rendered DOM (`scan`).";
|
|
69010
69027
|
var residualUndecidableReason = () => "Left as an explicit residual risk (not decidable from the available evidence).";
|
|
69028
|
+
var residualNotInWorklistReason = () => "Not in the adjudication that was folded (coverage gap) \u2014 no verdict was offered, so none was refused. Adjudicate this criterion.";
|
|
69011
69029
|
var residualRejectedReason = (why) => `Adjudication refused by the gate \u2014 ${why.replace(/^criterion \S+: /, "")}. Re-adjudicate this criterion.`;
|
|
69012
69030
|
var SNIPPET_SHOWN = 200;
|
|
69013
69031
|
var CAPTURE_FILES = ["dom.html", "styles.json", "boxes.json", "css.json", "probes.json", "axe.json", "axtree.json", "screen.png"];
|
|
@@ -77799,6 +77817,7 @@ function handleFold(args2, cwd) {
|
|
|
77799
77817
|
stillManual: r.stillManual,
|
|
77800
77818
|
rejected: r.rejected,
|
|
77801
77819
|
rejectedCriteria: r.rejectedCriteria,
|
|
77820
|
+
notInWorklist: r.notInWorklist,
|
|
77802
77821
|
issues: r.issues,
|
|
77803
77822
|
conformancePct: r.audit.conformancePct,
|
|
77804
77823
|
grounding: r.grounding
|
|
@@ -78335,7 +78354,7 @@ var WRITE_TOOLS = [
|
|
|
78335
78354
|
{
|
|
78336
78355
|
name: "ultra11y_fold",
|
|
78337
78356
|
title: "Fold an adjudication into the audit",
|
|
78338
|
-
description: "WRITES TO THE PROJECT (with write:true): land the verdicts you wrote on the ultra11y_adjudicate worklist \u2014 the counterpart of `verify --apply`. Send the decisions only (criteriaId, verdict, justification, citations, findings, reason): the server re-derives the evidence and applies the SAME gate \u2014 a C must cite the evidence it cleared, an NC must carry groundable findings. Partial by default: a refused verdict stays \xAB to assess \xBB and is listed in rejectedCriteria with its reason; strict:true lands nothing if anything is refused. Dry-run by default (the gate's verdict, nothing written); write:true writes <out>/audit-latest.json, and ledger:true records the ACCEPTED verdicts in the verdict ledger.",
|
|
78357
|
+
description: "WRITES TO THE PROJECT (with write:true): land the verdicts you wrote on the ultra11y_adjudicate worklist \u2014 the counterpart of `verify --apply`. Send the decisions only (criteriaId, verdict, justification, citations, findings, reason): the server re-derives the evidence and applies the SAME gate \u2014 a C must cite the evidence it cleared, an NC must carry groundable findings. Partial by default: a refused verdict stays \xAB to assess \xBB and is listed in rejectedCriteria with its reason; an open criterion the file never mentions is not a refusal and is listed apart in notInWorklist; strict:true lands nothing if anything is refused. Dry-run by default (the gate's verdict, nothing written); write:true writes <out>/audit-latest.json, and ledger:true records the ACCEPTED verdicts in the verdict ledger.",
|
|
78339
78358
|
inputSchema: {
|
|
78340
78359
|
type: "object",
|
|
78341
78360
|
properties: {
|
|
@@ -81964,6 +81983,7 @@ function replayLedgerFile(p, ledger, lang) {
|
|
|
81964
81983
|
stillManual: r.stillManual,
|
|
81965
81984
|
rejected: r.rejected,
|
|
81966
81985
|
rejectedCriteria: r.rejectedCriteria,
|
|
81986
|
+
notInWorklist: r.notInWorklist,
|
|
81967
81987
|
replayed: rp.fresh.length,
|
|
81968
81988
|
stale: rp.stale,
|
|
81969
81989
|
obsolete: rp.obsolete,
|
|
@@ -81995,6 +82015,13 @@ function replayLedgerFile(p, ledger, lang) {
|
|
|
81995
82015
|
}
|
|
81996
82016
|
return 0;
|
|
81997
82017
|
}
|
|
82018
|
+
function reportNotInWorklist(ids2, lang) {
|
|
82019
|
+
if (!ids2.length) return;
|
|
82020
|
+
const shown = ids2.slice(0, 40).join(", ") + (ids2.length > 40 ? ` \u2026 +${ids2.length - 40}` : "");
|
|
82021
|
+
console.error(
|
|
82022
|
+
lang === "fr" ? `\u2139 ${ids2.length} crit\xE8re(s) hors de la liste \u2014 absent(s) de ce fichier, rien n'a \xE9t\xE9 refus\xE9 ; ils restent \xE0 \xE9valuer : ${shown}` : `\u2139 ${ids2.length} criterion(ia) not in this worklist \u2014 absent from this file, nothing was refused; they stay to assess: ${shown}`
|
|
82023
|
+
);
|
|
82024
|
+
}
|
|
81998
82025
|
function applyAdjudicationFile(p, adj, lang) {
|
|
81999
82026
|
const inFlag = p.flags.in;
|
|
82000
82027
|
if (typeof inFlag !== "string" || !inFlag) {
|
|
@@ -82019,6 +82046,7 @@ function applyAdjudicationFile(p, adj, lang) {
|
|
|
82019
82046
|
else {
|
|
82020
82047
|
console.error(lang === "fr" ? `\u2717 Adjudication rejet\xE9e (${r.issues.length} probl\xE8me(s)) :` : `\u2717 Adjudication rejected (${r.issues.length} issue(s)):`);
|
|
82021
82048
|
for (const i2 of r.issues) console.error(` \u2717 ${i2}`);
|
|
82049
|
+
reportNotInWorklist(r.notInWorklist, lang);
|
|
82022
82050
|
}
|
|
82023
82051
|
return 1;
|
|
82024
82052
|
}
|
|
@@ -82028,6 +82056,7 @@ function applyAdjudicationFile(p, adj, lang) {
|
|
|
82028
82056
|
);
|
|
82029
82057
|
for (const i2 of r.issues) console.error(` \u2717 ${i2}`);
|
|
82030
82058
|
}
|
|
82059
|
+
if (!p.flags.json) reportNotInWorklist(r.notInWorklist, lang);
|
|
82031
82060
|
const out2 = typeof p.flags.out === "string" ? p.flags.out : ".";
|
|
82032
82061
|
mkdirSync20(out2, { recursive: true });
|
|
82033
82062
|
const auditPath = join56(out2, "audit-latest.json");
|
|
@@ -82058,6 +82087,7 @@ function applyAdjudicationFile(p, adj, lang) {
|
|
|
82058
82087
|
stillManual: r.stillManual,
|
|
82059
82088
|
rejected: r.rejected,
|
|
82060
82089
|
rejectedCriteria: r.rejectedCriteria,
|
|
82090
|
+
notInWorklist: r.notInWorklist,
|
|
82061
82091
|
issues: r.issues,
|
|
82062
82092
|
conformancePct: r.audit.conformancePct,
|
|
82063
82093
|
findings: r.audit.findings.length,
|
|
@@ -82069,7 +82099,7 @@ function applyAdjudicationFile(p, adj, lang) {
|
|
|
82069
82099
|
);
|
|
82070
82100
|
else
|
|
82071
82101
|
console.log(
|
|
82072
|
-
lang === "fr" ? `\u2713 ${r.applied} crit\xE8re(s) adjug\xE9(s), ${r.stillManual} laiss\xE9(s) en r\xE9siduel${r.rejected ? `, ${r.rejected} refus\xE9(s)` : ""} \u2192 ${auditPath}` : `\u2713 ${r.applied} criterion(ia) adjudicated, ${r.stillManual} left residual${r.rejected ? `, ${r.rejected} refused` : ""} \u2192 ${auditPath}`
|
|
82102
|
+
lang === "fr" ? `\u2713 ${r.applied} crit\xE8re(s) adjug\xE9(s), ${r.stillManual} laiss\xE9(s) en r\xE9siduel${r.rejected ? `, ${r.rejected} refus\xE9(s)` : ""}${r.notInWorklist.length ? `, ${r.notInWorklist.length} hors de la liste` : ""} \u2192 ${auditPath}` : `\u2713 ${r.applied} criterion(ia) adjudicated, ${r.stillManual} left residual${r.rejected ? `, ${r.rejected} refused` : ""}${r.notInWorklist.length ? `, ${r.notInWorklist.length} not in this worklist` : ""} \u2192 ${auditPath}`
|
|
82073
82103
|
);
|
|
82074
82104
|
return 0;
|
|
82075
82105
|
}
|
|
@@ -82343,6 +82373,7 @@ async function cmdJudge(p) {
|
|
|
82343
82373
|
console.error(lang === "fr" ? `\u2717 Adjudication rejet\xE9e (${r.issues.length} probl\xE8me(s)) :` : `\u2717 Adjudication rejected (${r.issues.length} issue(s)):`);
|
|
82344
82374
|
for (const i2 of r.issues.slice(0, 40)) console.error(` \u2717 ${i2}`);
|
|
82345
82375
|
if (r.issues.length > 40) console.error(` \u2026 +${r.issues.length - 40}`);
|
|
82376
|
+
reportNotInWorklist(r.notInWorklist, lang);
|
|
82346
82377
|
return 1;
|
|
82347
82378
|
}
|
|
82348
82379
|
if (r.rejected > 0) {
|
|
@@ -82352,6 +82383,7 @@ async function cmdJudge(p) {
|
|
|
82352
82383
|
for (const i2 of r.issues.slice(0, 40)) console.error(` \u2717 ${i2}`);
|
|
82353
82384
|
if (r.issues.length > 40) console.error(` \u2026 +${r.issues.length - 40}`);
|
|
82354
82385
|
}
|
|
82386
|
+
reportNotInWorklist(r.notInWorklist, lang);
|
|
82355
82387
|
mkdirSync20(out2, { recursive: true });
|
|
82356
82388
|
const auditPath = join56(out2, "audit-latest.json");
|
|
82357
82389
|
writeFileSync23(auditPath, `${JSON.stringify(auditDocumentFor(r.audit, adj.standard, lang), null, 2)}
|
|
@@ -82372,7 +82404,7 @@ async function cmdJudge(p) {
|
|
|
82372
82404
|
);
|
|
82373
82405
|
}
|
|
82374
82406
|
console.log(
|
|
82375
|
-
lang === "fr" ? `\u2713 ${r.applied} crit\xE8re(s) adjug\xE9(s), ${r.stillManual} laiss\xE9(s) en r\xE9siduel${r.rejected ? `, ${r.rejected} refus\xE9(s)` : ""} \u2192 ${auditPath}` : `\u2713 ${r.applied} criterion(ia) adjudicated, ${r.stillManual} left residual${r.rejected ? `, ${r.rejected} refused` : ""} \u2192 ${auditPath}`
|
|
82407
|
+
lang === "fr" ? `\u2713 ${r.applied} crit\xE8re(s) adjug\xE9(s), ${r.stillManual} laiss\xE9(s) en r\xE9siduel${r.rejected ? `, ${r.rejected} refus\xE9(s)` : ""}${r.notInWorklist.length ? `, ${r.notInWorklist.length} hors de la liste` : ""} \u2192 ${auditPath}` : `\u2713 ${r.applied} criterion(ia) adjudicated, ${r.stillManual} left residual${r.rejected ? `, ${r.rejected} refused` : ""}${r.notInWorklist.length ? `, ${r.notInWorklist.length} not in this worklist` : ""} \u2192 ${auditPath}`
|
|
82376
82408
|
);
|
|
82377
82409
|
return 0;
|
|
82378
82410
|
}
|
|
@@ -27,7 +27,7 @@ variables:
|
|
|
27
27
|
ULTRA11Y_LANG: en
|
|
28
28
|
# Exact by default: a CI report must say which engine produced it. The release script keeps
|
|
29
29
|
# this pin aligned with the package version; override only for a deliberate upgrade test.
|
|
30
|
-
ULTRA11Y_VERSION: '5.57.
|
|
30
|
+
ULTRA11Y_VERSION: '5.57.3'
|
|
31
31
|
# Batches of 8 amortise the prompt; each accepted verdict is checkpointed before the next
|
|
32
32
|
# batch, and later passes receive only the residue.
|
|
33
33
|
ULTRA11Y_GRAIN: batch
|
package/src/adjudicate.ts
CHANGED
|
@@ -902,6 +902,13 @@ export interface ApplyAdjudicationResult {
|
|
|
902
902
|
/** The ids behind `rejected`, in file order — so a caller can name them without re-parsing
|
|
903
903
|
* `issues` (one criterion can raise several). */
|
|
904
904
|
rejectedCriteria: string[];
|
|
905
|
+
/** Open criteria the file does not mention at all — « hors de la liste ». NOT refusals: no
|
|
906
|
+
* verdict was offered, so none was refused. A lot (a partial worklist) leaves every other
|
|
907
|
+
* criterion here by construction, and counting those as `rejected` read as if the gate had
|
|
908
|
+
* turned down verdicts nobody wrote (11 ruled of 46 reported « 35 rejected »). They stay
|
|
909
|
+
* « to assess » and keep `ok` false — the fold is incomplete — but they are named apart.
|
|
910
|
+
* In strict mode they are also carried in `issues`, since a gap still voids the whole fold. */
|
|
911
|
+
notInWorklist: string[];
|
|
905
912
|
grounding: GroundingSummary;
|
|
906
913
|
}
|
|
907
914
|
|
|
@@ -1038,6 +1045,14 @@ export function applyAdjudication(
|
|
|
1038
1045
|
};
|
|
1039
1046
|
/** An open criterion this adjudication deliberately does not carry. Not a gate violation. */
|
|
1040
1047
|
const uncovered = (criteriaId: string) => notFolded.add(criteriaId);
|
|
1048
|
+
/** An open criterion the file never mentions and the caller did not declare. Not a refusal
|
|
1049
|
+
* either — nothing was offered — so it is kept out of `itemIssues` (what `rejected` counts)
|
|
1050
|
+
* and out of the partial fold's `issues`, and reported apart as `notInWorklist`. */
|
|
1051
|
+
const gapIssues = new Map<string, string>();
|
|
1052
|
+
const gap = (criteriaId: string) => {
|
|
1053
|
+
notFolded.add(criteriaId);
|
|
1054
|
+
gapIssues.set(criteriaId, `criterion ${criteriaId}: missing from the adjudication (coverage gap)`);
|
|
1055
|
+
};
|
|
1041
1056
|
// Spelling first, decisions second: "na" is NA, and rejecting the run over the case of a
|
|
1042
1057
|
// verdict taught the caller nothing about accessibility. Everything below stays fail-closed.
|
|
1043
1058
|
canonicalizeAdjudication(adj);
|
|
@@ -1059,14 +1074,14 @@ export function applyAdjudication(
|
|
|
1059
1074
|
open.add(item.criteriaId);
|
|
1060
1075
|
if (byId.has(item.criteriaId)) continue;
|
|
1061
1076
|
if (Object.hasOwn(expected, item.criteriaId)) uncovered(item.criteriaId);
|
|
1062
|
-
else
|
|
1077
|
+
else gap(item.criteriaId);
|
|
1063
1078
|
}
|
|
1064
1079
|
} else {
|
|
1065
1080
|
for (const r of audit.residualRisks) {
|
|
1066
1081
|
open.add(r.criteriaId);
|
|
1067
1082
|
if (byId.has(r.criteriaId)) continue;
|
|
1068
1083
|
if (Object.hasOwn(expected, r.criteriaId)) uncovered(r.criteriaId);
|
|
1069
|
-
else
|
|
1084
|
+
else gap(r.criteriaId);
|
|
1070
1085
|
}
|
|
1071
1086
|
}
|
|
1072
1087
|
|
|
@@ -1462,9 +1477,20 @@ export function applyAdjudication(
|
|
|
1462
1477
|
}
|
|
1463
1478
|
}
|
|
1464
1479
|
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1480
|
+
const notInWorklist = [...gapIssues.keys()];
|
|
1481
|
+
// STRICT: the historical file-level fold. One refusal — or one gap — and nothing lands.
|
|
1482
|
+
if (opts.strict && (issues.length || notInWorklist.length)) {
|
|
1483
|
+
return {
|
|
1484
|
+
ok: false,
|
|
1485
|
+
audit,
|
|
1486
|
+
issues: [...gapIssues.values(), ...issues],
|
|
1487
|
+
applied: 0,
|
|
1488
|
+
stillManual: 0,
|
|
1489
|
+
rejected: 0,
|
|
1490
|
+
rejectedCriteria: [],
|
|
1491
|
+
notInWorklist,
|
|
1492
|
+
grounding,
|
|
1493
|
+
};
|
|
1468
1494
|
}
|
|
1469
1495
|
// PARTIAL: a refused criterion is dropped, the rest folds. `rejectedCriteria` keeps file
|
|
1470
1496
|
// order and de-duplicates, since one criterion can raise several issues. It counts only the
|
|
@@ -1472,7 +1498,9 @@ export function applyAdjudication(
|
|
|
1472
1498
|
const rejectedCriteria = adj.items.map((it) => it.criteriaId).filter((id) => itemIssues.has(id));
|
|
1473
1499
|
for (const id of itemIssues.keys()) if (!rejectedCriteria.includes(id)) rejectedCriteria.push(id);
|
|
1474
1500
|
const rejectedSet = notFolded;
|
|
1475
|
-
const rejectedWhy = (id: string) =>
|
|
1501
|
+
const rejectedWhy = (id: string) =>
|
|
1502
|
+
expected[id] ?? (gapIssues.has(id) ? residualNotInWorklistReason() : residualRejectedReason(itemIssues.get(id)?.[0] ?? "refused by the gate"));
|
|
1503
|
+
const complete = issues.length === 0 && notInWorklist.length === 0;
|
|
1476
1504
|
|
|
1477
1505
|
// Apply: clone the audit, update the decided criteria + append agent findings.
|
|
1478
1506
|
const next: AuditResult = structuredClone(audit);
|
|
@@ -1562,7 +1590,7 @@ export function applyAdjudication(
|
|
|
1562
1590
|
// resolve them — but they never touch a WCAG criterion's status.
|
|
1563
1591
|
next.findings = [...next.findings, ...newFindings];
|
|
1564
1592
|
next.adjudicated = { date: adj.auditDate, applied, stillManual, ...(rejectedCriteria.length ? { rejected: rejectedCriteria.length } : {}) };
|
|
1565
|
-
return { ok:
|
|
1593
|
+
return { ok: complete, audit: next, issues, applied, stillManual, rejected: rejectedCriteria.length, rejectedCriteria, notInWorklist, grounding };
|
|
1566
1594
|
}
|
|
1567
1595
|
|
|
1568
1596
|
for (const it of adj.items) {
|
|
@@ -1627,7 +1655,7 @@ export function applyAdjudication(
|
|
|
1627
1655
|
.map((r) => (rejectedSet.has(r.criteriaId) ? { ...r, reason: rejectedWhy(r.criteriaId) } : r));
|
|
1628
1656
|
recomputeTallies(next);
|
|
1629
1657
|
next.adjudicated = { date: adj.auditDate, applied, stillManual, ...(rejectedCriteria.length ? { rejected: rejectedCriteria.length } : {}) };
|
|
1630
|
-
return { ok:
|
|
1658
|
+
return { ok: complete, audit: next, issues, applied, stillManual, rejected: rejectedCriteria.length, rejectedCriteria, notInWorklist, grounding };
|
|
1631
1659
|
}
|
|
1632
1660
|
|
|
1633
1661
|
/** A severity the ENGINE understands, from whatever the model wrote.
|
|
@@ -1745,6 +1773,10 @@ const residualUndecidableReason = () => "Left as an explicit residual risk (not
|
|
|
1745
1773
|
/** Why a criterion is still to assess after a PARTIAL fold: its verdict was refused. Carries
|
|
1746
1774
|
* the first refusal verbatim, so the reader (and the next adjudication pass) sees the actual
|
|
1747
1775
|
* contract violation rather than a bare « to assess ». */
|
|
1776
|
+
/** Not a refusal: the fold that ran simply did not carry this criterion (a lot, a truncated
|
|
1777
|
+
* sweep). Said as such so the report never reads it as a verdict the gate turned down. */
|
|
1778
|
+
const residualNotInWorklistReason = () =>
|
|
1779
|
+
"Not in the adjudication that was folded (coverage gap) — no verdict was offered, so none was refused. Adjudicate this criterion.";
|
|
1748
1780
|
const residualRejectedReason = (why: string) => `Adjudication refused by the gate — ${why.replace(/^criterion \S+: /, "")}. Re-adjudicate this criterion.`;
|
|
1749
1781
|
|
|
1750
1782
|
/** Characters of a harvested snippet the brief prints. Long enough that the element is
|
package/src/cli.ts
CHANGED
|
@@ -3719,6 +3719,7 @@ function replayLedgerFile(p: ParsedArgs, ledger: VerdictLedger, lang: Lang): num
|
|
|
3719
3719
|
stillManual: r.stillManual,
|
|
3720
3720
|
rejected: r.rejected,
|
|
3721
3721
|
rejectedCriteria: r.rejectedCriteria,
|
|
3722
|
+
notInWorklist: r.notInWorklist,
|
|
3722
3723
|
replayed: rp.fresh.length,
|
|
3723
3724
|
stale: rp.stale,
|
|
3724
3725
|
obsolete: rp.obsolete,
|
|
@@ -3761,6 +3762,19 @@ function replayLedgerFile(p: ParsedArgs, ledger: VerdictLedger, lang: Lang): num
|
|
|
3761
3762
|
return 0;
|
|
3762
3763
|
}
|
|
3763
3764
|
|
|
3765
|
+
/** Name the open criteria a fold did not carry, APART from the refusals. A lot (a partial
|
|
3766
|
+
* worklist) leaves every other criterion out by construction; listing them under « refused by
|
|
3767
|
+
* the gate » read as if verdicts had been turned down that nobody wrote (#132). */
|
|
3768
|
+
function reportNotInWorklist(ids: string[], lang: Lang): void {
|
|
3769
|
+
if (!ids.length) return;
|
|
3770
|
+
const shown = ids.slice(0, 40).join(", ") + (ids.length > 40 ? ` … +${ids.length - 40}` : "");
|
|
3771
|
+
console.error(
|
|
3772
|
+
lang === "fr"
|
|
3773
|
+
? `ℹ ${ids.length} critère(s) hors de la liste — absent(s) de ce fichier, rien n'a été refusé ; ils restent à évaluer : ${shown}`
|
|
3774
|
+
: `ℹ ${ids.length} criterion(ia) not in this worklist — absent from this file, nothing was refused; they stay to assess: ${shown}`,
|
|
3775
|
+
);
|
|
3776
|
+
}
|
|
3777
|
+
|
|
3764
3778
|
/** `verify --apply <adjudication.json> --in <audit.json> --out <dir>` — fold an AI
|
|
3765
3779
|
* adjudication of the manual criteria back into the audit, fail-closed, then rewrite the
|
|
3766
3780
|
* audit JSON so `report`/`prd` re-render with the adjudicated statuses. */
|
|
@@ -3798,6 +3812,7 @@ function applyAdjudicationFile(p: ParsedArgs, adj: AdjudicationFile, lang: Lang)
|
|
|
3798
3812
|
else {
|
|
3799
3813
|
console.error(lang === "fr" ? `✗ Adjudication rejetée (${r.issues.length} problème(s)) :` : `✗ Adjudication rejected (${r.issues.length} issue(s)):`);
|
|
3800
3814
|
for (const i of r.issues) console.error(` ✗ ${i}`);
|
|
3815
|
+
reportNotInWorklist(r.notInWorklist, lang);
|
|
3801
3816
|
}
|
|
3802
3817
|
return 1;
|
|
3803
3818
|
}
|
|
@@ -3809,6 +3824,7 @@ function applyAdjudicationFile(p: ParsedArgs, adj: AdjudicationFile, lang: Lang)
|
|
|
3809
3824
|
);
|
|
3810
3825
|
for (const i of r.issues) console.error(` ✗ ${i}`);
|
|
3811
3826
|
}
|
|
3827
|
+
if (!p.flags.json) reportNotInWorklist(r.notInWorklist, lang);
|
|
3812
3828
|
// Persist the updated audit so report/prd re-render with the adjudicated statuses.
|
|
3813
3829
|
const out = typeof p.flags.out === "string" ? (p.flags.out as string) : ".";
|
|
3814
3830
|
mkdirSync(out, { recursive: true });
|
|
@@ -3865,6 +3881,7 @@ function applyAdjudicationFile(p: ParsedArgs, adj: AdjudicationFile, lang: Lang)
|
|
|
3865
3881
|
stillManual: r.stillManual,
|
|
3866
3882
|
rejected: r.rejected,
|
|
3867
3883
|
rejectedCriteria: r.rejectedCriteria,
|
|
3884
|
+
notInWorklist: r.notInWorklist,
|
|
3868
3885
|
issues: r.issues,
|
|
3869
3886
|
conformancePct: r.audit.conformancePct,
|
|
3870
3887
|
findings: r.audit.findings.length,
|
|
@@ -3877,8 +3894,8 @@ function applyAdjudicationFile(p: ParsedArgs, adj: AdjudicationFile, lang: Lang)
|
|
|
3877
3894
|
else
|
|
3878
3895
|
console.log(
|
|
3879
3896
|
lang === "fr"
|
|
3880
|
-
? `✓ ${r.applied} critère(s) adjugé(s), ${r.stillManual} laissé(s) en résiduel${r.rejected ? `, ${r.rejected} refusé(s)` : ""} → ${auditPath}`
|
|
3881
|
-
: `✓ ${r.applied} criterion(ia) adjudicated, ${r.stillManual} left residual${r.rejected ? `, ${r.rejected} refused` : ""} → ${auditPath}`,
|
|
3897
|
+
? `✓ ${r.applied} critère(s) adjugé(s), ${r.stillManual} laissé(s) en résiduel${r.rejected ? `, ${r.rejected} refusé(s)` : ""}${r.notInWorklist.length ? `, ${r.notInWorklist.length} hors de la liste` : ""} → ${auditPath}`
|
|
3898
|
+
: `✓ ${r.applied} criterion(ia) adjudicated, ${r.stillManual} left residual${r.rejected ? `, ${r.rejected} refused` : ""}${r.notInWorklist.length ? `, ${r.notInWorklist.length} not in this worklist` : ""} → ${auditPath}`,
|
|
3882
3899
|
);
|
|
3883
3900
|
return 0;
|
|
3884
3901
|
}
|
|
@@ -4280,6 +4297,7 @@ async function cmdJudge(p: ParsedArgs): Promise<number> {
|
|
|
4280
4297
|
console.error(lang === "fr" ? `✗ Adjudication rejetée (${r.issues.length} problème(s)) :` : `✗ Adjudication rejected (${r.issues.length} issue(s)):`);
|
|
4281
4298
|
for (const i of r.issues.slice(0, 40)) console.error(` ✗ ${i}`);
|
|
4282
4299
|
if (r.issues.length > 40) console.error(` … +${r.issues.length - 40}`);
|
|
4300
|
+
reportNotInWorklist(r.notInWorklist, lang);
|
|
4283
4301
|
return 1;
|
|
4284
4302
|
}
|
|
4285
4303
|
if (r.rejected > 0) {
|
|
@@ -4291,6 +4309,7 @@ async function cmdJudge(p: ParsedArgs): Promise<number> {
|
|
|
4291
4309
|
for (const i of r.issues.slice(0, 40)) console.error(` ✗ ${i}`);
|
|
4292
4310
|
if (r.issues.length > 40) console.error(` … +${r.issues.length - 40}`);
|
|
4293
4311
|
}
|
|
4312
|
+
reportNotInWorklist(r.notInWorklist, lang);
|
|
4294
4313
|
mkdirSync(out, { recursive: true });
|
|
4295
4314
|
const auditPath = join(out, "audit-latest.json");
|
|
4296
4315
|
writeFileSync(auditPath, `${JSON.stringify(auditDocumentFor(r.audit, adj.standard, lang), null, 2)}\n`);
|
|
@@ -4331,8 +4350,8 @@ async function cmdJudge(p: ParsedArgs): Promise<number> {
|
|
|
4331
4350
|
}
|
|
4332
4351
|
console.log(
|
|
4333
4352
|
lang === "fr"
|
|
4334
|
-
? `✓ ${r.applied} critère(s) adjugé(s), ${r.stillManual} laissé(s) en résiduel${r.rejected ? `, ${r.rejected} refusé(s)` : ""} → ${auditPath}`
|
|
4335
|
-
: `✓ ${r.applied} criterion(ia) adjudicated, ${r.stillManual} left residual${r.rejected ? `, ${r.rejected} refused` : ""} → ${auditPath}`,
|
|
4353
|
+
? `✓ ${r.applied} critère(s) adjugé(s), ${r.stillManual} laissé(s) en résiduel${r.rejected ? `, ${r.rejected} refusé(s)` : ""}${r.notInWorklist.length ? `, ${r.notInWorklist.length} hors de la liste` : ""} → ${auditPath}`
|
|
4354
|
+
: `✓ ${r.applied} criterion(ia) adjudicated, ${r.stillManual} left residual${r.rejected ? `, ${r.rejected} refused` : ""}${r.notInWorklist.length ? `, ${r.notInWorklist.length} not in this worklist` : ""} → ${auditPath}`,
|
|
4336
4355
|
);
|
|
4337
4356
|
return 0;
|
|
4338
4357
|
}
|
package/src/mcp/handlers.ts
CHANGED
|
@@ -549,6 +549,7 @@ function handleFold(args: Record<string, unknown>, cwd: string): unknown {
|
|
|
549
549
|
stillManual: r.stillManual,
|
|
550
550
|
rejected: r.rejected,
|
|
551
551
|
rejectedCriteria: r.rejectedCriteria,
|
|
552
|
+
notInWorklist: r.notInWorklist,
|
|
552
553
|
issues: r.issues,
|
|
553
554
|
conformancePct: r.audit.conformancePct,
|
|
554
555
|
grounding: r.grounding,
|
package/src/mcp/tools.ts
CHANGED
|
@@ -293,7 +293,8 @@ export const WRITE_TOOLS: ToolDecl[] = [
|
|
|
293
293
|
"WRITES TO THE PROJECT (with write:true): land the verdicts you wrote on the ultra11y_adjudicate worklist — the counterpart of `verify --apply`. " +
|
|
294
294
|
"Send the decisions only (criteriaId, verdict, justification, citations, findings, reason): the server re-derives the evidence and applies the " +
|
|
295
295
|
"SAME gate — a C must cite the evidence it cleared, an NC must carry groundable findings. Partial by default: a refused verdict stays « to assess » " +
|
|
296
|
-
"and is listed in rejectedCriteria with its reason;
|
|
296
|
+
"and is listed in rejectedCriteria with its reason; an open criterion the file never mentions is not a refusal and is listed apart in notInWorklist; " +
|
|
297
|
+
"strict:true lands nothing if anything is refused. Dry-run by default (the gate's verdict, " +
|
|
297
298
|
"nothing written); write:true writes <out>/audit-latest.json, and ledger:true records the ACCEPTED verdicts in the verdict ledger.",
|
|
298
299
|
inputSchema: {
|
|
299
300
|
type: "object",
|
package/src/types.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Single source of truth for shared types + the embedded version. sync-version.mjs
|
|
2
2
|
// rewrites VERSION at release time (kept in lockstep with package.json + SKILL.md).
|
|
3
|
-
export const VERSION = "5.57.
|
|
3
|
+
export const VERSION = "5.57.3";
|
|
4
4
|
export const SCHEMA_VERSION = 2;
|
|
5
5
|
|
|
6
6
|
// Lang = the UI FRAME's language — the `L` localization tables each module (report,
|