@reticlehq/core 2.13.1 → 2.14.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/dist/artifacts-entry.d.ts +20 -0
- package/dist/artifacts-entry.js +20 -0
- package/dist/consequence.d.ts +8 -1
- package/dist/consequence.js +11 -2
- package/dist/constants.d.ts +33 -0
- package/dist/constants.js +32 -0
- package/dist/dev-server-registry.d.ts +2 -2
- package/dist/event-payloads.d.ts +167 -10
- package/dist/event-payloads.js +40 -0
- package/dist/findings.d.ts +61 -0
- package/dist/findings.js +67 -0
- package/dist/flow-constants.d.ts +8 -0
- package/dist/flow-constants.js +8 -0
- package/dist/flow-types.d.ts +371 -133
- package/dist/flow-types.js +55 -3
- package/dist/global-press.d.ts +30 -0
- package/dist/global-press.js +54 -0
- package/dist/impact-savings.d.ts +7 -3
- package/dist/impact-savings.js +27 -4
- package/dist/impact.d.ts +96 -44
- package/dist/impact.js +21 -0
- package/dist/index.d.ts +16 -2
- package/dist/index.js +16 -2
- package/dist/instrumentation-gap.d.ts +15 -0
- package/dist/instrumentation-gap.js +16 -0
- package/dist/intent.d.ts +24 -24
- package/dist/journal.d.ts +7 -7
- package/dist/messages.d.ts +107 -46
- package/dist/messages.js +25 -0
- package/dist/net.d.ts +40 -0
- package/dist/net.js +40 -0
- package/dist/notices.d.ts +16 -0
- package/dist/notices.js +19 -0
- package/dist/redaction.d.ts +30 -0
- package/dist/redaction.js +127 -2
- package/dist/schema/event-message.json +1 -0
- package/dist/schema/event-type.json +1 -0
- package/dist/schema/hello-message.json +6 -0
- package/dist/schema/reticle-event.json +1 -0
- package/dist/schema/reticle-message.json +7 -0
- package/dist/telemetry-entry.d.ts +15 -0
- package/dist/telemetry-entry.js +15 -0
- package/dist/telemetry-feedback.d.ts +2 -2
- package/dist/telemetry-session.d.ts +2 -2
- package/dist/telemetry.d.ts +52 -50
- package/dist/types.d.ts +83 -44
- package/dist/types.js +20 -1
- package/dist/upgrade.d.ts +2 -2
- package/dist/verification-run.d.ts +36 -36
- package/dist/verified-constants.d.ts +11 -0
- package/dist/verified-constants.js +11 -0
- package/dist/verify-progress.d.ts +133 -0
- package/dist/verify-progress.js +78 -0
- package/package.json +9 -1
package/dist/findings.js
CHANGED
|
@@ -46,6 +46,18 @@ export const ContradictionKind = {
|
|
|
46
46
|
CONSEQUENCE_ELSEWHERE: 'consequence-elsewhere',
|
|
47
47
|
/** The same write fired more than once in one action — double-submit / retry storm. */
|
|
48
48
|
DUPLICATE_REQUEST: 'duplicate-request',
|
|
49
|
+
/**
|
|
50
|
+
* The same write fired repeatedly on an endpoint the assertion never named.
|
|
51
|
+
*
|
|
52
|
+
* A poll that bursts, a batched analytics beacon, a retry loop the caller was not asking about.
|
|
53
|
+
* The finding is real and worth reporting; what it is NOT is evidence about the consequence the
|
|
54
|
+
* caller declared. An app that polls could not produce a verdict at all -- every assertion that
|
|
55
|
+
* had already seen its consequence came back `unknown` behind writes it never mentioned (#673).
|
|
56
|
+
*
|
|
57
|
+
* ADVISORY, so it rides out in `contradictions` and decides nothing. `DUPLICATE_REQUEST` proper
|
|
58
|
+
* -- a burst on an endpoint the assertion DID name -- keeps its downgrade.
|
|
59
|
+
*/
|
|
60
|
+
DUPLICATE_REQUEST_UNRELATED: 'duplicate-request-unrelated',
|
|
49
61
|
/**
|
|
50
62
|
* Two reads of the same endpoint were in flight together and settled OUT OF ORDER, so the one the
|
|
51
63
|
* user asked for first is the one that landed last — and the screen is showing it.
|
|
@@ -131,6 +143,26 @@ export const ContradictionKind = {
|
|
|
131
143
|
* working does not), so it is reported with that ceiling stated rather than tuned into silence.
|
|
132
144
|
*/
|
|
133
145
|
ROUTE_RENDERED_NOTHING: 'route-rendered-nothing',
|
|
146
|
+
/**
|
|
147
|
+
* The route changed, nothing was rendered for it, AND the window holds a console error — the same
|
|
148
|
+
* shape as `ROUTE_RENDERED_NOTHING`, but with positive evidence of WHY the destination is blank,
|
|
149
|
+
* not merely its absence.
|
|
150
|
+
*
|
|
151
|
+
* `ROUTE_RENDERED_NOTHING` is deliberately absence-derived: a route that renders nothing might be a
|
|
152
|
+
* false positive (a view revealed from DOM that already existed — the 1-in-11 case measured on its
|
|
153
|
+
* own doc comment), so it downgrades to UNKNOWN rather than assert a fault nobody proved. That
|
|
154
|
+
* caution is wrong for THIS case. A console error in the same window is not an absence of
|
|
155
|
+
* evidence, it is a specific, positive claim — the destination crashed, and the app's own error
|
|
156
|
+
* boundary or console said so. Reported `unknown` anyway once, when a route-rendered-nothing
|
|
157
|
+
* window also carried a React hooks error: the console errors and the empty destination were both
|
|
158
|
+
* in hand, and the honest answer was available and not given.
|
|
159
|
+
*
|
|
160
|
+
* NOT in `ABSENCE_DERIVED_CONTRADICTIONS` — this is exactly the "evidence AGAINST the action"
|
|
161
|
+
* category that set exists to distinguish itself from, and it is graded `NO` for the same reason
|
|
162
|
+
* `ui-advanced-request-failed` is: a definitive verdict is available and inconclusive is a weaker,
|
|
163
|
+
* wrong answer to give when it is.
|
|
164
|
+
*/
|
|
165
|
+
ROUTE_RENDERED_NOTHING_CRASHED: 'route-rendered-nothing-crashed',
|
|
134
166
|
/**
|
|
135
167
|
* Everything this window held belongs to a document that has SINCE been replaced.
|
|
136
168
|
*
|
|
@@ -223,6 +255,31 @@ export const ABSENCE_DERIVED_CONTRADICTIONS = new Set([
|
|
|
223
255
|
export function isAbsenceDerived(kind) {
|
|
224
256
|
return ABSENCE_DERIVED_CONTRADICTIONS.has(kind);
|
|
225
257
|
}
|
|
258
|
+
/**
|
|
259
|
+
* Findings that are REPORTED and decide nothing.
|
|
260
|
+
*
|
|
261
|
+
* The two existing tiers both move a verdict: OBSERVED answers `no`, ABSENCE_DERIVED downgrades to
|
|
262
|
+
* `unknown`. Neither fits a fact that is true, worth telling the caller, and simply not about the
|
|
263
|
+
* question the caller asked.
|
|
264
|
+
*
|
|
265
|
+
* That gap had a cost. An app that polls on an interval could not produce a verdict at all: a camera
|
|
266
|
+
* scan loop POSTing until it acquired a lock had every assertion -- ones that had already seen the
|
|
267
|
+
* person recognised, the heading, the 200s -- come back `unknown`, because writes the assertion
|
|
268
|
+
* never mentioned counted against it. The caller then reports `pass: true` with correct evidence and
|
|
269
|
+
* has to explain in prose that Reticle's own verdict is wrong, which erodes the reason to have a
|
|
270
|
+
* verdict (#673).
|
|
271
|
+
*
|
|
272
|
+
* The bar for adding a kind here is high, and it is not "this rule is noisy". It is that the finding
|
|
273
|
+
* cannot, even in principle, be evidence about the declared consequence -- because it concerns
|
|
274
|
+
* traffic the assertion did not name.
|
|
275
|
+
*/
|
|
276
|
+
export const ADVISORY_CONTRADICTIONS = new Set([
|
|
277
|
+
ContradictionKind.DUPLICATE_REQUEST_UNRELATED,
|
|
278
|
+
]);
|
|
279
|
+
/** True when this kind is reported alongside a verdict without changing it. */
|
|
280
|
+
export function isAdvisory(kind) {
|
|
281
|
+
return ADVISORY_CONTRADICTIONS.has(kind);
|
|
282
|
+
}
|
|
226
283
|
/**
|
|
227
284
|
* How much authority a finding carries — the distinction above, said out loud on the finding itself.
|
|
228
285
|
*
|
|
@@ -243,6 +300,14 @@ export const FindingTier = {
|
|
|
243
300
|
* become true a moment later. It is a statement about our timing at least as much as about the app.
|
|
244
301
|
*/
|
|
245
302
|
ABSENCE_DERIVED: 'absence-derived',
|
|
303
|
+
/**
|
|
304
|
+
* True, reported, and not about the question asked. Traffic the assertion never named.
|
|
305
|
+
*
|
|
306
|
+
* Distinct from ABSENCE_DERIVED, which IS about the declared consequence and says our timing was
|
|
307
|
+
* inconclusive about it. This one is about something else entirely, so downgrading on it answers a
|
|
308
|
+
* question nobody put.
|
|
309
|
+
*/
|
|
310
|
+
ADVISORY: 'advisory',
|
|
246
311
|
};
|
|
247
312
|
/**
|
|
248
313
|
* The tier of a finding, DERIVED from its kind.
|
|
@@ -258,6 +323,8 @@ export const FindingTier = {
|
|
|
258
323
|
* end Reticle chose, so downgrading it would invent a caveat on its author's behalf.
|
|
259
324
|
*/
|
|
260
325
|
export function tierOfFinding(kind) {
|
|
326
|
+
if (isAdvisory(kind))
|
|
327
|
+
return FindingTier.ADVISORY;
|
|
261
328
|
return isAbsenceDerived(kind) ? FindingTier.ABSENCE_DERIVED : FindingTier.OBSERVED;
|
|
262
329
|
}
|
|
263
330
|
/**
|
package/dist/flow-constants.d.ts
CHANGED
|
@@ -100,6 +100,14 @@ export declare const DriftReason: {
|
|
|
100
100
|
* hunting for the nearest testid to the literal word "unresolved".
|
|
101
101
|
*/
|
|
102
102
|
readonly ANCHOR_DEGRADED: "anchor_degraded";
|
|
103
|
+
/**
|
|
104
|
+
* The step's anchor resolved and its action ran; the testid its `expect.element` names was absent
|
|
105
|
+
* afterwards. Distinct from TESTID_NOT_FOUND for the same reason ANCHOR_DEGRADED is: "the element
|
|
106
|
+
* you clicked is gone" and "the thing you asserted afterwards never appeared" need different
|
|
107
|
+
* fixes, and reporting the second as the first sends the caller looking for a renamed anchor on a
|
|
108
|
+
* step whose anchor was fine.
|
|
109
|
+
*/
|
|
110
|
+
readonly EXPECT_ELEMENT_NOT_FOUND: "expect_element_not_found";
|
|
103
111
|
};
|
|
104
112
|
export type DriftReason = (typeof DriftReason)[keyof typeof DriftReason];
|
|
105
113
|
/** Default timeout (ms) a signal anchor waits to be observed at replay. */
|
package/dist/flow-constants.js
CHANGED
|
@@ -94,6 +94,14 @@ export const DriftReason = {
|
|
|
94
94
|
* hunting for the nearest testid to the literal word "unresolved".
|
|
95
95
|
*/
|
|
96
96
|
ANCHOR_DEGRADED: 'anchor_degraded',
|
|
97
|
+
/**
|
|
98
|
+
* The step's anchor resolved and its action ran; the testid its `expect.element` names was absent
|
|
99
|
+
* afterwards. Distinct from TESTID_NOT_FOUND for the same reason ANCHOR_DEGRADED is: "the element
|
|
100
|
+
* you clicked is gone" and "the thing you asserted afterwards never appeared" need different
|
|
101
|
+
* fixes, and reporting the second as the first sends the caller looking for a renamed anchor on a
|
|
102
|
+
* step whose anchor was fine.
|
|
103
|
+
*/
|
|
104
|
+
EXPECT_ELEMENT_NOT_FOUND: 'expect_element_not_found',
|
|
97
105
|
};
|
|
98
106
|
/** Default timeout (ms) a signal anchor waits to be observed at replay. */
|
|
99
107
|
export const FLOW_SIGNAL_TIMEOUT_MS = 4000;
|