my-frontend-observer 0.4.0 → 0.5.0
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/CHANGELOG.md +60 -0
- package/README.md +39 -11
- package/dist/application/frontendContractEvaluationService.d.ts +49 -0
- package/dist/application/frontendContractEvaluationService.js +112 -0
- package/dist/application/frontendContractEvaluationService.js.map +1 -0
- package/dist/application/frontendContractPersistenceService.d.ts +56 -0
- package/dist/application/frontendContractPersistenceService.js +91 -0
- package/dist/application/frontendContractPersistenceService.js.map +1 -0
- package/dist/artifacts/comparisonArtifactReader.d.ts +18 -0
- package/dist/artifacts/comparisonArtifactReader.js +35 -0
- package/dist/artifacts/comparisonArtifactReader.js.map +1 -0
- package/dist/artifacts/frontendContractArtifactReader.d.ts +24 -0
- package/dist/artifacts/frontendContractArtifactReader.js +47 -0
- package/dist/artifacts/frontendContractArtifactReader.js.map +1 -0
- package/dist/artifacts/frontendContractArtifactWriter.d.ts +34 -0
- package/dist/artifacts/frontendContractArtifactWriter.js +70 -0
- package/dist/artifacts/frontendContractArtifactWriter.js.map +1 -0
- package/dist/artifacts/frontendContractEvaluationArtifactReader.d.ts +17 -0
- package/dist/artifacts/frontendContractEvaluationArtifactReader.js +34 -0
- package/dist/artifacts/frontendContractEvaluationArtifactReader.js.map +1 -0
- package/dist/artifacts/frontendContractEvaluationArtifactWriter.d.ts +32 -0
- package/dist/artifacts/frontendContractEvaluationArtifactWriter.js +58 -0
- package/dist/artifacts/frontendContractEvaluationArtifactWriter.js.map +1 -0
- package/dist/cli.js +496 -6
- package/dist/cli.js.map +1 -1
- package/dist/domain/frontendContractEvaluation.d.ts +57 -0
- package/dist/domain/frontendContractEvaluation.js +454 -0
- package/dist/domain/frontendContractEvaluation.js.map +1 -0
- package/dist/domain/frontendContractEvaluationArtifact.d.ts +65 -0
- package/dist/domain/frontendContractEvaluationArtifact.js +108 -0
- package/dist/domain/frontendContractEvaluationArtifact.js.map +1 -0
- package/dist/domain/frontendContractIdentity.d.ts +39 -0
- package/dist/domain/frontendContractIdentity.js +70 -0
- package/dist/domain/frontendContractIdentity.js.map +1 -0
- package/dist/domain/frontendContracts.d.ts +188 -0
- package/dist/domain/frontendContracts.js +260 -0
- package/dist/domain/frontendContracts.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/docs/ARCHITECTURE.md +98 -1
- package/docs/CI_CD.md +47 -0
- package/docs/COMMANDS.md +162 -0
- package/docs/CONTRACTS.md +175 -3
- package/docs/CURRENT_STATE.md +92 -10
- package/docs/DEVELOPMENT.md +58 -10
- package/docs/PROJECT_OVERVIEW.md +19 -13
- package/docs/QUICKSTART.md +5 -0
- package/docs/RELEASE.md +17 -10
- package/docs/ROADMAP.md +6 -0
- package/docs/SECURITY.md +13 -1
- package/docs/WORKFLOWS.md +65 -8
- package/package.json +1 -1
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { isValidEvidenceReference, PAIRWISE_RELATIONSHIP_KINDS, PAGE_LEVEL_RELATIONSHIP_KINDS } from './relationships.js';
|
|
2
|
+
import { DEPENDENCY_PROPERTIES } from './comparison.js';
|
|
3
|
+
import { PRODUCER_NAME, SCHEMA_VERSION as OBSERVATION_SCHEMA_VERSION } from './schema.js';
|
|
4
|
+
function isPlainObject(value) {
|
|
5
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
6
|
+
}
|
|
7
|
+
function isNonEmptyString(value) {
|
|
8
|
+
return typeof value === 'string' && value.length > 0;
|
|
9
|
+
}
|
|
10
|
+
function isEvidenceReferenceArray(value) {
|
|
11
|
+
return Array.isArray(value) && value.every((entry) => isValidEvidenceReference(entry));
|
|
12
|
+
}
|
|
13
|
+
export const CONTRACT_ARTIFACT_KIND = 'my-frontend-observer/frontend-contract';
|
|
14
|
+
export const CONTRACT_SCHEMA_VERSION = '1.0.0';
|
|
15
|
+
// --- Change-scope vocabulary --------------------------------------------------
|
|
16
|
+
/** The authored per-change contract has exactly these 4 intent categories - `'unexpected'` is never a member. */
|
|
17
|
+
export const AUTHORED_CHANGE_SCOPE_CATEGORIES = ['requested', 'expected-dependent', 'protected', 'preserved'];
|
|
18
|
+
export function isAuthoredChangeScopeCategory(value) {
|
|
19
|
+
return typeof value === 'string' && AUTHORED_CHANGE_SCOPE_CATEGORIES.includes(value);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Full derived classification vocabulary, kept structurally separate from
|
|
23
|
+
* AUTHORED_CHANGE_SCOPE_CATEGORIES - `'unexpected'` is a classification a
|
|
24
|
+
* future evaluator produces, never an authored permission. No function in
|
|
25
|
+
* this module converts between the two vocabularies.
|
|
26
|
+
*/
|
|
27
|
+
export const CHANGE_SCOPE_CLASSIFICATIONS = [...AUTHORED_CHANGE_SCOPE_CATEGORIES, 'unexpected'];
|
|
28
|
+
export const EXPECTED_DEPENDENT_MODES = ['required', 'permitted'];
|
|
29
|
+
export function isValidExpectedDependentMode(value) {
|
|
30
|
+
return typeof value === 'string' && EXPECTED_DEPENDENT_MODES.includes(value);
|
|
31
|
+
}
|
|
32
|
+
// --- Contract tolerance (bounded, closed - never a generic expression) -------
|
|
33
|
+
/** Independently declared from GEOMETRY_TOLERANCE_*_PX (src/domain/relationships.ts): comparison tolerance suppresses insignificant geometry noise and is never contract authorization. */
|
|
34
|
+
export const CONTRACT_TOLERANCE_ABSOLUTE_PX_MIN = 0;
|
|
35
|
+
export const CONTRACT_TOLERANCE_ABSOLUTE_PX_MAX = 100;
|
|
36
|
+
export const CONTRACT_TOLERANCE_PERCENT_MIN = 0;
|
|
37
|
+
export const CONTRACT_TOLERANCE_PERCENT_MAX = 100;
|
|
38
|
+
export function isValidContractTolerance(value) {
|
|
39
|
+
if (!isPlainObject(value))
|
|
40
|
+
return false;
|
|
41
|
+
if (value.kind === 'exact')
|
|
42
|
+
return Object.keys(value).length === 1;
|
|
43
|
+
if (value.kind === 'absolute-px') {
|
|
44
|
+
return (typeof value.amount === 'number' &&
|
|
45
|
+
Number.isFinite(value.amount) &&
|
|
46
|
+
value.amount >= CONTRACT_TOLERANCE_ABSOLUTE_PX_MIN &&
|
|
47
|
+
value.amount <= CONTRACT_TOLERANCE_ABSOLUTE_PX_MAX);
|
|
48
|
+
}
|
|
49
|
+
if (value.kind === 'percent') {
|
|
50
|
+
return (typeof value.amount === 'number' &&
|
|
51
|
+
Number.isFinite(value.amount) &&
|
|
52
|
+
value.amount >= CONTRACT_TOLERANCE_PERCENT_MIN &&
|
|
53
|
+
value.amount <= CONTRACT_TOLERANCE_PERCENT_MAX);
|
|
54
|
+
}
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
// --- Contract primitive vocabulary (bounded, closed) --------------------------
|
|
58
|
+
/** Every contract primitive kind this batch freezes - deliberately bounded, never a generic rule/expression language. */
|
|
59
|
+
export const CONTRACT_PRIMITIVE_KINDS = [
|
|
60
|
+
'target-visible',
|
|
61
|
+
'target-not-clipped',
|
|
62
|
+
'target-width-within-bound',
|
|
63
|
+
'targets-do-not-overlap',
|
|
64
|
+
'target-wider-than',
|
|
65
|
+
'target-follows-vertically',
|
|
66
|
+
'target-fits-inside',
|
|
67
|
+
'document-width-fits-viewport',
|
|
68
|
+
'scroll-owner-is-document',
|
|
69
|
+
'target-does-not-own-scroll',
|
|
70
|
+
'target-begins-below-initial-viewport',
|
|
71
|
+
'relationship-unchanged',
|
|
72
|
+
'property-unchanged-within-tolerance',
|
|
73
|
+
'property-increases',
|
|
74
|
+
'property-decreases',
|
|
75
|
+
];
|
|
76
|
+
const ALL_RELATIONSHIP_KINDS = [...PAIRWISE_RELATIONSHIP_KINDS, ...PAGE_LEVEL_RELATIONSHIP_KINDS];
|
|
77
|
+
function isOptionalFiniteNumber(value) {
|
|
78
|
+
return value === undefined || (typeof value === 'number' && Number.isFinite(value));
|
|
79
|
+
}
|
|
80
|
+
function isOptionalNonNegativeFiniteNumber(value) {
|
|
81
|
+
return value === undefined || (typeof value === 'number' && Number.isFinite(value) && value >= 0);
|
|
82
|
+
}
|
|
83
|
+
/** Rejects extra keys beyond the given allowlist, keeping every ContractPrimitive variant a closed shape rather than an open bag of fields. */
|
|
84
|
+
function hasOnlyKeys(value, allowedKeys) {
|
|
85
|
+
return Object.keys(value).every((key) => allowedKeys.includes(key));
|
|
86
|
+
}
|
|
87
|
+
export function isValidContractPrimitive(value) {
|
|
88
|
+
if (!isPlainObject(value) || typeof value.kind !== 'string')
|
|
89
|
+
return false;
|
|
90
|
+
switch (value.kind) {
|
|
91
|
+
case 'target-visible':
|
|
92
|
+
return hasOnlyKeys(value, ['kind', 'target']) && isNonEmptyString(value.target);
|
|
93
|
+
case 'target-not-clipped':
|
|
94
|
+
return (hasOnlyKeys(value, ['kind', 'target', 'axis']) &&
|
|
95
|
+
isNonEmptyString(value.target) &&
|
|
96
|
+
(value.axis === undefined || value.axis === 'horizontal' || value.axis === 'vertical' || value.axis === 'both'));
|
|
97
|
+
case 'target-width-within-bound': {
|
|
98
|
+
if (!hasOnlyKeys(value, ['kind', 'target', 'minPx', 'maxPx']))
|
|
99
|
+
return false;
|
|
100
|
+
if (!isNonEmptyString(value.target))
|
|
101
|
+
return false;
|
|
102
|
+
if (!isOptionalFiniteNumber(value.minPx) || !isOptionalFiniteNumber(value.maxPx))
|
|
103
|
+
return false;
|
|
104
|
+
if (value.minPx === undefined && value.maxPx === undefined)
|
|
105
|
+
return false;
|
|
106
|
+
if (typeof value.minPx === 'number' && typeof value.maxPx === 'number' && value.minPx > value.maxPx)
|
|
107
|
+
return false;
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
case 'targets-do-not-overlap':
|
|
111
|
+
case 'target-wider-than':
|
|
112
|
+
case 'target-follows-vertically':
|
|
113
|
+
return (hasOnlyKeys(value, ['kind', 'targetA', 'targetB']) &&
|
|
114
|
+
isNonEmptyString(value.targetA) &&
|
|
115
|
+
isNonEmptyString(value.targetB) &&
|
|
116
|
+
value.targetA !== value.targetB);
|
|
117
|
+
case 'target-fits-inside':
|
|
118
|
+
return (hasOnlyKeys(value, ['kind', 'target', 'container']) &&
|
|
119
|
+
isNonEmptyString(value.target) &&
|
|
120
|
+
isNonEmptyString(value.container) &&
|
|
121
|
+
value.target !== value.container);
|
|
122
|
+
case 'document-width-fits-viewport':
|
|
123
|
+
case 'scroll-owner-is-document':
|
|
124
|
+
return hasOnlyKeys(value, ['kind']) && Object.keys(value).length === 1;
|
|
125
|
+
case 'target-does-not-own-scroll':
|
|
126
|
+
case 'target-begins-below-initial-viewport':
|
|
127
|
+
return hasOnlyKeys(value, ['kind', 'target']) && isNonEmptyString(value.target);
|
|
128
|
+
case 'relationship-unchanged':
|
|
129
|
+
return (hasOnlyKeys(value, ['kind', 'relationshipKind', 'subjectTarget', 'relatedTarget']) &&
|
|
130
|
+
typeof value.relationshipKind === 'string' &&
|
|
131
|
+
ALL_RELATIONSHIP_KINDS.includes(value.relationshipKind) &&
|
|
132
|
+
(value.subjectTarget === undefined || typeof value.subjectTarget === 'string') &&
|
|
133
|
+
(value.relatedTarget === undefined || typeof value.relatedTarget === 'string'));
|
|
134
|
+
case 'property-unchanged-within-tolerance':
|
|
135
|
+
return (hasOnlyKeys(value, ['kind', 'target', 'property', 'tolerance']) &&
|
|
136
|
+
isNonEmptyString(value.target) &&
|
|
137
|
+
typeof value.property === 'string' &&
|
|
138
|
+
DEPENDENCY_PROPERTIES.includes(value.property) &&
|
|
139
|
+
isValidContractTolerance(value.tolerance));
|
|
140
|
+
case 'property-increases':
|
|
141
|
+
case 'property-decreases':
|
|
142
|
+
return (hasOnlyKeys(value, ['kind', 'target', 'property', 'minimumDeltaPx']) &&
|
|
143
|
+
isNonEmptyString(value.target) &&
|
|
144
|
+
typeof value.property === 'string' &&
|
|
145
|
+
DEPENDENCY_PROPERTIES.includes(value.property) &&
|
|
146
|
+
isOptionalNonNegativeFiniteNumber(value.minimumDeltaPx));
|
|
147
|
+
default:
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
export function isValidBaselineClause(value) {
|
|
152
|
+
if (!isPlainObject(value))
|
|
153
|
+
return false;
|
|
154
|
+
return isNonEmptyString(value.clauseId) && isValidContractPrimitive(value.primitive) && isEvidenceReferenceArray(value.supportingEvidence);
|
|
155
|
+
}
|
|
156
|
+
export function isValidPerChangeClause(value) {
|
|
157
|
+
if (!isPlainObject(value))
|
|
158
|
+
return false;
|
|
159
|
+
if (!isValidBaselineClause(value))
|
|
160
|
+
return false;
|
|
161
|
+
const record = value;
|
|
162
|
+
if (!isAuthoredChangeScopeCategory(record.category))
|
|
163
|
+
return false;
|
|
164
|
+
const hasMode = 'expectedDependentMode' in record && record.expectedDependentMode !== undefined;
|
|
165
|
+
if (record.category === 'expected-dependent') {
|
|
166
|
+
if (!hasMode || !isValidExpectedDependentMode(record.expectedDependentMode))
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
else if (hasMode) {
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
if ('supersedesBaselineClauseIds' in record && record.supersedesBaselineClauseIds !== undefined) {
|
|
173
|
+
const ids = record.supersedesBaselineClauseIds;
|
|
174
|
+
if (!Array.isArray(ids) || ids.length === 0)
|
|
175
|
+
return false;
|
|
176
|
+
if (!ids.every((id) => isNonEmptyString(id)))
|
|
177
|
+
return false;
|
|
178
|
+
}
|
|
179
|
+
return true;
|
|
180
|
+
}
|
|
181
|
+
export function isValidFrontendContractObservationReference(value) {
|
|
182
|
+
if (!isPlainObject(value))
|
|
183
|
+
return false;
|
|
184
|
+
if (!isNonEmptyString(value.observationId) || !isNonEmptyString(value.requestId))
|
|
185
|
+
return false;
|
|
186
|
+
if (!isPlainObject(value.producer) || value.producer.name !== PRODUCER_NAME || !isNonEmptyString(value.producer.version))
|
|
187
|
+
return false;
|
|
188
|
+
return value.observationSchemaVersion === OBSERVATION_SCHEMA_VERSION;
|
|
189
|
+
}
|
|
190
|
+
export function isValidPersistentBaselineContract(value) {
|
|
191
|
+
if (!isPlainObject(value))
|
|
192
|
+
return { valid: false, reason: 'contract must be an object' };
|
|
193
|
+
if (value.artifactKind !== CONTRACT_ARTIFACT_KIND)
|
|
194
|
+
return { valid: false, reason: 'artifactKind mismatch' };
|
|
195
|
+
if (value.schemaVersion !== CONTRACT_SCHEMA_VERSION)
|
|
196
|
+
return { valid: false, reason: 'schemaVersion mismatch' };
|
|
197
|
+
if (value.contractClass !== 'baseline')
|
|
198
|
+
return { valid: false, reason: 'contractClass must be "baseline"' };
|
|
199
|
+
if (!isNonEmptyString(value.baselineId))
|
|
200
|
+
return { valid: false, reason: 'baselineId must be a non-empty string' };
|
|
201
|
+
if ('supersedesBaselineId' in value && value.supersedesBaselineId !== undefined && !isNonEmptyString(value.supersedesBaselineId)) {
|
|
202
|
+
return { valid: false, reason: 'supersedesBaselineId must be a non-empty string when present' };
|
|
203
|
+
}
|
|
204
|
+
if (!isValidFrontendContractObservationReference(value.sourceObservation))
|
|
205
|
+
return { valid: false, reason: 'sourceObservation is invalid' };
|
|
206
|
+
if (!Array.isArray(value.clauses) || !value.clauses.every((c) => isValidBaselineClause(c))) {
|
|
207
|
+
return { valid: false, reason: 'clauses must be an array of valid BaselineClause values' };
|
|
208
|
+
}
|
|
209
|
+
if (!isPlainObject(value.provenance) || !isNonEmptyString(value.provenance.approvedAt)) {
|
|
210
|
+
return { valid: false, reason: 'provenance.approvedAt must be a non-empty string' };
|
|
211
|
+
}
|
|
212
|
+
return { valid: true };
|
|
213
|
+
}
|
|
214
|
+
export function isValidPerChangeContract(value) {
|
|
215
|
+
if (!isPlainObject(value))
|
|
216
|
+
return { valid: false, reason: 'contract must be an object' };
|
|
217
|
+
if (value.artifactKind !== CONTRACT_ARTIFACT_KIND)
|
|
218
|
+
return { valid: false, reason: 'artifactKind mismatch' };
|
|
219
|
+
if (value.schemaVersion !== CONTRACT_SCHEMA_VERSION)
|
|
220
|
+
return { valid: false, reason: 'schemaVersion mismatch' };
|
|
221
|
+
if (value.contractClass !== 'change')
|
|
222
|
+
return { valid: false, reason: 'contractClass must be "change"' };
|
|
223
|
+
if (!isNonEmptyString(value.contractId))
|
|
224
|
+
return { valid: false, reason: 'contractId must be a non-empty string' };
|
|
225
|
+
if (!isNonEmptyString(value.contractRequestId))
|
|
226
|
+
return { valid: false, reason: 'contractRequestId must be a non-empty string' };
|
|
227
|
+
if (!Array.isArray(value.activeBaselineIds) || !value.activeBaselineIds.every((id) => isNonEmptyString(id))) {
|
|
228
|
+
return { valid: false, reason: 'activeBaselineIds must be an array of non-empty strings' };
|
|
229
|
+
}
|
|
230
|
+
if (!Array.isArray(value.clauses) || !value.clauses.every((c) => isValidPerChangeClause(c))) {
|
|
231
|
+
return { valid: false, reason: 'clauses must be an array of valid PerChangeClause values' };
|
|
232
|
+
}
|
|
233
|
+
return { valid: true };
|
|
234
|
+
}
|
|
235
|
+
// --- Per-clause evaluation result vocabulary (frozen vocabulary only; no producer in this batch) --
|
|
236
|
+
export const CLAUSE_RESULT_STATUSES = ['pass', 'fail', 'unavailable', 'conflict'];
|
|
237
|
+
/** Honest per-clause result vocabulary: `'unavailable'` requires a non-empty reason (never fabricated pass/fail); `'conflict'` requires at least 2 conflicting clause ids. */
|
|
238
|
+
export function isValidClauseEvaluationResult(value) {
|
|
239
|
+
if (!isPlainObject(value) || !isNonEmptyString(value.clauseId))
|
|
240
|
+
return false;
|
|
241
|
+
if (!isEvidenceReferenceArray(value.supportingEvidence))
|
|
242
|
+
return false;
|
|
243
|
+
switch (value.status) {
|
|
244
|
+
case 'pass':
|
|
245
|
+
case 'fail':
|
|
246
|
+
return !('reason' in value) && !('conflictingClauseIds' in value);
|
|
247
|
+
case 'unavailable':
|
|
248
|
+
return isNonEmptyString(value.reason) && !('conflictingClauseIds' in value);
|
|
249
|
+
case 'conflict':
|
|
250
|
+
return (isNonEmptyString(value.reason) &&
|
|
251
|
+
Array.isArray(value.conflictingClauseIds) &&
|
|
252
|
+
value.conflictingClauseIds.length >= 2 &&
|
|
253
|
+
value.conflictingClauseIds.every((id) => isNonEmptyString(id)));
|
|
254
|
+
default:
|
|
255
|
+
return false;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
// --- Overall verdict vocabulary (type only; no producer in this batch) -----------
|
|
259
|
+
export const OVERALL_VERDICTS = ['PASS', 'FAIL'];
|
|
260
|
+
//# sourceMappingURL=frontendContracts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontendContracts.js","sourceRoot":"","sources":["../../src/domain/frontendContracts.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAE1H,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,cAAc,IAAI,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAE1F,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AACvD,CAAC;AAED,SAAS,wBAAwB,CAAC,KAAc;IAC9C,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,CAAC;AACzF,CAAC;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG,wCAAiD,CAAC;AACxF,MAAM,CAAC,MAAM,uBAAuB,GAAG,OAAgB,CAAC;AAExD,iFAAiF;AAEjF,iHAAiH;AACjH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,WAAW,EAAE,oBAAoB,EAAE,WAAW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MAAM,EAAE,CAAC;QACrB,KAAK,MAAM,CAAC;QACZ,KAAK,MAAM;YACT,OAAO,CAAC,CAAC,QAAQ,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,sBAAsB,IAAI,KAAK,CAAC,CAAC;QACpE,KAAK,aAAa;YAChB,OAAO,gBAAgB,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,sBAAsB,IAAI,KAAK,CAAC,CAAC;QAC9E,KAAK,UAAU;YACb,OAAO,CACL,gBAAgB,CAAC,KAAK,CAAC,MAAM,CAAC;gBAC9B,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,oBAAoB,CAAC;gBACzC,KAAK,CAAC,oBAAoB,CAAC,MAAM,IAAI,CAAC;gBACtC,KAAK,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,EAAW,EAAE,EAAE,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,CACxE,CAAC;QACJ;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC;AAED,oFAAoF;AAEpF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAU,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -24,6 +24,28 @@ export { HORIZONTAL_ORDER_RELATIONSHIPS, VERTICAL_ORDER_RELATIONSHIPS, AREA_OVER
|
|
|
24
24
|
export type { DependencyProperty, DependencyDirection, ExpectedDependencySource, DependencyTermDeclaration, ExpectedDependencyDeclaration, DependencyEvidenceOutcome, ExpectedDependencyEvidence, ComparisonConfig, ComparabilityState, ComparabilityReasonCode, ComparabilityReasonSeverity, ComparabilityReason, ComparabilityResult, TargetConfigurationChangeKind, TargetConfigurationChange, DifferenceKind, ComparisonDifferenceSubject, ComparisonDifference, RelationshipChangeRecord, ComparisonSourceObservationReference, ComparisonArtifact, ComparisonSchemaValidationResult, } from './domain/comparison.js';
|
|
25
25
|
export { COMPARISON_ARTIFACT_KIND, COMPARISON_SCHEMA_VERSION, GEOMETRY_TOLERANCE_DEFAULT_PX, GEOMETRY_TOLERANCE_MIN_PX, GEOMETRY_TOLERANCE_MAX_PX, isValidGeometryTolerancePx, DEPENDENCY_PROPERTIES, DEPENDENCY_DIRECTIONS, EXPECTED_DEPENDENCY_SOURCES, isValidExpectedDependencyDeclaration, DEPENDENCY_EVIDENCE_OUTCOMES, isValidExpectedDependencyEvidence, isValidComparisonConfig, COMPARABILITY_STATES, COMPARABILITY_REASON_CODES, COMPARABILITY_REASON_SEVERITY, isValidComparabilityResult, TARGET_CONFIGURATION_CHANGE_KINDS, isValidTargetConfigurationChange, DIFFERENCE_KINDS, isValidComparisonDifference, isValidComparisonSourceObservationReference, isValidComparisonArtifact, } from './domain/comparison.js';
|
|
26
26
|
export { buildComparisonRequestIdentity, buildComparisonIdentity } from './domain/comparisonIdentity.js';
|
|
27
|
+
export type { AuthoredChangeScopeCategory, ChangeScopeClassification, ExpectedDependentMode, ContractTolerance, ContractPrimitiveKind, ContractPrimitive, FrontendContractClauseBase, BaselineClause, PerChangeClause, FrontendContractObservationReference, PersistentBaselineContract, FrontendContractValidationResult, PerChangeContract, ClauseResultStatus, ClauseEvaluationResult, OverallVerdict, } from './domain/frontendContracts.js';
|
|
28
|
+
export { CONTRACT_ARTIFACT_KIND, CONTRACT_SCHEMA_VERSION, AUTHORED_CHANGE_SCOPE_CATEGORIES, isAuthoredChangeScopeCategory, CHANGE_SCOPE_CLASSIFICATIONS, EXPECTED_DEPENDENT_MODES, isValidExpectedDependentMode, CONTRACT_TOLERANCE_ABSOLUTE_PX_MIN, CONTRACT_TOLERANCE_ABSOLUTE_PX_MAX, CONTRACT_TOLERANCE_PERCENT_MIN, CONTRACT_TOLERANCE_PERCENT_MAX, isValidContractTolerance, CONTRACT_PRIMITIVE_KINDS, isValidContractPrimitive, isValidBaselineClause, isValidPerChangeClause, isValidFrontendContractObservationReference, isValidPersistentBaselineContract, isValidPerChangeContract, CLAUSE_RESULT_STATUSES, isValidClauseEvaluationResult, OVERALL_VERDICTS, } from './domain/frontendContracts.js';
|
|
29
|
+
export { buildFrontendContractRequestIdentity, buildFrontendContractInstanceIdentity, buildClauseIdentity } from './domain/frontendContractIdentity.js';
|
|
30
|
+
export type { FrontendContractEvaluationInput, UnexpectedChangeResult, FrontendContractEvaluationResult, EvaluateFrontendContractResult } from './domain/frontendContractEvaluation.js';
|
|
31
|
+
export { evaluateFrontendContract } from './domain/frontendContractEvaluation.js';
|
|
32
|
+
export { buildFrontendContractEvaluationRequestIdentity } from './domain/frontendContractIdentity.js';
|
|
33
|
+
export type { FrontendContractEvaluationSourceReference, FrontendContractEvaluationArtifact, FrontendContractEvaluationArtifactValidationResult, BuildFrontendContractEvaluationArtifactInput, } from './domain/frontendContractEvaluationArtifact.js';
|
|
34
|
+
export { EVALUATION_ARTIFACT_KIND, EVALUATION_SCHEMA_VERSION, isValidFrontendContractEvaluationArtifact, buildFrontendContractEvaluationArtifact, } from './domain/frontendContractEvaluationArtifact.js';
|
|
35
|
+
export type { PersistedFrontendContractResult, WriteFrontendContractArtifactOptions } from './artifacts/frontendContractArtifactWriter.js';
|
|
36
|
+
export { FRONTEND_CONTRACT_MANIFEST_FILENAME, writePersistentBaselineContract, writePerChangeContract } from './artifacts/frontendContractArtifactWriter.js';
|
|
37
|
+
export type { ReadPersistentBaselineContractResult, ReadPerChangeContractResult } from './artifacts/frontendContractArtifactReader.js';
|
|
38
|
+
export { readPersistentBaselineContract, readPerChangeContract } from './artifacts/frontendContractArtifactReader.js';
|
|
39
|
+
export type { ReadComparisonArtifactResult } from './artifacts/comparisonArtifactReader.js';
|
|
40
|
+
export { readComparisonArtifact } from './artifacts/comparisonArtifactReader.js';
|
|
41
|
+
export type { PersistedFrontendContractEvaluationResult, WriteFrontendContractEvaluationArtifactOptions } from './artifacts/frontendContractEvaluationArtifactWriter.js';
|
|
42
|
+
export { EVALUATION_MANIFEST_FILENAME, writeFrontendContractEvaluationArtifact } from './artifacts/frontendContractEvaluationArtifactWriter.js';
|
|
43
|
+
export type { ReadFrontendContractEvaluationArtifactResult } from './artifacts/frontendContractEvaluationArtifactReader.js';
|
|
44
|
+
export { readFrontendContractEvaluationArtifact } from './artifacts/frontendContractEvaluationArtifactReader.js';
|
|
45
|
+
export type { EvaluateAndPersistOptions, ApplicationFrontendContractEvaluationResult } from './application/frontendContractEvaluationService.js';
|
|
46
|
+
export { DEFAULT_EVALUATION_OUTPUT_LOCATION, evaluateAndPersist, evaluateAndPersistFromArtifactRoots } from './application/frontendContractEvaluationService.js';
|
|
47
|
+
export type { PersistFrontendContractOptions, ApplicationApproveBaselineResult, ApplicationPersistChangeContractResult } from './application/frontendContractPersistenceService.js';
|
|
48
|
+
export { approveAndPersistBaseline, persistPerChangeContract } from './application/frontendContractPersistenceService.js';
|
|
27
49
|
export type { CompareObservationsResult } from './domain/comparisonEngine.js';
|
|
28
50
|
export { compareObservations, evaluateComparability, evaluateExpectedDependencies, compareTargetConfiguration } from './domain/comparisonEngine.js';
|
|
29
51
|
export type { PersistedComparisonResult, WriteComparisonArtifactOptions } from './artifacts/comparisonArtifactWriter.js';
|
package/dist/index.js
CHANGED
|
@@ -12,6 +12,18 @@ export { buildObservationArtifact, persistBrowserCapture, observe } from './appl
|
|
|
12
12
|
export { HORIZONTAL_ORDER_RELATIONSHIPS, VERTICAL_ORDER_RELATIONSHIPS, AREA_OVERLAP_RELATIONSHIPS, RELATIVE_WIDTH_RELATIONSHIPS, GEOMETRIC_FIT_RELATIONSHIPS, VERTICAL_SEQUENCE_RELATIONSHIPS, PAGE_WIDTH_RELATIONSHIPS, PAIRWISE_RELATIONSHIP_KINDS, PAGE_LEVEL_RELATIONSHIP_KINDS, MAX_CONFIGURED_TARGETS_FOR_RELATIONSHIPS, MAX_PAIRWISE_RELATIONSHIP_PAIRS, PAIRWISE_RELATIONSHIP_FAMILY_COUNT, MAX_PAIRWISE_RELATIONSHIP_RECORDS, CLIPPING_STATES, CLIPPING_OVERFLOW_STYLES, isValidEvidenceReference, isValidPairwiseLayoutRelationship, isValidPageLevelLayoutRelationship, isValidUnresolvedRelationshipTarget, isValidLayoutRelationshipGraph, isValidTargetClippingEvidence, deriveTargetClipping, deriveLayoutRelationships, } from './domain/relationships.js';
|
|
13
13
|
export { COMPARISON_ARTIFACT_KIND, COMPARISON_SCHEMA_VERSION, GEOMETRY_TOLERANCE_DEFAULT_PX, GEOMETRY_TOLERANCE_MIN_PX, GEOMETRY_TOLERANCE_MAX_PX, isValidGeometryTolerancePx, DEPENDENCY_PROPERTIES, DEPENDENCY_DIRECTIONS, EXPECTED_DEPENDENCY_SOURCES, isValidExpectedDependencyDeclaration, DEPENDENCY_EVIDENCE_OUTCOMES, isValidExpectedDependencyEvidence, isValidComparisonConfig, COMPARABILITY_STATES, COMPARABILITY_REASON_CODES, COMPARABILITY_REASON_SEVERITY, isValidComparabilityResult, TARGET_CONFIGURATION_CHANGE_KINDS, isValidTargetConfigurationChange, DIFFERENCE_KINDS, isValidComparisonDifference, isValidComparisonSourceObservationReference, isValidComparisonArtifact, } from './domain/comparison.js';
|
|
14
14
|
export { buildComparisonRequestIdentity, buildComparisonIdentity } from './domain/comparisonIdentity.js';
|
|
15
|
+
export { CONTRACT_ARTIFACT_KIND, CONTRACT_SCHEMA_VERSION, AUTHORED_CHANGE_SCOPE_CATEGORIES, isAuthoredChangeScopeCategory, CHANGE_SCOPE_CLASSIFICATIONS, EXPECTED_DEPENDENT_MODES, isValidExpectedDependentMode, CONTRACT_TOLERANCE_ABSOLUTE_PX_MIN, CONTRACT_TOLERANCE_ABSOLUTE_PX_MAX, CONTRACT_TOLERANCE_PERCENT_MIN, CONTRACT_TOLERANCE_PERCENT_MAX, isValidContractTolerance, CONTRACT_PRIMITIVE_KINDS, isValidContractPrimitive, isValidBaselineClause, isValidPerChangeClause, isValidFrontendContractObservationReference, isValidPersistentBaselineContract, isValidPerChangeContract, CLAUSE_RESULT_STATUSES, isValidClauseEvaluationResult, OVERALL_VERDICTS, } from './domain/frontendContracts.js';
|
|
16
|
+
export { buildFrontendContractRequestIdentity, buildFrontendContractInstanceIdentity, buildClauseIdentity } from './domain/frontendContractIdentity.js';
|
|
17
|
+
export { evaluateFrontendContract } from './domain/frontendContractEvaluation.js';
|
|
18
|
+
export { buildFrontendContractEvaluationRequestIdentity } from './domain/frontendContractIdentity.js';
|
|
19
|
+
export { EVALUATION_ARTIFACT_KIND, EVALUATION_SCHEMA_VERSION, isValidFrontendContractEvaluationArtifact, buildFrontendContractEvaluationArtifact, } from './domain/frontendContractEvaluationArtifact.js';
|
|
20
|
+
export { FRONTEND_CONTRACT_MANIFEST_FILENAME, writePersistentBaselineContract, writePerChangeContract } from './artifacts/frontendContractArtifactWriter.js';
|
|
21
|
+
export { readPersistentBaselineContract, readPerChangeContract } from './artifacts/frontendContractArtifactReader.js';
|
|
22
|
+
export { readComparisonArtifact } from './artifacts/comparisonArtifactReader.js';
|
|
23
|
+
export { EVALUATION_MANIFEST_FILENAME, writeFrontendContractEvaluationArtifact } from './artifacts/frontendContractEvaluationArtifactWriter.js';
|
|
24
|
+
export { readFrontendContractEvaluationArtifact } from './artifacts/frontendContractEvaluationArtifactReader.js';
|
|
25
|
+
export { DEFAULT_EVALUATION_OUTPUT_LOCATION, evaluateAndPersist, evaluateAndPersistFromArtifactRoots } from './application/frontendContractEvaluationService.js';
|
|
26
|
+
export { approveAndPersistBaseline, persistPerChangeContract } from './application/frontendContractPersistenceService.js';
|
|
15
27
|
export { compareObservations, evaluateComparability, evaluateExpectedDependencies, compareTargetConfiguration } from './domain/comparisonEngine.js';
|
|
16
28
|
export { COMPARISON_MANIFEST_FILENAME, writeComparisonArtifact } from './artifacts/comparisonArtifactWriter.js';
|
|
17
29
|
export { readObservationArtifact } from './artifacts/artifactReader.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MA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
(`my-frontend-observer@0.5.0`):
|
|
7
7
|
|
|
8
8
|
- `src/cli.ts` is the real, thin `observe` command entry point (argument
|
|
9
9
|
parsing/output only).
|
|
@@ -181,6 +181,103 @@ path never launches Chromium** - `src/cli.ts` imports nothing from
|
|
|
181
181
|
reading indirectly, through the application-layer seam above), matching the
|
|
182
182
|
same import-boundary discipline already enforced for `observe`.
|
|
183
183
|
|
|
184
|
+
## Current v0.5 architecture (released/current architecture)
|
|
185
|
+
|
|
186
|
+
v0.5 adds one new downstream layer that consumes `ComparisonArtifact` values
|
|
187
|
+
(plus the source `ObservationArtifact` pair) rather than producing them - no
|
|
188
|
+
new browser lifecycle, target resolver, or comparison engine is added:
|
|
189
|
+
|
|
190
|
+
```text
|
|
191
|
+
ObservationArtifact before + after
|
|
192
|
+
↓
|
|
193
|
+
existing v0.4 comparison/relationship pipeline (unchanged)
|
|
194
|
+
↓
|
|
195
|
+
ComparisonArtifact
|
|
196
|
+
↓ PersistentBaselineContract
|
|
197
|
+
| +
|
|
198
|
+
`------------------------→ PerChangeContract
|
|
199
|
+
↓
|
|
200
|
+
canonical contract evaluation
|
|
201
|
+
(src/domain/frontendContractEvaluation.ts#evaluateFrontendContract)
|
|
202
|
+
↓
|
|
203
|
+
clause results + unexpected changes + overall PASS/FAIL
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
`src/domain/frontendContracts.ts` froze the contract/change-scope type,
|
|
207
|
+
constant, and structural-validator vocabulary (Batch 1); `src/domain/
|
|
208
|
+
frontendContractIdentity.ts` froze deterministic contract/baseline/clause
|
|
209
|
+
identity in the same canonicalize+sha256(+opaque-nonce) style as `src/domain/
|
|
210
|
+
comparisonIdentity.ts`. `src/domain/frontendContractEvaluation.ts#evaluateFrontendContract`
|
|
211
|
+
(Batch 2) is the one canonical pure evaluation entry point: it validates its
|
|
212
|
+
five inputs (before/after `ObservationArtifact`, `ComparisonArtifact`,
|
|
213
|
+
`PersistentBaselineContract`, `PerChangeContract`) are structurally coherent
|
|
214
|
+
and mutually consistent, calculates the active baseline clause set after
|
|
215
|
+
explicit supersession, detects bounded structural conflicts, evaluates every
|
|
216
|
+
active clause via the frozen 15-primitive vocabulary against the existing
|
|
217
|
+
`ComparisonArtifact`/`ObservationArtifact` evidence (never re-deriving
|
|
218
|
+
clipping/relationship/scroll-owner facts), classifies unaccounted-for
|
|
219
|
+
`ComparisonArtifact.differences` entries as `unexpected`, and derives one
|
|
220
|
+
overall `PASS`/`FAIL` verdict. It performs no I/O, launches no browser, and
|
|
221
|
+
persists nothing - `src/domain/frontendContractEvaluation.ts` itself remains
|
|
222
|
+
untouched by the persistence layer below (Batch 3).
|
|
223
|
+
|
|
224
|
+
Batch 3 adds the persistence/application boundary around this frozen domain,
|
|
225
|
+
without redefining it:
|
|
226
|
+
|
|
227
|
+
```text
|
|
228
|
+
ComparisonArtifact (read via new src/artifacts/comparisonArtifactReader.ts)
|
|
229
|
+
+
|
|
230
|
+
PersistentBaselineContract / PerChangeContract
|
|
231
|
+
(read/written via src/artifacts/frontendContractArtifactReader.ts / ...Writer.ts)
|
|
232
|
+
↓
|
|
233
|
+
src/application/frontendContractEvaluationService.ts#evaluateAndPersist
|
|
234
|
+
↓
|
|
235
|
+
evaluateFrontendContract() [called exactly once, unmodified]
|
|
236
|
+
↓
|
|
237
|
+
src/domain/frontendContractEvaluationArtifact.ts
|
|
238
|
+
(minimal additive persisted envelope around the frozen result)
|
|
239
|
+
↓
|
|
240
|
+
src/artifacts/frontendContractEvaluationArtifactWriter.ts
|
|
241
|
+
(atomic write, exactly once on a structurally constructible result)
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
`evaluateAndPersistFromArtifactRoots` is the CLI-facing wrapper, reading
|
|
245
|
+
before/after observations through the existing `readObservationArtifact` (no
|
|
246
|
+
second observation reader), the comparison and both contract classes
|
|
247
|
+
through the new readers, then delegating to `evaluateAndPersist` exactly
|
|
248
|
+
once - mirroring `application/comparisonService.ts#compareAndPersistFromArtifactRoots`'s
|
|
249
|
+
own thin-wrapper shape.
|
|
250
|
+
|
|
251
|
+
Batch 4 exposes this through the same thin-CLI boundary already established
|
|
252
|
+
by `observe`/`compare`:
|
|
253
|
+
|
|
254
|
+
```text
|
|
255
|
+
src/cli.ts (argument parsing, JSON-file-shape checks, help/output formatting,
|
|
256
|
+
exit-code selection only)
|
|
257
|
+
↓
|
|
258
|
+
src/application/frontendContractPersistenceService.ts#approveAndPersistBaseline
|
|
259
|
+
src/application/frontendContractPersistenceService.ts#persistPerChangeContract
|
|
260
|
+
src/application/frontendContractEvaluationService.ts#evaluateAndPersistFromArtifactRoots
|
|
261
|
+
↓
|
|
262
|
+
domain validators (isValidPersistentBaselineContract / isValidPerChangeContract)
|
|
263
|
+
+ artifact readers/writers (Batch 3)
|
|
264
|
+
+ evaluateFrontendContract() (Batch 2, unmodified)
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Three new top-level commands - `approve-baseline`, `save-change-contract`,
|
|
268
|
+
`evaluate-contract` - each parse only CLI-syntax concerns (duplicate/missing
|
|
269
|
+
flags, JSON-file readability/parseability/object-root shape) and delegate to
|
|
270
|
+
exactly one application-layer call; `src/cli.ts` imports no artifact writer/
|
|
271
|
+
reader module and no browser code, matching the existing `observe`/`compare`
|
|
272
|
+
import-boundary discipline exactly. `approveAndPersistBaseline` adds the one
|
|
273
|
+
new coherence check Batch 3 did not need: verifying a baseline contract's
|
|
274
|
+
frozen `sourceObservation` reference actually matches the supplied
|
|
275
|
+
observation artifact before persisting - explicit approval only, never
|
|
276
|
+
inferred from a `compare` or `evaluate-contract` result. `--enforce` on
|
|
277
|
+
`evaluate-contract` is applied only after evaluation and persistence have
|
|
278
|
+
already completed; it selects the process exit status for an already-final
|
|
279
|
+
`FAIL` result and is never part of any identity or persisted field.
|
|
280
|
+
|
|
184
281
|
## Planned v0.1 architecture constraints
|
|
185
282
|
|
|
186
283
|
v0.1 planning must preserve these approved boundaries without treating module
|
package/docs/CI_CD.md
CHANGED
|
@@ -96,3 +96,50 @@ observations. This preserves every pre-existing v0.1-v0.3 packed
|
|
|
96
96
|
observation proof unchanged and adds the v0.4 proof additively, in the same
|
|
97
97
|
script and the same candidate, per the established same-candidate
|
|
98
98
|
architecture (no second `npm pack`, no per-platform rebuild).
|
|
99
|
+
|
|
100
|
+
## v0.5 readiness coverage
|
|
101
|
+
|
|
102
|
+
The packed-readiness coverage gap identified during the v0.5 implementation-
|
|
103
|
+
completeness audit as `V0_5_READINESS_VALIDATION_GAP_EXISTS` - the packed
|
|
104
|
+
candidate smoke exercised `observe`/`compare` but not `approve-baseline`/
|
|
105
|
+
`save-change-contract`/`evaluate-contract` - has been **corrected locally**:
|
|
106
|
+
`scripts/ci/runPackedObservationSmoke.mjs` now also installs the same
|
|
107
|
+
candidate tarball, observes a deterministic navigation/workspace/rail
|
|
108
|
+
fixture through the installed `observe`, and drives the complete installed
|
|
109
|
+
`approve-baseline` → `save-change-contract` → `observe` (candidate) →
|
|
110
|
+
`compare` → `evaluate-contract` sequence, proving both a fully successful
|
|
111
|
+
contract change (overall `PASS`, `--enforce` still exits `0`) and the
|
|
112
|
+
milestone-signature failure (a locally successful requested/expected-
|
|
113
|
+
dependent change alongside a real protected right-rail regression and a
|
|
114
|
+
real preserved navigation-clipping regression, overall `FAIL`) - including
|
|
115
|
+
`--enforce` producing a nonzero exit for the identical `FAIL` evidence
|
|
116
|
+
(`evaluationRequestId` and `clauseResults` unchanged), full source
|
|
117
|
+
observation/comparison/contract-artifact immutability, no copied
|
|
118
|
+
screenshots, and no repository-root artifact leakage. All product behavior
|
|
119
|
+
under test is invoked through the installed tarball's own executable, never
|
|
120
|
+
imported from the source checkout. This addition is exercised in every
|
|
121
|
+
existing matrix lane (`windows-latest`, `ubuntu-latest`, `macos-latest`)
|
|
122
|
+
because all three already invoke this same script against the same
|
|
123
|
+
candidate tarball - no workflow YAML change was required.
|
|
124
|
+
|
|
125
|
+
This correction has since been proven cross-platform on the validation
|
|
126
|
+
branch `validation/v0.5-pre-release`, first tested at commit
|
|
127
|
+
`90255a9175503664f3e65d4114ee205176b7040a`: GitHub Actions run
|
|
128
|
+
[`31727856546`](https://github.com/dailephd/my-frontend-observer/actions/runs/31727856546)
|
|
129
|
+
passed completely - the candidate job (Linux, Node 24) and all three
|
|
130
|
+
`matrix-smoke` lanes (`windows-latest` Node v24.18.1, `ubuntu-latest` Node
|
|
131
|
+
v24.19.0, `macos-latest` Node v24.18.0) - using one shared candidate
|
|
132
|
+
tarball, `my-frontend-observer-0.4.0.tgz`, SHA-256
|
|
133
|
+
`9533a53e475614cd80a29dfa8b0f85e533e3ad736596579f559479e90e78941a`,
|
|
134
|
+
independently hash-verified by each of the three matrix lanes before any of
|
|
135
|
+
them ran the smoke (no lane built its own tarball). Every lane's
|
|
136
|
+
`smoke-summary.json` reported byte-identical v0.5 evidence: the installed
|
|
137
|
+
candidate's `approve-baseline`/`save-change-contract`/`evaluate-contract`
|
|
138
|
+
`--help` all present, a real successful contract change (overall `PASS`,
|
|
139
|
+
`--enforce` exits `0`), and the real milestone-signature failure (requested/
|
|
140
|
+
expected-dependent `pass`, protected/preserved `fail`, overall `FAIL`,
|
|
141
|
+
identical `evaluationRequestId`/`clauseResults` with `--enforce` exiting `1`
|
|
142
|
+
and without it exiting `0`), plus source-artifact immutability, no copied
|
|
143
|
+
screenshot, no path leakage, and no repository-root leakage - alongside
|
|
144
|
+
every pre-existing v0.1-v0.4 packed observe/compare/scroll assertion, still
|
|
145
|
+
passing unchanged on all three platforms.
|