feat(PR-06): one-command frozen-CLI acceptance, evidence and final docs

- tools/acceptance.sh: RFC §18.1 end-to-end acceptance against the frozen CLI
  release archive in an isolated tool home (build/test/bundle/archive-install/
  view help/verify/export/browse/explicit CSRF run/export+security+browser
  suites/CLI SHA check) and generation of docs/evidence/<CLI-SHA>/manifest.json
- tools/test-contract.sh + .woodpecker.yml CI lanes (remote CI unverified)
- docs/ACCEPTANCE.md gate table (P0 all PASS; U-01/U-04 honestly PARTIAL),
  docs/audits/protocol-conformance.md, ADR-0006 documented RFC deviations
- unicode/CRLF/duplicate-text examples + frozen goldens + tests (S-04)
- presentation degradation matrix tests (S-05..S-07), hostile-stdout escaping
  test (X-05), keyboard accessibility browser checks (U-03)
- final README/STATUS/COMPATIBILITY/CHANGELOG with honest limitations
This commit is contained in:
marqdo-view dev committed 2026-11-22 12:06:45 +08:00
1 parent 1f34daffb0
commit d641ca58ac
21 files changed
+1562 -70

No files matched your search

+24
View File
@@ -70,6 +70,30 @@ function localHostOnly(url) {
(await page.locator('.mq-dock-btn[data-action="run"]').count()) === 1
);
// Keyboard reachability: focus must move through named interactive elements.
const namedTabStops = await page.evaluate(async () => {
return Array.from(document.querySelectorAll("a[href], button")).map((el) => ({
label: (el.getAttribute("aria-label") || el.textContent || "").trim(),
hidden: el.offsetParent === null,
}));
});
check(
"interactive controls have accessible names",
namedTabStops.filter((item) => !item.hidden && item.label.length > 0).length >= 8,
JSON.stringify(namedTabStops.slice(0, 8))
);
let focusedNamed = 0;
for (let index = 0; index < 10; index += 1) {
await page.keyboard.press("Tab");
const label = await page.evaluate(() => {
const element = document.activeElement;
if (!element) return "";
return (element.getAttribute("aria-label") || element.textContent || "").trim();
});
if (label.length > 0) focusedNamed += 1;
}
check("Tab reaches named controls", focusedNamed >= 6, String(focusedNamed));
// Source/document mode switch through the single menu.
await page.click('.mq-dock-btn[data-action="more"]');
check("more dialog opens", await page.locator("#mq-dialog-more").isVisible());