@edjbarron/ux-guard 0.0.0-stage → 0.6.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.
- package/LICENSE +201 -0
- package/NOTICE +2 -0
- package/README.md +239 -2
- package/bin/ux-guard.mjs +4 -0
- package/docs/cli-reference.md +145 -0
- package/docs/scoring-and-backslide.md +100 -0
- package/docs/test-suite.md +175 -0
- package/lib/authoritative.mjs +463 -0
- package/lib/baselines.mjs +1840 -0
- package/lib/catalog.mjs +197 -0
- package/lib/cli.mjs +1980 -0
- package/lib/config.mjs +209 -0
- package/lib/discovery.mjs +581 -0
- package/lib/journey-policy.mjs +590 -0
- package/lib/journeys.mjs +900 -0
- package/lib/observations.mjs +268 -0
- package/lib/patterns.mjs +247 -0
- package/lib/playwright.mjs +344 -0
- package/lib/run-contract.mjs +413 -0
- package/lib/shards.mjs +445 -0
- package/lib/targets.mjs +764 -0
- package/lib/verdicts.mjs +1769 -0
- package/lib/visuals.mjs +1263 -0
- package/lib/yaml.mjs +140 -0
- package/package.json +56 -4
- package/skills/ux-guard/SKILL.md +134 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Scoring and backslide protection
|
|
2
|
+
|
|
3
|
+
This page defines what ux-guard scores, what it compares, and which results can
|
|
4
|
+
affect a command exit code. Quality, target attainment, regression, and
|
|
5
|
+
numerical scores are separate signals.
|
|
6
|
+
|
|
7
|
+
## Where scoring appears
|
|
8
|
+
|
|
9
|
+
After reviewed policy and journey evidence are configured, run:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npx ux-guard report
|
|
13
|
+
npx ux-guard report --base origin/main
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The Markdown report has separate **Quality verdict**, **Target attainment**,
|
|
17
|
+
**Regression and backslide**, and **Numerical scores** sections. JSON keeps the
|
|
18
|
+
same meanings in separate `quality`, `targetAttainment`, `regression`, and
|
|
19
|
+
`scoring` fields.
|
|
20
|
+
|
|
21
|
+
The trusted-base form loads reviewed policy, owner targets, and comparison
|
|
22
|
+
baselines from the resolved `origin/main` commit while evaluating candidate
|
|
23
|
+
source and evidence. A candidate cannot replace those reviewed inputs with
|
|
24
|
+
more favorable policy or baselines.
|
|
25
|
+
|
|
26
|
+
## How scores are created
|
|
27
|
+
|
|
28
|
+
Numerical scores require explicit, reviewed, product-owned metric targets.
|
|
29
|
+
Historical baselines do not produce scores. Only an `at-most` target has an
|
|
30
|
+
approved numerical formula:
|
|
31
|
+
|
|
32
|
+
- If `actual <= target`, the metric score is 100.
|
|
33
|
+
- If `actual > target`, the score is
|
|
34
|
+
`round(100 * target / actual)`.
|
|
35
|
+
- If a zero target is breached, the score is 0.
|
|
36
|
+
|
|
37
|
+
For example, if a workflow should edit at most 3 fields and actually edits 4,
|
|
38
|
+
its metric score is `round(100 * 3 / 4)`, or 75. That score means the reviewed
|
|
39
|
+
interaction target was missed. It does not change or summarize the independent
|
|
40
|
+
quality verdict.
|
|
41
|
+
|
|
42
|
+
The aggregation is deliberately non-compensating:
|
|
43
|
+
|
|
44
|
+
- A journey score is the minimum of its scoreable configured metric scores.
|
|
45
|
+
- A use-case score is the minimum of its scored required journey scores.
|
|
46
|
+
- A missing, unexecutable, unsuccessful, or unmeasured journey is not scored.
|
|
47
|
+
- An `at-least` or `exactly` target is evaluated for attainment but is not
|
|
48
|
+
numerically scored.
|
|
49
|
+
- Partial score coverage stays `partially-scored`; absent coverage stays
|
|
50
|
+
`not-scored`.
|
|
51
|
+
- There is no product-wide scalar score.
|
|
52
|
+
|
|
53
|
+
## What backslide detection compares
|
|
54
|
+
|
|
55
|
+
Reviewed comparison evidence can detect each signal independently:
|
|
56
|
+
|
|
57
|
+
- a metric increase beyond its explicitly reviewed tolerance;
|
|
58
|
+
- lifecycle degradation, missing required journeys, or reduced measured and
|
|
59
|
+
successful coverage;
|
|
60
|
+
- newly introduced findings or increased finding severity;
|
|
61
|
+
- breaches of reviewed hard floors for evidence, completion, failures, skips,
|
|
62
|
+
infrastructure errors, or critical findings;
|
|
63
|
+
- growth in static control values or pattern debt beyond the reviewed
|
|
64
|
+
non-growth baseline;
|
|
65
|
+
- visual manifest, browser profile, checkpoint, image hash, image dimension,
|
|
66
|
+
or related reviewed visual-contract drift.
|
|
67
|
+
|
|
68
|
+
Baseline equality means only that comparable evidence did not backslide. It
|
|
69
|
+
does not declare the UX good or make known defects acceptable.
|
|
70
|
+
|
|
71
|
+
## Detection versus merge prevention
|
|
72
|
+
|
|
73
|
+
ux-guard defaults to detection and advisory reporting:
|
|
74
|
+
|
|
75
|
+
- `report` exits 0 whenever it renders successfully, including when it reports
|
|
76
|
+
a quality problem, target breach, regression, or unavailable comparison
|
|
77
|
+
evidence. Missing active journey policy and malformed or unsafe inputs exit
|
|
78
|
+
2; missing or unexecutable run evidence remains visible in the report.
|
|
79
|
+
- `check` exits 0 when there is no enforceable catalog or static-pattern
|
|
80
|
+
finding, 1 when those findings exist, and 2 for configuration, evidence, or
|
|
81
|
+
execution failure.
|
|
82
|
+
- Journey, target, regression, score, and visual sections remain advisory
|
|
83
|
+
unless the consumer adopts a separate, reviewed enforcement decision.
|
|
84
|
+
|
|
85
|
+
A merge is prevented only when the consumer runs a pinned, trusted ux-guard
|
|
86
|
+
configuration in CI and makes that check required.
|
|
87
|
+
Requiring `report` alone does not block advisory backslide because a successful
|
|
88
|
+
report returns 0.
|
|
89
|
+
Consumers that choose to enforce advisory signals need a trusted classifier or
|
|
90
|
+
wrapper with an explicit reviewed failure policy.
|
|
91
|
+
|
|
92
|
+
Useful Agent Skill prompts:
|
|
93
|
+
|
|
94
|
+
> Show me where ux-guard scoring comes from and explain every score
|
|
95
|
+
|
|
96
|
+
> Compare this branch with origin/main and explain every backslide signal; do
|
|
97
|
+
> not change policy or baselines
|
|
98
|
+
|
|
99
|
+
See the [CLI reference](cli-reference.md#scoring-and-backslide-protection) for
|
|
100
|
+
commands and exit behavior.
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# Test suite catalog
|
|
2
|
+
|
|
3
|
+
ux-guard has exactly 111 generic tests. This catalog was built from the test
|
|
4
|
+
names discovered by Node's test runner, not from a feature checklist. Run
|
|
5
|
+
`npm test` to execute them and `npm run check:test-catalog` to verify that this
|
|
6
|
+
page still matches the test files and names.
|
|
7
|
+
|
|
8
|
+
The tests use synthetic, consumer-neutral fixtures. A passing test suite proves
|
|
9
|
+
the behaviors below; it does not certify the UX quality of a consumer
|
|
10
|
+
application.
|
|
11
|
+
|
|
12
|
+
## `test/authoritative.test.mjs` (1 test)
|
|
13
|
+
|
|
14
|
+
- `trusted authoritative regeneration owns aggregation, policy, and verdicts` — Proves trusted regeneration derives the final advisory bundle from trusted policy and raw shards instead of accepting a candidate-authored verdict.
|
|
15
|
+
|
|
16
|
+
## `test/baselines.test.mjs` (7 tests)
|
|
17
|
+
|
|
18
|
+
- `baseline v1 is canonical, strict, hash-bound, and separates candidate from review` — Proves baseline serialization is deterministic, validates its schema and hashes, and keeps an unreviewed candidate distinct from approval.
|
|
19
|
+
- `baseline validation rejects unsafe paths, duplicate artifacts, and malformed approval` — Proves malformed provenance, repeated artifacts, unsafe paths, and invalid review metadata fail closed.
|
|
20
|
+
- `synthetic metric changes require reviewed per-metric tolerances` — Proves each interaction metric is compared only with its explicitly reviewed tolerance.
|
|
21
|
+
- `coverage, lifecycle, new findings, and severity cannot be offset by improvements` — Proves an improvement in one area cannot hide missing coverage, lifecycle failures, new findings, or worse severity elsewhere.
|
|
22
|
+
- `a known-bad baseline preserves defects as evidence without declaring them acceptable` — Proves recording current defects does not convert those defects into acceptable UX.
|
|
23
|
+
- `policy, schema, browser, and approval incompatibilities never become comparisons` — Proves incompatible evidence is reported as unavailable instead of being treated as a valid regression comparison.
|
|
24
|
+
- `owner target v2 validates desired requirements and metric policy separately from baseline tolerances` — Proves desired targets remain a distinct reviewed contract from current-state regression tolerances.
|
|
25
|
+
|
|
26
|
+
## `test/catalog.test.mjs` (4 tests)
|
|
27
|
+
|
|
28
|
+
- `reads navigation surfaces from nested object literals` — Proves catalog discovery recognizes navigation entries nested in source object literals.
|
|
29
|
+
- `reports navigation surfaces that no use case covers` — Proves a route missing from the use-case catalog is surfaced as unmapped.
|
|
30
|
+
- `accepts assistant starts and deep routes under a surface` — Proves assistant entry points and deeper routes can satisfy a catalogued surface mapping.
|
|
31
|
+
- `rejects malformed use cases` — Proves invalid catalog records fail validation instead of being partially accepted.
|
|
32
|
+
|
|
33
|
+
## `test/cli.test.mjs` (16 tests)
|
|
34
|
+
|
|
35
|
+
- `init, clean scan, canary, and check pass on a fresh repository` — Proves the pattern lifecycle initializes cleanly and the primary check works on a minimal configured repository.
|
|
36
|
+
- `growth fails the scan and update refuses it without explicit acceptance` — Proves new pattern values fail policy checks and cannot enter the baseline accidentally.
|
|
37
|
+
- `check JSON is one deterministic document with explicit result and exit semantics` — Proves machine output is stable and states both its finding status and process exit meaning.
|
|
38
|
+
- `check reports configured journey lifecycle and advisory verdicts in one JSON document` — Proves policy checks include journey coverage and advisory quality results without conflating them with enforcement.
|
|
39
|
+
- `missing journey measurements stay advisory and malformed reports fail closed` — Proves absent evidence is reported without a hard policy failure while invalid evidence is rejected.
|
|
40
|
+
- `advisory journey findings render JSON and Markdown without changing exit status` — Proves human and machine reports expose UX findings while preserving advisory exit behavior.
|
|
41
|
+
- `journey baseline lifecycle is unapproved, inspectable, no-overwrite, and explicitly promoted` — Proves a journey snapshot requires review, can be inspected, and cannot silently replace a reviewed baseline.
|
|
42
|
+
- `journey baseline lifecycle rejects traversal, symlinks, and malformed candidates` — Proves candidate baseline paths and contents cannot escape or bypass repository trust boundaries.
|
|
43
|
+
- `update removes stale entries without needing acceptance` — Proves obsolete pattern debt can be removed without authorizing new debt.
|
|
44
|
+
- `a complete inventory with an unmapped surface fails, and strict mode fails a partial one` — Proves catalog completeness and strict-mode mapping requirements produce enforceable findings.
|
|
45
|
+
- `missing policy, missing baseline, bad options, and unknown commands are errors` — Proves configuration and invocation mistakes return explicit CLI errors.
|
|
46
|
+
- `--base trusts committed policy while auditing working-tree source inputs` — Proves a check can use reviewed policy from a commit while evaluating candidate source from the working tree.
|
|
47
|
+
- `--base audits candidate catalogs and navigation without allowing policy downgrades` — Proves candidate mappings are evaluated while trusted catalog completeness cannot be weakened.
|
|
48
|
+
- `--base uses only the reviewed baseline from the trusted commit` — Proves working-tree edits cannot substitute candidate baselines or targets for reviewed ones.
|
|
49
|
+
- `policy paths cannot escape the repository` — Proves configured policy paths are constrained to repository-relative locations.
|
|
50
|
+
- `working-tree input symlinks cannot escape the repository` — Proves source scanning rejects symlinks that resolve outside the repository.
|
|
51
|
+
|
|
52
|
+
## `test/discovery.test.mjs` (5 tests)
|
|
53
|
+
|
|
54
|
+
- `discover audits a project without policy and emits review-only JSON candidates` — Proves first-run discovery inventories a project without requiring or installing policy.
|
|
55
|
+
- `discover text names the approval boundary and writes nothing` — Proves human output says observed usage is not approval and leaves the working tree unchanged.
|
|
56
|
+
- `discover rejects trusted-revision mode` — Proves discovery is explicitly a working-tree audit rather than a trusted-baseline operation.
|
|
57
|
+
- `candidate writing is explicit, unapproved, repository-local, and never overwrites` — Proves creating a review candidate is opt-in, local, visibly unapproved, and no-overwrite.
|
|
58
|
+
- `promotion requires recorded human review and regenerates the approved baseline` — Proves policy promotion requires approval metadata and rebuilds the baseline from reviewed configuration and current source.
|
|
59
|
+
|
|
60
|
+
## `test/hygiene.test.mjs` (1 test)
|
|
61
|
+
|
|
62
|
+
- `public-source hygiene rejects consumer and framework assumptions` — Proves the public package remains generic and excludes consumer-specific identifiers, private links, and fixed framework assumptions.
|
|
63
|
+
|
|
64
|
+
## `test/journey-policy.test.mjs` (7 tests)
|
|
65
|
+
|
|
66
|
+
- `readiness requires every reviewed required variant, not only the canonical journey` — Proves readiness includes all required variants instead of relying on one happy path.
|
|
67
|
+
- `all required variants must be approved, bound, measured, and successful` — Proves enforcement readiness requires complete ownership, automation, measurement, and successful execution.
|
|
68
|
+
- `complete successful required coverage is enforcement-ready and round-trips` — Proves a fully reviewed policy serializes deterministically and can reach ready state.
|
|
69
|
+
- `failed, skipped, unexecutable, and infrastructure-error required variants differ` — Proves distinct completion failures retain their separate operational meanings.
|
|
70
|
+
- `unknown rule types and malformed lifecycle declarations fail closed` — Proves unsupported rules and invalid lifecycle data cannot enter policy.
|
|
71
|
+
- `old policy versions produce explicit migration errors` — Proves obsolete policy schemas receive an actionable version error.
|
|
72
|
+
- `policy serialization is deterministic and records typed rules` — Proves reviewed journey policy has stable output with explicit rule types.
|
|
73
|
+
|
|
74
|
+
## `test/journeys.test.mjs` (11 tests)
|
|
75
|
+
|
|
76
|
+
- `records deterministic metrics and typed observations with an injected clock` — Proves journey recording is reproducible and observations retain their declared types.
|
|
77
|
+
- `standard measurements are always present and explicit metrics stay opt-in` — Proves core interaction counts are universal while optional measurements require policy selection.
|
|
78
|
+
- `wall-clock elapsed data is explicitly non-deterministic report-only metadata` — Proves elapsed time cannot masquerade as deterministic policy evidence.
|
|
79
|
+
- `normalizes findings and evidence once and uses references from journeys` — Proves shared evidence is stored once and linked instead of copied inconsistently.
|
|
80
|
+
- `serializes deterministically and round-trips the explicit v5 schema` — Proves journey reports have stable serialization and strict current-schema parsing.
|
|
81
|
+
- `rejects old report versions with an actionable migration error` — Proves stale report contracts are rejected with upgrade guidance.
|
|
82
|
+
- `failed assertion, skipped, unavailable-path, and infrastructure statuses stay distinct` — Proves product failures, omissions, unavailable workflows, and runner failures are not collapsed together.
|
|
83
|
+
- `bindings cannot inject findings, verdicts, severity, or recommendations` — Proves measurement adapters cannot author the human-facing judgment they are meant to inform.
|
|
84
|
+
- `unknown observations and malformed normalized references fail closed` — Proves unsupported evidence and broken references are rejected.
|
|
85
|
+
- `aggregates metrics and compares data without manufacturing a regression verdict` — Proves numerical aggregation remains separate from regression classification.
|
|
86
|
+
- `report tampering cannot change completion counts or measured aggregates` — Proves derived completion and metric summaries are recalculated rather than trusted from input.
|
|
87
|
+
|
|
88
|
+
## `test/patterns.test.mjs` (4 tests)
|
|
89
|
+
|
|
90
|
+
- `records control values only for configured components from the configured module` — Proves pattern inventory ignores lookalike controls outside the reviewed component source.
|
|
91
|
+
- `counts each debt rule` — Proves inline styles, hard-coded colors, pixel literals, native controls, and icon-library use are counted independently.
|
|
92
|
+
- `compare blocks new control values and per-file debt growth, and reports stale entries` — Proves policy comparison catches new variation and debt while identifying removable baseline entries.
|
|
93
|
+
- `baselines are deterministic and malformed baselines fail closed` — Proves pattern snapshots serialize stably and invalid snapshots are rejected.
|
|
94
|
+
|
|
95
|
+
## `test/playwright.test.mjs` (8 tests)
|
|
96
|
+
|
|
97
|
+
- `optional Playwright adapter flushes independent browser counts into a step` — Proves browser-observed interaction counts are captured separately and committed to the active journey step.
|
|
98
|
+
- `adapter ignores child frames, stops route capture on dispose, and rejects bad events` — Proves frame noise, post-disposal events, and malformed browser messages cannot contaminate measurements.
|
|
99
|
+
- `adapter retries a flush that races with main-frame navigation` — Proves navigation timing does not silently lose pending interaction counts.
|
|
100
|
+
- `adapter requires a Page-compatible object and a safe binding name` — Proves invalid browser objects and unsafe exposed-function names are rejected.
|
|
101
|
+
- `visual capture derives generic font readiness from the reviewed profile` — Proves screenshot readiness uses fonts declared by the reviewed visual profile.
|
|
102
|
+
- `visual capture rejects an unreviewed viewport` — Proves screenshots cannot be accepted under dimensions outside the reviewed profile.
|
|
103
|
+
- `visual capture rejects an unreviewed browser version` — Proves browser identity must match the reviewed visual profile.
|
|
104
|
+
- `visual capture requires every reviewed mask to match` — Proves visual masks are valid only when every reviewed selector resolves.
|
|
105
|
+
|
|
106
|
+
## `test/run-contract.test.mjs` (5 tests)
|
|
107
|
+
|
|
108
|
+
- `policy digests use canonicalized content and Node cryptographic hashes` — Proves equivalent policy content has a stable cryptographic identity.
|
|
109
|
+
- `run envelope records provenance, versions, profile, completion, errors, and hashes` — Proves every evidence run carries the context needed for later trust decisions.
|
|
110
|
+
- `unexecutable product paths are completion evidence, not infrastructure errors` — Proves an unavailable user workflow is distinguished from runner failure.
|
|
111
|
+
- `tampered completion, traversal artifacts, and bad digests fail closed` — Proves altered summaries, unsafe artifact paths, and invalid hashes are rejected.
|
|
112
|
+
- `completion result is derived rather than journey-authored` — Proves the final run result is computed from evidence rather than accepted from a producer.
|
|
113
|
+
|
|
114
|
+
## `test/setup.test.mjs` (8 tests)
|
|
115
|
+
|
|
116
|
+
- `setup explains insufficient evidence in an empty repository without writing files` — Proves setup reports unknown evidence honestly and leaves an empty repository unchanged.
|
|
117
|
+
- `setup tailors next steps and keeps the README transcript exact` — Proves the terminal flow omits irrelevant work, explains its supporting file, and stays byte-for-byte synchronized with the documented hard-coded-color example.
|
|
118
|
+
- `setup JSON is deterministic, noninteractive, and keeps approval boundaries explicit` — Proves automation output is stable and cannot imply policy, baseline, waiver, or enforcement approval.
|
|
119
|
+
- `setup never overwrites an existing supporting review file or active policy` — Proves setup preserves prior review work and refuses to replace active policy.
|
|
120
|
+
- `setup supporting review paths reject traversal and symlink escapes` — Proves supporting review writes remain within real repository directories.
|
|
121
|
+
- `primary help leads with setup, check, and report while advanced help preserves reference commands` — Proves everyday help stays outcome-focused while existing maintainer commands remain discoverable.
|
|
122
|
+
- `check and report errors point unconfigured repositories to the safe first step` — Proves daily commands give actionable guidance without bypassing review.
|
|
123
|
+
- `legacy discovery output and schema remain backward compatible` — Proves the additive setup flow leaves the original discovery artifact contract intact.
|
|
124
|
+
|
|
125
|
+
## `test/shards.test.mjs` (8 tests)
|
|
126
|
+
|
|
127
|
+
- `immutable per-test shards aggregate deterministically independent of file order` — Proves parallel evidence fragments produce one stable aggregate regardless of directory order.
|
|
128
|
+
- `aggregation records a consumer-neutral default artifact path` — Proves aggregate provenance uses a generic default location rather than a product-specific path.
|
|
129
|
+
- `parallel shard paths are safe and collision-resistant from policy ids` — Proves policy identifiers become repository-safe shard names without collisions.
|
|
130
|
+
- `immutable writes reject duplicate expected shard output` — Proves a test cannot silently overwrite another evidence fragment.
|
|
131
|
+
- `aggregation fails closed on missing, malformed, and unstable shards` — Proves incomplete, invalid, or changing evidence directories are rejected.
|
|
132
|
+
- `aggregation rejects symlinks and filename/content mismatches` — Proves shard identity cannot be redirected or mislabeled through filesystem tricks.
|
|
133
|
+
- `corruption canary detects a duplicate shard id under another path` — Proves duplicate logical evidence is detected even when stored under a different filename.
|
|
134
|
+
- `aggregation distinguishes forged run identity from a tool or policy upgrade` — Proves tampering is reported separately from a legitimate contract-version mismatch.
|
|
135
|
+
|
|
136
|
+
## `test/skill.test.mjs` (3 tests)
|
|
137
|
+
|
|
138
|
+
- `ux-guard skill metadata is concise, valid, and trigger-rich` — Proves the distributable skill follows metadata conventions and advertises the requested user intents.
|
|
139
|
+
- `ux-guard skill preserves approval, evidence, and production-UI guardrails` — Proves agent guidance cannot hide missing evidence, silently approve artifacts, or modify UI merely to pass.
|
|
140
|
+
- `ux-guard skill is included by the npm package allowlist` — Proves the project skill is selected for distribution with the package.
|
|
141
|
+
|
|
142
|
+
## `test/targets.test.mjs` (6 tests)
|
|
143
|
+
|
|
144
|
+
- `target attainment evaluates hard floors and strict at-most metrics` — Proves owner requirements and interaction ceilings are evaluated with their declared strictness.
|
|
145
|
+
- `at-most score is 100 when met, proportional when breached, and zero for a breached zero target` — Proves score arithmetic handles success, proportional overage, and zero-limit breaches deterministically.
|
|
146
|
+
- `journey and use-case scores use non-compensating minimum aggregation` — Proves a strong metric cannot hide a weaker one in rolled-up scores.
|
|
147
|
+
- `partial and absent target coverage remain explicit without a global score` — Proves incomplete target definitions do not produce a misleading overall number.
|
|
148
|
+
- `unexecutable and unmeasured target journeys are not scored` — Proves missing evidence does not become a fabricated low or high score.
|
|
149
|
+
- `target breaches render independently with actionable recommendations` — Proves target failures remain separate from quality findings and receive specific remediation text.
|
|
150
|
+
|
|
151
|
+
## `test/verdicts.test.mjs` (9 tests)
|
|
152
|
+
|
|
153
|
+
- `policy-evaluated observations change verdicts and emit one recommendation` — Proves reviewed rules, not raw adapters, determine quality verdicts and recommendations.
|
|
154
|
+
- `shared cross-variant findings render once with per-variant evidence` — Proves repeated issues are deduplicated while preserving each affected journey variant.
|
|
155
|
+
- `missing and unexecutable required variants stay incomplete, not unmeasured success` — Proves absent required workflows cannot be interpreted as a clean UX result.
|
|
156
|
+
- `normalized output uses references rather than repeated findings` — Proves report structure links normalized evidence consistently.
|
|
157
|
+
- `Markdown orders run errors, incomplete, needs improvement, then acceptable` — Proves human reports prioritize the most urgent and least complete results.
|
|
158
|
+
- `JSON and Markdown preserve no-score and advisory semantics` — Proves both formats avoid implying enforcement or a score when neither exists.
|
|
159
|
+
- `pattern growth is regression evidence without changing the quality verdict` — Proves code-pattern backslide is reported independently from human UX quality judgment.
|
|
160
|
+
- `human wording separates quality, unknown evidence, and recommendations` — Proves report language distinguishes observed quality, evidence gaps, and proposed action.
|
|
161
|
+
- `unknown references and old report versions fail closed` — Proves broken links and obsolete report contracts cannot render as trusted advice.
|
|
162
|
+
|
|
163
|
+
## `test/visuals.test.mjs` (5 tests)
|
|
164
|
+
|
|
165
|
+
- `strict visual profiles and checkpoint policies are canonical and versioned` — Proves visual capture settings and checkpoint rules are explicit, stable contracts.
|
|
166
|
+
- `manifest validation fails closed for missing checkpoints and profile mismatch` — Proves incomplete evidence and captures from the wrong profile are rejected.
|
|
167
|
+
- `image path, symlink, hash, and dimensions are validated` — Proves screenshot files are repository-local regular files with expected content and geometry.
|
|
168
|
+
- `candidate write and owner promotion never overwrite artifacts` — Proves visual evidence promotion preserves review history and refuses silent replacement.
|
|
169
|
+
- `comparison reports individual changes without aggregate masking` — Proves each checkpoint change remains visible instead of disappearing into one aggregate number.
|
|
170
|
+
|
|
171
|
+
## `test/yaml.test.mjs` (3 tests)
|
|
172
|
+
|
|
173
|
+
- `parses mappings, nested list mappings, and quoted text` — Proves the supported catalog YAML subset handles its required structural forms.
|
|
174
|
+
- `ignores comments outside quotes and keeps hashes inside quotes` — Proves comment parsing does not corrupt quoted values containing hash characters.
|
|
175
|
+
- `rejects input outside the supported subset` — Proves unsupported YAML constructs fail explicitly instead of being misread.
|