ultra11y 5.50.0 → 5.50.1

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.
@@ -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.50.0",
13
+ "version": "5.50.1",
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.50.0",
4
+ "version": "5.50.1",
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.50.0",
4
+ "version": "5.50.1",
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",
@@ -27,7 +27,7 @@ import { fileURLToPath } from "node:url";
27
27
  // Ownership marker: `ultra11y install --opencode` refuses to overwrite a plugin file that
28
28
  // does not carry it, so a user's own ultra11y.js is never clobbered.
29
29
  const ULTRA11Y_OPENCODE_PLUGIN = "ULTRA11Y_OPENCODE_PLUGIN";
30
- const ULTRA11Y_PLUGIN_VERSION = "5.50.0";
30
+ const ULTRA11Y_PLUGIN_VERSION = "5.50.1";
31
31
 
32
32
  const here = dirname(fileURLToPath(import.meta.url));
33
33
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultra11y",
3
- "version": "5.50.0",
3
+ "version": "5.50.1",
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",
@@ -6,7 +6,7 @@ import { join as join53, relative as relative6, resolve as resolve18, sep as sep
6
6
  import { fileURLToPath as fileURLToPath5, pathToFileURL as pathToFileURL3 } from "url";
7
7
 
8
8
  // src/types.ts
9
- var VERSION = "5.50.0";
9
+ var VERSION = "5.50.1";
10
10
  var SCHEMA_VERSION = 2;
11
11
  var INAPPLICABLE_STATUS = "C";
12
12
 
@@ -64042,6 +64042,21 @@ function applyVerdicts(items, expected) {
64042
64042
  conformitiesUntried: untried.filter((f) => f.kind === "c")
64043
64043
  };
64044
64044
  }
64045
+ var VERIFY_CONTEXT_FILE = "VERIFY.context.json";
64046
+ function writeVerifyContext(outDir, ctx) {
64047
+ mkdirSync8(outDir, { recursive: true });
64048
+ const p = join32(outDir, VERIFY_CONTEXT_FILE);
64049
+ writeFileSync9(p, JSON.stringify(ctx, null, 2) + "\n");
64050
+ return p;
64051
+ }
64052
+ function readVerifyContext(dir) {
64053
+ try {
64054
+ const c2 = JSON.parse(readFileSync18(join32(dir, VERIFY_CONTEXT_FILE), "utf8"));
64055
+ return c2 && c2.kind === "verify-context" && c2.conformities && c2.capped ? c2 : void 0;
64056
+ } catch {
64057
+ return void 0;
64058
+ }
64059
+ }
64045
64060
  function writeWorklist(items, outDir, semantic, standard = "wcag", lang = "en") {
64046
64061
  mkdirSync8(outDir, { recursive: true });
64047
64062
  const todoPath = join32(outDir, "VERIFY.todo.json");
@@ -73122,15 +73137,13 @@ var PHASE_SPECS = {
73122
73137
  role: "adjudicator",
73123
73138
  title: "Adjudicate",
73124
73139
  schema: ADJUDICATE_SCHEMA,
73125
- description: (n) => `Adjudicate the ${n} residual judgment criterion(ia) of an ultra11y audit (fan-out, fail-closed fold)`,
73126
- applyHint: (engine, worklist, run2) => `node ${engine} verify --apply ${worklist} --in ${join49(run2, "audit-latest.json")} --out ${run2}`
73140
+ description: (n) => `Adjudicate the ${n} residual judgment criterion(ia) of an ultra11y audit (fan-out, fail-closed fold)`
73127
73141
  },
73128
73142
  "verify-report": {
73129
73143
  role: "refuter",
73130
73144
  title: "Verify",
73131
73145
  schema: VERIFY_SCHEMA,
73132
- description: (n) => `Adversarially verify the ${n} non-conformity claim(s) of an ultra11y report (skeptic fan-out)`,
73133
- applyHint: (engine, worklist) => `node ${engine} verify --apply ${worklist} --report <report.md>`
73146
+ description: (n) => `Adversarially verify the ${n} non-conformity claim(s) of an ultra11y report (skeptic fan-out)`
73134
73147
  }
73135
73148
  };
73136
73149
  function phaseSpec(name2) {
@@ -73177,7 +73190,7 @@ function phaseWorkflowScript(ph, runAbs, engineAbs, batchSize) {
73177
73190
  ``,
73178
73191
  `// One-writer rule: this workflow only COLLECTS verdict fragments. The main agent folds`,
73179
73192
  `// them into WORKLIST (fill each item's fields from the matching fragment), then runs:`,
73180
- `// ${spec.applyHint(engineAbs, ph.worklist, runAbs)}`,
73193
+ `// ${ph.apply}`,
73181
73194
  `return { phase: ${JSON.stringify(ph.name)}, worklist: WORKLIST, results: results.filter(Boolean) }`,
73182
73195
  ``
73183
73196
  ].join("\n");
@@ -73204,7 +73217,7 @@ Every item comes back with a verdict. Each one stands or falls on its own: a ref
73204
73217
  Do not edit any other file, do not touch the audited source, do not commit, and do not comment on any pull request.
73205
73218
  `;
73206
73219
  }
73207
- function ecoRefuterContract(runAbs) {
73220
+ function ecoRefuterContract(runAbs, verify) {
73208
73221
  return `# Contract: refuter (sequential / --eco)
73209
73222
 
73210
73223
  You are an adversarial skeptic verifying the non-conformities of an ultra11y report. Your job is to try to REFUTE each claim: assume it is wrong until the source proves it.
@@ -73222,12 +73235,13 @@ For EACH entry:
73222
73235
  When unsure, choose the HARSHER verdict \u2014 a false pass is worse than a false fail.
73223
73236
  3. \`note\` is REQUIRED \u2014 one line grounded in what you read (quote or paraphrase the decisive code).
73224
73237
 
73225
- Then fold: \`ultra11y verify --apply ${join49(runAbs, "VERIFY.todo.json")} --report <the report .md>\`. Without a shell, leave the fold to whoever gave you the file.
73238
+ Then fold: \`ultra11y verify --apply ${join49(runAbs, "VERIFY.todo.json")} --report ${verify.report} ${verify.flags}\` \u2014 the same audit, standard and conformity source the list was generated with, or the claims it covers and the claims the fold expects differ. Without a shell, leave the fold to whoever gave you the file.
73226
73239
  `;
73227
73240
  }
73228
73241
  function agentContracts(runAbs, opts = {}) {
73229
73242
  const footer = ONE_WRITER_FOOTER.replaceAll("<RUN>", runAbs);
73230
- if (opts.eco) return { adjudicator: ecoAdjudicatorContract(runAbs), refuter: ecoRefuterContract(runAbs) };
73243
+ const verify = opts.verify ?? { report: "<report.md>", flags: `--in ${join49(runAbs, "audit-latest.json")}` };
73244
+ if (opts.eco) return { adjudicator: ecoAdjudicatorContract(runAbs), refuter: ecoRefuterContract(runAbs, verify) };
73231
73245
  return {
73232
73246
  adjudicator: `# Contract: adjudicator
73233
73247
 
@@ -73269,9 +73283,13 @@ Return (structured output): \`{ "verdicts": [{ "n", "verdict", "note" }] }\` \u2
73269
73283
  ${footer}`
73270
73284
  };
73271
73285
  }
73272
- function runbookMd(phases, runAbs, engineAbs, unrendered = []) {
73286
+ function runbookMd(phases, runAbs, engineAbs, unrendered = [], verify = { report: "<report.md>", flags: `--in ${join49(runAbs, "audit-latest.json")}` }) {
73273
73287
  const status = phases.map((p) => `| ${p.name} | \`${p.worklist}\` | ${p.ready ? `ready (${p.items} item(s))` : "not ready"} | \`${p.prerequisite}\` |`).join("\n");
73274
73288
  const engine = `node ${engineAbs}`;
73289
+ const vr = phases.find((p) => p.name === "verify-report");
73290
+ const verifyGen = vr?.prerequisite ?? `${engine} verify --report ${verify.report} ${verify.flags} --out ${runAbs}`;
73291
+ const verifyApply = vr?.apply ?? `${engine} verify --apply ${join49(runAbs, "VERIFY.todo.json")} --report ${verify.report} ${verify.flags}`;
73292
+ const std = verify.standard ? ` --standard ${verify.standard}` : "";
73275
73293
  const renderFirst = unrendered.length ? `
73276
73294
  > \u26A0\uFE0F **Render before you adjudicate.** ${unrendered.length} criterion(ia) in this run need a rendered page and
73277
73295
  > nothing has been snapshotted: no reading of the source can settle them, and every pass over them
@@ -73305,8 +73323,8 @@ ${status}
73305
73323
  1. **Audit** (if not done): \`${engine} audit "<globs>" --graph --out ${runAbs}\` \u2192 \`${join49(runAbs, "audit-latest.json")}\`.
73306
73324
  2. **Adjudicate the residual criteria** \u2014 \`${engine} verify --manual --in ${join49(runAbs, "audit-latest.json")} --out ${runAbs}\` writes \`${join49(runAbs, "ADJUDICATE.todo.json")}\`. For EVERY item, apply \`${join49(runAbs, "orchestration", "agents", "adjudicator.md")}\` yourself (read the evidence, rule C/NC/NA/manual, fill the required justification/findings/reason IN the todo file). Then fold \u2014 gated per verdict, so a refusal costs its own criterion and no other: \`${engine} verify --apply ${join49(runAbs, "ADJUDICATE.todo.json")} --in ${join49(runAbs, "audit-latest.json")} --out ${runAbs}\`. Add \`--ledger .ultra11y/verdicts/<standard>.json\` to RECORD the verdicts that landed, so CI can replay them without a model; \`--strict\` restores the old all-or-nothing fold.
73307
73325
  3. **Report**: \`${engine} report --in ${join49(runAbs, "audit-latest.json")} --out ${runAbs}\`.
73308
- 4. **Verify the report's claims** \u2014 \`${engine} verify --report <the report .md> --out ${runAbs}\` writes \`${join49(runAbs, "VERIFY.todo.json")}\`. For EVERY entry, apply \`${join49(runAbs, "orchestration", "agents", "refuter.md")}\` yourself (open file:line, verdict supported/partial/refuted/unsupported + note IN the todo file). Then: \`${engine} verify --apply ${join49(runAbs, "VERIFY.todo.json")} --report <the report .md>\`.
73309
- 5. **Gate**: \`${engine} check --report <the report .md> --semantic\` must exit 0 before presenting anything.
73326
+ 4. **Verify the report's claims** \u2014 \`${verifyGen}\` writes \`${join49(runAbs, "VERIFY.todo.json")}\` (and \`${join49(runAbs, "VERIFY.context.json")}\`, the context it was built from): the report's non-conformities AND the conformities the adjudication cleared in that audit. For EVERY entry, apply \`${join49(runAbs, "orchestration", "agents", "refuter.md")}\` yourself (open file:line, verdict supported/partial/refuted/unsupported + note IN the todo file). Then: \`${verifyApply}\`. Generation and apply carry the SAME \`--in\`, \`--standard\` and conformity source (\`--conformities <file>\` / \`--no-conformities\`, if you used one): a list built from another source covers other claims, and \`--max-verify 0\` does not fix that \u2014 regenerate it. \`--no-conformities\` or an explicit \`--max-verify\` makes a PARTIAL trial; do not present it as covering the audit.
73327
+ 5. **Gate**: \`${engine} check --report ${verify.report}${std} --semantic --verdicts ${join49(runAbs, "VERIFY.todo.json")}\` must exit 0 before presenting anything.
73310
73328
  6. **Fix & re-audit**: \`${engine} fix <globs> --write --iterate\`, hand-apply the judgment fixes, then loop from step 1 until the gate stays green.
73311
73329
 
73312
73330
  With subagents available, prefer the emitted workflows instead: \`orchestrate --run ${runAbs} --phase <p>\` then \`Workflow({ scriptPath: "${join49(runAbs, "orchestration", "<p>.workflow.mjs")}" })\` \u2014 you stay the sole writer either way.
@@ -73317,6 +73335,28 @@ With subagents available, prefer the emitted workflows instead: \`orchestrate --
73317
73335
  var PHASES = ["adjudicate", "verify-report"];
73318
73336
  var SMALL_WORKLIST = 3;
73319
73337
  var BATCH_SIZE2 = 8;
73338
+ function runStandard(run2) {
73339
+ const ctx = readVerifyContext(run2);
73340
+ if (ctx?.standard) return ctx.standard;
73341
+ for (const f of ["ADJUDICATE.todo.json", "audit-latest.json"]) {
73342
+ try {
73343
+ const std = JSON.parse(readFileSync32(join50(run2, f), "utf8")).standard;
73344
+ if (typeof std === "string" && std) return std;
73345
+ } catch {
73346
+ }
73347
+ }
73348
+ return void 0;
73349
+ }
73350
+ function verifyRunContext(runDir) {
73351
+ const run2 = resolve15(runDir);
73352
+ const ctx = readVerifyContext(run2);
73353
+ const standard = runStandard(run2);
73354
+ const flags2 = [`--in ${ctx?.in ?? join50(run2, "audit-latest.json")}`];
73355
+ if (standard) flags2.push(`--standard ${standard}`);
73356
+ if (ctx?.conformities.source === "file") flags2.push(`--conformities ${ctx.conformities.path}`);
73357
+ if (ctx?.conformities.source === "disabled") flags2.push("--no-conformities");
73358
+ return { report: ctx && ctx.report !== "-" ? ctx.report : "<report.md>", flags: flags2.join(" "), ...standard ? { standard } : {} };
73359
+ }
73320
73360
  function listPhases(runDir, engineAbs) {
73321
73361
  const run2 = resolve15(runDir);
73322
73362
  const adjPath = join50(run2, "ADJUDICATE.todo.json");
@@ -73345,6 +73385,7 @@ function listPhases(runDir, engineAbs) {
73345
73385
  } catch {
73346
73386
  }
73347
73387
  }
73388
+ const vctx = verifyRunContext(run2);
73348
73389
  return [
73349
73390
  {
73350
73391
  name: "adjudicate",
@@ -73352,7 +73393,8 @@ function listPhases(runDir, engineAbs) {
73352
73393
  worklist: adjPath,
73353
73394
  items: adjIds.length,
73354
73395
  ids: adjIds,
73355
- prerequisite: `node ${engineAbs} verify --manual --in ${join50(run2, "audit-latest.json")} --out ${run2}`
73396
+ prerequisite: `node ${engineAbs} verify --manual --in ${join50(run2, "audit-latest.json")} --out ${run2}`,
73397
+ apply: `node ${engineAbs} verify --apply ${adjPath} --in ${join50(run2, "audit-latest.json")} --out ${run2}`
73356
73398
  },
73357
73399
  {
73358
73400
  name: "verify-report",
@@ -73360,7 +73402,8 @@ function listPhases(runDir, engineAbs) {
73360
73402
  worklist: verPath,
73361
73403
  items: verIds.length,
73362
73404
  ids: verIds,
73363
- prerequisite: `node ${engineAbs} verify --report <report.md> --out ${run2}`
73405
+ prerequisite: `node ${engineAbs} verify --report ${vctx.report} ${vctx.flags} --out ${run2}`,
73406
+ apply: `node ${engineAbs} verify --apply ${verPath} --report ${vctx.report} ${vctx.flags}`
73364
73407
  }
73365
73408
  ];
73366
73409
  }
@@ -73408,7 +73451,7 @@ function orchestrateRun(runDir, engineAbs, opts = {}) {
73408
73451
  mkdirSync17(agentsDir, { recursive: true });
73409
73452
  const written = [];
73410
73453
  const notices = [];
73411
- for (const [name2, content] of Object.entries(agentContracts(run2, { eco: opts.eco === true }))) {
73454
+ for (const [name2, content] of Object.entries(agentContracts(run2, { eco: opts.eco === true, verify: verifyRunContext(run2) }))) {
73412
73455
  const p = join50(agentsDir, `${name2}.md`);
73413
73456
  writeFileSync20(p, content);
73414
73457
  written.push(p);
@@ -73437,7 +73480,7 @@ function orchestrateRun(runDir, engineAbs, opts = {}) {
73437
73480
  }
73438
73481
  }
73439
73482
  const rb = join50(orchDir, "RUNBOOK.md");
73440
- writeFileSync20(rb, runbookMd(phases, run2, engineAbs, unrenderedInRun(run2)));
73483
+ writeFileSync20(rb, runbookMd(phases, run2, engineAbs, unrenderedInRun(run2), verifyRunContext(run2)));
73441
73484
  written.push(rb);
73442
73485
  return { exitCode: 0, written, notices, errors: [], phases };
73443
73486
  }
@@ -77833,13 +77876,28 @@ function cmdVerify(p) {
77833
77876
  const repMd = readReportInput(applyReport, "verify");
77834
77877
  if (repMd === null) return 2;
77835
77878
  const expectedNc = buildWorklist(repMd, standard, Number.POSITIVE_INFINITY);
77836
- const expected = [...expectedNc, ...buildConformityWorklist(conformityClaimsFor(p, standard, lang), expectedNc.length, Number.POSITIVE_INFINITY)];
77879
+ const trial = conformityTrial(p, standard, lang);
77880
+ const expected = [...expectedNc, ...buildConformityWorklist(trial.claims, expectedNc.length, Number.POSITIVE_INFINITY)];
77837
77881
  const r = applyVerdicts(items, expected);
77882
+ const ctx = readVerifyContext(dirname20(resolve18(apply)));
77883
+ const absentItems = r.failures.filter((f) => !items.includes(f));
77884
+ const absentC = absentItems.filter((f) => f.kind === "c").length;
77885
+ const sourceDiffers = ctx ? !sameConformitySource(ctx.conformities, trial.source) : absentC > 0 && !items.some((it) => it.kind === "c");
77886
+ const capCould = ctx ? ctx.capped.nc + ctx.capped.c > 0 : !sourceDiffers;
77887
+ const missingCause = r.missing ? capCould ? "cap" : sourceDiffers ? "source" : "other" : void 0;
77838
77888
  const passing = items.filter((it) => typeof it.verdict === "string" && ["supported", "partial"].includes(it.verdict.trim().toLowerCase()));
77839
77889
  const grounding = groundItems(verifyGroundingInputs(passing, trialAnchorFallbacks(p, standard, passing)));
77840
77890
  const pruned = p.flags.prune === true ? applyPrune(p, standard, items, lang, r.conformitiesUntried) : void 0;
77841
77891
  const ok = (pruned ? r.unadjudicated + r.invalid + r.missing === 0 : r.ok) && grounding.failed === 0;
77842
- if (p.flags.json) console.log(JSON.stringify({ ...r, ok, grounding, ...pruned ? { pruned } : {} }, null, 2));
77892
+ const ncOnly = trial.source.source === "none" || trial.source.source === "disabled";
77893
+ if (p.flags.json)
77894
+ console.log(
77895
+ JSON.stringify(
77896
+ { ...r, ok, grounding, conformitySource: trial.source, ...missingCause ? { missingCause } : {}, ...pruned ? { pruned } : {} },
77897
+ null,
77898
+ 2
77899
+ )
77900
+ );
77843
77901
  else if (ok)
77844
77902
  console.log(
77845
77903
  pruned ? lang === "fr" ? `\u2713 ${r.total} revendication(s) contre-expertis\xE9e(s), retraits appliqu\xE9s et verdicts conserv\xE9s ancr\xE9s dans la source${grounding.moved ? ` (${grounding.moved} d\xE9plac\xE9(s))` : ""}.` : `\u2713 ${r.total} claim(s) reviewed, withdrawals applied, and retained verdicts grounded in source${grounding.moved ? ` (${grounding.moved} moved)` : ""}.` : lang === "fr" ? `\u2713 ${r.total} revendication(s) v\xE9rifi\xE9e(s), toutes \xE9tay\xE9es et ancr\xE9es dans la source${grounding.moved ? ` (${grounding.moved} d\xE9plac\xE9e(s))` : ""}.` : `\u2713 ${r.total} claim(s) verified, all supported and grounded in source${grounding.moved ? ` (${grounding.moved} moved)` : ""}.`
@@ -77847,8 +77905,15 @@ function cmdVerify(p) {
77847
77905
  else {
77848
77906
  if (!r.ok)
77849
77907
  console.error(
77850
- lang === "fr" ? `\u2717 ${r.failures.length}/${r.total} en \xE9chec (refuted ${r.refuted}, unsupported ${r.unsupported}, non statu\xE9 ${r.unadjudicated}${r.missing ? `, absent(s) ${r.missing} \u2014 r\xE9g\xE9n\xE9rez la worklist avec --max-verify 0` : ""}${r.invalid ? `, invalide ${r.invalid}` : ""}).` : `\u2717 ${r.failures.length}/${r.total} failed (refuted ${r.refuted}, unsupported ${r.unsupported}, unadjudicated ${r.unadjudicated}${r.missing ? `, missing ${r.missing} \u2014 regenerate the worklist with --max-verify 0` : ""}${r.invalid ? `, invalid ${r.invalid}` : ""}).`
77908
+ lang === "fr" ? `\u2717 ${r.failures.length}/${r.total} en \xE9chec (refuted ${r.refuted}, unsupported ${r.unsupported}, non statu\xE9 ${r.unadjudicated}${r.missing ? `, absent(s) ${r.missing}${capCould ? " \u2014 r\xE9g\xE9n\xE9rez la worklist avec --max-verify 0" : ""}` : ""}${r.invalid ? `, invalide ${r.invalid}` : ""}).` : `\u2717 ${r.failures.length}/${r.total} failed (refuted ${r.refuted}, unsupported ${r.unsupported}, unadjudicated ${r.unadjudicated}${r.missing ? `, missing ${r.missing}${capCould ? " \u2014 regenerate the worklist with --max-verify 0" : ""}` : ""}${r.invalid ? `, invalid ${r.invalid}` : ""}).`
77909
+ );
77910
+ if (r.missing && !capCould) {
77911
+ const regen = `verify --report ${applyReport} ${trialContextFlags(p, standard, trial.source)} --out <dir>`;
77912
+ const was = ctx ? describeConformitySource(ctx.conformities, lang) : lang === "fr" ? "inconnue \u2014 la worklist ne porte aucune conformit\xE9" : "unknown \u2014 the worklist carries no conformity";
77913
+ console.error(
77914
+ sourceDiffers ? lang === "fr" ? `\u2717 Couverture : la worklist a \xE9t\xE9 g\xE9n\xE9r\xE9e avec une autre source de conformit\xE9s (${was}) que cette application (${describeConformitySource(trial.source, lang)}) \u2014 ${absentC} conformit\xE9(s) revendiqu\xE9e(s) n'y figurent pas. --max-verify 0 n'y changera rien : r\xE9g\xE9n\xE9rez-la avec \`${regen}\`, puis r\xE9appliquez avec ces m\xEAmes options.` : `\u2717 Coverage: the worklist was generated from another conformity source (${was}) than this apply (${describeConformitySource(trial.source, lang)}) \u2014 ${absentC} claimed conformity(ies) are not in it. --max-verify 0 will not fix that: regenerate it with \`${regen}\`, then apply with the same options.` : lang === "fr" ? `\u2717 Couverture : la worklist n'\xE9tait pas plafonn\xE9e \u2014 l'\xE9cart vient d'un autre rapport ou d'un autre audit que ceux de cette application. R\xE9g\xE9n\xE9rez-la avec \`${regen}\`.` : `\u2717 Coverage: the worklist was not capped \u2014 the gap comes from another report or audit than this apply's. Regenerate it with \`${regen}\`.`
77851
77915
  );
77916
+ }
77852
77917
  if (r.conformitiesRefused.length) {
77853
77918
  const ids = [...new Set(r.conformitiesRefused.map((f) => f.criteriaId))].join(", ");
77854
77919
  console.error(
@@ -77858,13 +77923,17 @@ function cmdVerify(p) {
77858
77923
  if (r.conformitiesUntried.length) {
77859
77924
  const ids = [...new Set(r.conformitiesUntried.map((f) => f.criteriaId))].join(", ");
77860
77925
  const absent = r.conformitiesUntried.some((f) => !items.includes(f));
77861
- const regen = absent ? lang === "fr" ? " R\xE9g\xE9n\xE9rez la worklist avec --max-verify 0." : " Regenerate the worklist with --max-verify 0." : "";
77926
+ const regen = absent && capCould ? lang === "fr" ? " R\xE9g\xE9n\xE9rez la worklist avec --max-verify 0." : " Regenerate the worklist with --max-verify 0." : "";
77862
77927
  console.error(
77863
77928
  pruned ? lang === "fr" ? `\u2717 ${r.conformitiesUntried.length} conformit\xE9(s) revendiqu\xE9e(s) jamais mise(s) \xE0 l'\xE9preuve \u2014 renvoy\xE9e(s) \xE0 \xAB \xE0 \xE9valuer \xBB : ${ids}.${regen}` : `\u2717 ${r.conformitiesUntried.length} claimed conformity(ies) never tried \u2014 sent back to "to assess": ${ids}.${regen}` : lang === "fr" ? `\u2717 ${r.conformitiesUntried.length} conformit\xE9(s) revendiqu\xE9e(s) jamais mise(s) \xE0 l'\xE9preuve \u2014 la contre-expertise est incompl\xE8te : ${ids}.${regen}` : `\u2717 ${r.conformitiesUntried.length} claimed conformity(ies) never tried \u2014 the trial is incomplete: ${ids}.${regen}`
77864
77929
  );
77865
77930
  }
77866
77931
  for (const issue of grounding.issues) console.error(`\u2717 ${issue}`);
77867
77932
  }
77933
+ if (ok && ncOnly && !p.flags.json)
77934
+ console.error(
77935
+ trial.source.source === "disabled" ? lang === "fr" ? "\u24D8 Contre-expertise des non-conformit\xE9s uniquement (--no-conformities) : les conformit\xE9s revendiqu\xE9es de l'audit n'ont pas \xE9t\xE9 mises \xE0 l'\xE9preuve." : "\u24D8 Trial of non-conformities only (--no-conformities): the audit's claimed conformities were not put on trial." : lang === "fr" ? "\u24D8 Contre-expertise des non-conformit\xE9s uniquement : aucune source de conformit\xE9s (ni --in, ni --conformities, ni ledger), les conformit\xE9s revendiqu\xE9es de l'audit n'ont pas \xE9t\xE9 mises \xE0 l'\xE9preuve. G\xE9n\xE9rez et appliquez avec --in <audit.json> pour les couvrir." : "\u24D8 Trial of non-conformities only: no conformity source (no --in, --conformities or ledger), so the audit's claimed conformities were not put on trial. Generate and apply with --in <audit.json> to cover them."
77936
+ );
77868
77937
  return ok ? 0 : 1;
77869
77938
  }
77870
77939
  return cmdVerifyWorklist(p, lang);
@@ -77934,8 +78003,8 @@ function cmdVerifyWorklist(p, langIn) {
77934
78003
  lang = resolveLang(p.flags, { standard });
77935
78004
  const out2 = typeof p.flags.out === "string" ? p.flags.out : ".";
77936
78005
  if (p.flags.manual === true) {
77937
- const inFlag = p.flags.in;
77938
- if (typeof inFlag !== "string" || !inFlag) {
78006
+ const inFlag2 = p.flags.in;
78007
+ if (typeof inFlag2 !== "string" || !inFlag2) {
77939
78008
  console.error(
77940
78009
  lang === "fr" ? "ultra11y verify : --manual exige --in <audit.json> (l'audit dont les crit\xE8res r\xE9siduels sont \xE0 adjuger)." : "ultra11y verify: --manual requires --in <audit.json> (the audit whose residual criteria are adjudicated)."
77941
78010
  );
@@ -77943,9 +78012,9 @@ function cmdVerifyWorklist(p, langIn) {
77943
78012
  }
77944
78013
  let audit2;
77945
78014
  try {
77946
- audit2 = unwrapAudit(JSON.parse(readText(inFlag)));
78015
+ audit2 = unwrapAudit(JSON.parse(readText(inFlag2)));
77947
78016
  } catch {
77948
- console.error(`ultra11y verify: --in file not found or not valid JSON: ${inFlag}.`);
78017
+ console.error(`ultra11y verify: --in file not found or not valid JSON: ${inFlag2}.`);
77949
78018
  return 2;
77950
78019
  }
77951
78020
  const adjItems = buildAdjudicationWorklist(audit2, { standard });
@@ -77955,7 +78024,7 @@ function cmdVerifyWorklist(p, langIn) {
77955
78024
  if (unrendered.length) {
77956
78025
  const ids = unrendered.join(" \xB7 ");
77957
78026
  console.error(
77958
- lang === "fr" ? `ultra11y verify : ${unrendered.length} crit\xE8re(s) exigent une page rendue et aucune page n'a \xE9t\xE9 instantan\xE9e \u2014 ils resteront \xAB \xE0 \xE9valuer \xBB quoi qu'il arrive. Lancez \`ultra11y scan <url> --merge ${inFlag}\` d'abord. Concern\xE9s : ${ids}` : `ultra11y verify: ${unrendered.length} criterion(ia) need a rendered page and no page was snapshotted \u2014 they will stay "to assess" whatever happens. Run \`ultra11y scan <url> --merge ${inFlag}\` first. Affected: ${ids}`
78027
+ lang === "fr" ? `ultra11y verify : ${unrendered.length} crit\xE8re(s) exigent une page rendue et aucune page n'a \xE9t\xE9 instantan\xE9e \u2014 ils resteront \xAB \xE0 \xE9valuer \xBB quoi qu'il arrive. Lancez \`ultra11y scan <url> --merge ${inFlag2}\` d'abord. Concern\xE9s : ${ids}` : `ultra11y verify: ${unrendered.length} criterion(ia) need a rendered page and no page was snapshotted \u2014 they will stay "to assess" whatever happens. Run \`ultra11y scan <url> --merge ${inFlag2}\` first. Affected: ${ids}`
77959
78028
  );
77960
78029
  }
77961
78030
  if (adjItems.every((it) => it.evidence.length === 0)) {
@@ -78001,7 +78070,8 @@ function cmdVerifyWorklist(p, langIn) {
78001
78070
  if (repMd === null) return 2;
78002
78071
  const ncItems = buildWorklist(repMd, standard, max);
78003
78072
  const ncAll = Number.isFinite(max) ? buildWorklist(repMd, standard, Number.POSITIVE_INFINITY).length : ncItems.length;
78004
- const conformities = conformityClaimsFor(p, standard, lang);
78073
+ const trial = conformityTrial(p, standard, lang);
78074
+ const conformities = trial.claims;
78005
78075
  const cItems = buildConformityWorklist(conformities, ncItems.length, cMax);
78006
78076
  const cAll = Number.isFinite(cMax) ? buildConformityWorklist(conformities, 0, Number.POSITIVE_INFINITY).length : cItems.length;
78007
78077
  const items = [...ncItems, ...cItems];
@@ -78011,8 +78081,21 @@ function cmdVerifyWorklist(p, langIn) {
78011
78081
  console.error(
78012
78082
  lang === "fr" ? `\u26A0 Worklist plafonn\xE9e par --max-verify : ${[droppedNc ? `${droppedNc}/${ncAll} non-conformit\xE9(s)` : "", droppedC ? `${droppedC}/${cAll} conformit\xE9(s) revendiqu\xE9e(s)` : ""].filter(Boolean).join(" et ")} laiss\xE9e(s) hors du proc\xE8s. \`verify --apply\` les comptera absentes et \xE9chouera${droppedC ? ", et --prune renverra ces conformit\xE9s \xE0 \xAB \xE0 \xE9valuer \xBB" : ""}. Relancez avec --max-verify 0 pour tout mettre \xE0 l'\xE9preuve.` : `\u26A0 Worklist capped by --max-verify: ${[droppedNc ? `${droppedNc}/${ncAll} non-conformity(ies)` : "", droppedC ? `${droppedC}/${cAll} claimed conformity(ies)` : ""].filter(Boolean).join(" and ")} left out of the trial. \`verify --apply\` will count them missing and fail${droppedC ? ", and --prune will send those conformities back to \u201Cto assess\u201D" : ""}. Re-run with --max-verify 0 to try everything.`
78013
78083
  );
78084
+ if (trial.source.source === "none")
78085
+ console.error(
78086
+ lang === "fr" ? "\u26A0 Aucune source de conformit\xE9s (ni --in, ni --conformities, ni ledger) : seules les non-conformit\xE9s du rapport sont mises \xE0 l'\xE9preuve. Passez --in <audit.json> (l'audit dont vient le rapport) pour y inclure les conformit\xE9s adjug\xE9es, ou --no-conformities pour l'exclure explicitement." : "\u26A0 No conformity source (no --in, --conformities or ledger): only the report's non-conformities are put on trial. Pass --in <audit.json> (the audit the report came from) to include the adjudicated conformities, or --no-conformities to opt out explicitly."
78087
+ );
78014
78088
  const { todoPath, mdPath, count } = writeWorklist(items, out2, p.flags.semantic === true, standard, lang);
78015
- if (p.flags.json) console.log(JSON.stringify({ mdPath, todoPath, count, nc: ncItems.length, conformities: cItems.length, items }, null, 2));
78089
+ const inFlag = p.flags.in;
78090
+ const contextPath = writeVerifyContext(out2, {
78091
+ kind: "verify-context",
78092
+ standard,
78093
+ report: rep === "-" ? rep : resolve18(rep),
78094
+ ...typeof inFlag === "string" && inFlag && inFlag !== "-" ? { in: resolve18(inFlag) } : {},
78095
+ conformities: trial.source,
78096
+ capped: { nc: droppedNc, c: droppedC }
78097
+ });
78098
+ if (p.flags.json) console.log(JSON.stringify({ mdPath, todoPath, contextPath, count, nc: ncItems.length, conformities: cItems.length, items }, null, 2));
78016
78099
  else
78017
78100
  console.log(
78018
78101
  lang === "fr" ? `${ncItems.length} non-conformit\xE9(s)${cItems.length ? ` et ${cItems.length} conformit\xE9(s) revendiqu\xE9e(s)` : ""} \xE0 v\xE9rifier \u2192 ${mdPath}, ${todoPath}` : `${ncItems.length} non-conformity(ies)${cItems.length ? ` and ${cItems.length} claimed conformity(ies)` : ""} to verify \u2192 ${mdPath}, ${todoPath}`
@@ -78034,43 +78117,68 @@ function trialAnchorFallbacks(p, standard, passing) {
78034
78117
  const { citationDrift } = adjudicationLimits(cwd);
78035
78118
  return (it, cite) => evidenceFallback(evidence.get(it.criteriaId) ?? [], cite, citationDrift).fallback;
78036
78119
  }
78037
- function conformityClaimsFor(p, standard, lang) {
78038
- if (p.flags.conformities === false || p.flags["no-conformities"] === true) return [];
78120
+ function conformityTrial(p, standard, lang) {
78121
+ if (p.flags.conformities === false || p.flags["no-conformities"] === true) return { claims: [], source: { source: "disabled" } };
78039
78122
  const named3 = typeof p.flags.conformities === "string" && p.flags.conformities ? p.flags.conformities : void 0;
78040
78123
  if (!named3) {
78041
78124
  const inFlag = p.flags.in;
78042
78125
  if (typeof inFlag === "string" && inFlag && inFlag !== "-") {
78043
78126
  try {
78044
78127
  const audit2 = unwrapAudit(JSON.parse(readText(inFlag)));
78045
- if (Array.isArray(audit2.criteria)) return conformityClaimsFromAudit(audit2, standard);
78128
+ if (Array.isArray(audit2.criteria)) return { claims: conformityClaimsFromAudit(audit2, standard), source: { source: "in", path: resolve18(inFlag) } };
78046
78129
  } catch {
78047
78130
  }
78048
78131
  }
78049
78132
  }
78050
78133
  const path = named3 ?? ledgerPath(standard);
78134
+ const source = { source: named3 ? "file" : "ledger", path: resolve18(path) };
78051
78135
  if (!existsSync40(path)) {
78052
78136
  if (named3) {
78053
78137
  console.error(
78054
78138
  lang === "fr" ? `ultra11y verify : fichier --conformities introuvable : ${named3}.` : `ultra11y verify: --conformities file not found: ${named3}.`
78055
78139
  );
78056
- return [];
78140
+ return { claims: [], source };
78057
78141
  }
78058
- return [];
78142
+ return { claims: [], source: { source: "none" } };
78059
78143
  }
78060
78144
  try {
78061
78145
  const parsed = JSON.parse(readText(path));
78062
- if (parsed.entries) return parsed.entries;
78063
- if (parsed.items) return parsed.items;
78146
+ if (parsed.entries) return { claims: parsed.entries, source };
78147
+ if (parsed.items) return { claims: parsed.items, source };
78064
78148
  const audit2 = unwrapAudit(parsed);
78065
- return Array.isArray(audit2.criteria) ? conformityClaimsFromAudit(audit2, standard) : [];
78149
+ return { claims: Array.isArray(audit2.criteria) ? conformityClaimsFromAudit(audit2, standard) : [], source };
78066
78150
  } catch {
78067
78151
  if (named3)
78068
78152
  console.error(
78069
78153
  lang === "fr" ? `ultra11y verify : le fichier --conformities n'est pas du JSON valide : ${named3}.` : `ultra11y verify: --conformities file is not valid JSON: ${named3}.`
78070
78154
  );
78071
- return [];
78155
+ return { claims: [], source };
78156
+ }
78157
+ }
78158
+ var sameConformitySource = (a, b) => a.source === b.source && ("path" in a ? a.path : "") === ("path" in b ? b.path : "");
78159
+ function describeConformitySource(s, lang) {
78160
+ const fr = lang === "fr";
78161
+ switch (s.source) {
78162
+ case "in":
78163
+ return `--in ${s.path}`;
78164
+ case "file":
78165
+ return `--conformities ${s.path}`;
78166
+ case "ledger":
78167
+ return `ledger ${s.path}`;
78168
+ case "disabled":
78169
+ return "--no-conformities";
78170
+ default:
78171
+ return fr ? "aucune \u2014 ni --in, ni --conformities, ni ledger" : "none \u2014 no --in, --conformities or ledger";
78072
78172
  }
78073
78173
  }
78174
+ function trialContextFlags(p, standard, source) {
78175
+ const flags2 = [`--standard ${standard}`];
78176
+ const inFlag = p.flags.in;
78177
+ if (typeof inFlag === "string" && inFlag && inFlag !== "-") flags2.push(`--in ${inFlag}`);
78178
+ if (source.source === "file") flags2.push(`--conformities ${source.path}`);
78179
+ if (source.source === "disabled") flags2.push("--no-conformities");
78180
+ return flags2.join(" ");
78181
+ }
78074
78182
  function ledgerTarget(p, standard) {
78075
78183
  const flag = p.flags.ledger;
78076
78184
  if (flag === void 0 || flag === false) return void 0;
@@ -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.50.0
6
+ version: 5.50.1
7
7
  ---
8
8
 
9
9
  # review-a11y — accessibility review of changed code