accessibility-checker reaches the network during evaluation, which makes carbon's
a11y-bearing tests non-deterministic. Measured rate on a full 133-instance run: 6 flaked
(127/133 first pass), all recovered by one automatic retry.
Failure signature:
TypeError: ace.Checker is not a constructor (ACEngineManager.ts)
TypeError: ace_ibma.Checker is not a constructor
What is fetched
Two separate things, both at eval time:
- the engine —
lib/engine/ace-node.js
- the rule archive itself
.achecker.yml (ruleArchive: 07Oct2020, set in constants.py) pins which archive is
used, so results are reproducible, but it does not make either fetch local.
Investigated: vendoring the engine
Works, but is only half the fix. Verified in a container:
- copy
ace-node.js into node_modules/accessibility-checker/lib/engine/
- patch
aChecker.loadLocalEngine to use it when present — necessary, because the function
otherwise calls request.get(rulePack + "/ace-node.js") unconditionally and overwrites
whatever is there. Its only short-circuit is an in-memory ace variable.
With able.ibm.com blackholed (v4 and v6) the engine loaded fine — 0 ACE errors — but
the a11y suites then emitted 419 ECONNREFUSED fetching the rule archive, failing 10
component suites (Button, Link, Accordion, Checkbox, Tag, Loading, ...).
What a complete fix needs
- mirror
/archives/2020.10.07/ into the image
- point
rulePack at a local server (ACConfigLoader supports a custom rule server)
That means rebuilding + re-pushing 133 images and running a static server inside every
carbon evaluation. Judged not worth it for a 4.5% transient that one retry clears.
Gotcha for anyone who picks this up
The archive id does not map to a URL of the same name. 07Oct2020 resolves via
https://able.ibm.com/rules/archives.json to path /archives/2020.10.07.
https://able.ibm.com/rules/archives/07Oct2020/js/ace-node.js returns 404;
https://able.ibm.com/rules/archives/2020.10.07/js/ace-node.js returns 200 (404 KB).
Building an image from the guessed URL would silently bake a 404 page into 133 images.
Current mitigation
Retry once on failure (carbon rebuild pipeline does this: 127/133 → 133/133), plus
--maxWorkers=4 for carbon, which appears to reduce the rate further — two instances that
failed uncapped passed with the cap.
accessibility-checkerreaches the network during evaluation, which makes carbon'sa11y-bearing tests non-deterministic. Measured rate on a full 133-instance run: 6 flaked
(127/133 first pass), all recovered by one automatic retry.
Failure signature:
What is fetched
Two separate things, both at eval time:
lib/engine/ace-node.js.achecker.yml(ruleArchive: 07Oct2020, set inconstants.py) pins which archive isused, so results are reproducible, but it does not make either fetch local.
Investigated: vendoring the engine
Works, but is only half the fix. Verified in a container:
ace-node.jsintonode_modules/accessibility-checker/lib/engine/aChecker.loadLocalEngineto use it when present — necessary, because the functionotherwise calls
request.get(rulePack + "/ace-node.js")unconditionally and overwriteswhatever is there. Its only short-circuit is an in-memory
acevariable.With
able.ibm.comblackholed (v4 and v6) the engine loaded fine — 0 ACE errors — butthe a11y suites then emitted 419 ECONNREFUSED fetching the rule archive, failing 10
component suites (Button, Link, Accordion, Checkbox, Tag, Loading, ...).
What a complete fix needs
/archives/2020.10.07/into the imagerulePackat a local server (ACConfigLoadersupports a custom rule server)That means rebuilding + re-pushing 133 images and running a static server inside every
carbon evaluation. Judged not worth it for a 4.5% transient that one retry clears.
Gotcha for anyone who picks this up
The archive id does not map to a URL of the same name.
07Oct2020resolves viahttps://able.ibm.com/rules/archives.jsonto path/archives/2020.10.07.https://able.ibm.com/rules/archives/07Oct2020/js/ace-node.jsreturns 404;https://able.ibm.com/rules/archives/2020.10.07/js/ace-node.jsreturns 200 (404 KB).Building an image from the guessed URL would silently bake a 404 page into 133 images.
Current mitigation
Retry once on failure (carbon rebuild pipeline does this: 127/133 → 133/133), plus
--maxWorkers=4for carbon, which appears to reduce the rate further — two instances thatfailed uncapped passed with the cap.