Loading...

xAPI Statements Conform, and Answer Keys Stay Stable

RULES.md

Every xAPI statement a HAX element sends conforms to xAPI 1.0.3: it validates against the statement schema, scores sit within their min and max, and each `result.response` and `correctResponsesPattern` follows the grammar of its interaction type. Extensions HAX writes live under `https://haxtheweb.org/xapi/extensions/`. Interaction component ids come from the option itself (`componentIds()`, `c-` plus 8 hex characters), never from its position, so reordering options does not change an answer key and results stay comparable across edits and over time. Test new or changed statements with `validateStatement()` from `scripts/lib/xapi-conformance.mjs` (browser tests: the `xapi-validate` server command); `yarn test:scripts` runs the conformance suite on every pull request. In PRAW RULES.md (scope: webcomponents). Enforced by Script tests. webcomponents yarn test:scripts (Script tests in the build workflow) runs scripts/test/xapi-conformance.test.mjs: statement schema, response-pattern grammar, HAX extension IRIs, and component ids that stay stable when options are reordered. It fails the pull request.

Connects to

Links