@reticlehq/core 2.14.0 → 3.1.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 → artifacts/artifacts-entry.d.ts} +7 -7
- package/dist/{artifacts-entry.js → artifacts/artifacts-entry.js} +7 -7
- package/dist/artifacts/flow-composition.d.ts +30 -0
- package/dist/artifacts/flow-composition.js +19 -0
- package/dist/{flow-constants.d.ts → artifacts/flow-constants.d.ts} +89 -3
- package/dist/{flow-constants.js → artifacts/flow-constants.js} +95 -4
- package/dist/artifacts/flow-mutation-target.d.ts +39 -0
- package/dist/artifacts/flow-mutation-target.js +89 -0
- package/dist/artifacts/flow-order.d.ts +30 -0
- package/dist/artifacts/flow-order.js +49 -0
- package/dist/artifacts/flow-select.d.ts +56 -0
- package/dist/artifacts/flow-select.js +56 -0
- package/dist/artifacts/flow-step-tool.d.ts +31 -0
- package/dist/artifacts/flow-step-tool.js +31 -0
- package/dist/artifacts/flow-types.d.ts +3736 -0
- package/dist/artifacts/flow-types.js +463 -0
- package/dist/artifacts/flow-unreached.d.ts +12 -0
- package/dist/artifacts/flow-unreached.js +24 -0
- package/dist/{impact.d.ts → artifacts/impact.d.ts} +119 -103
- package/dist/{impact.js → artifacts/impact.js} +14 -5
- package/dist/{journal.d.ts → artifacts/journal.d.ts} +51 -7
- package/dist/{journal.js → artifacts/journal.js} +38 -2
- package/dist/artifacts/step-effect.d.ts +29 -0
- package/dist/artifacts/step-effect.js +28 -0
- package/dist/hooks/hook-events.d.ts +311 -0
- package/dist/hooks/hook-events.js +127 -0
- package/dist/hooks/hooks-entry.d.ts +9 -0
- package/dist/hooks/hooks-entry.js +9 -0
- package/dist/{brand.d.ts → identity/brand.d.ts} +7 -0
- package/dist/{contract-fingerprint.d.ts → identity/contract-fingerprint.d.ts} +21 -3
- package/dist/{contract-fingerprint.js → identity/contract-fingerprint.js} +22 -4
- package/dist/{document-identity.d.ts → identity/document-identity.d.ts} +4 -5
- package/dist/{document-identity.js → identity/document-identity.js} +4 -5
- package/dist/{source-constants.d.ts → identity/source-constants.d.ts} +4 -4
- package/dist/{source-constants.js → identity/source-constants.js} +4 -4
- package/dist/index.d.ts +56 -43
- package/dist/index.js +65 -45
- package/dist/onboarding.d.ts +114 -0
- package/dist/onboarding.js +141 -0
- package/dist/realm/registry.d.ts +212 -0
- package/dist/realm/registry.js +302 -0
- package/dist/{dev-server-registry.d.ts → registry/dev-server-registry.d.ts} +6 -7
- package/dist/{dev-server-registry.js → registry/dev-server-registry.js} +28 -19
- package/dist/{project-registry.d.ts → registry/project-registry.d.ts} +5 -5
- package/dist/{project-registry.js → registry/project-registry.js} +5 -5
- package/dist/schema/command-name.json +31 -0
- package/dist/schema/event-payloads.json +791 -0
- package/dist/schema/hello-message.json +70 -2
- package/dist/schema/reticle-message.json +70 -2
- package/dist/telemetry-entry.d.ts +1 -1
- package/dist/telemetry-entry.js +1 -1
- package/dist/telemetry-feedback.d.ts +15 -16
- package/dist/telemetry-feedback.js +11 -12
- package/dist/telemetry-license.d.ts +1 -1
- package/dist/telemetry-license.js +1 -1
- package/dist/telemetry-refusal.d.ts +11 -11
- package/dist/telemetry-refusal.js +7 -8
- package/dist/telemetry-session.d.ts +51 -59
- package/dist/telemetry-session.js +47 -55
- package/dist/telemetry.d.ts +243 -214
- package/dist/telemetry.js +83 -98
- package/dist/tour-entry.d.ts +10 -0
- package/dist/tour-entry.js +10 -0
- package/dist/tour.d.ts +125 -0
- package/dist/tour.js +165 -0
- package/dist/{consequence.d.ts → verdict/consequence.d.ts} +32 -15
- package/dist/{consequence.js → verdict/consequence.js} +9 -31
- package/dist/{finding-fingerprint.js → verdict/finding-fingerprint.js} +1 -1
- package/dist/{findings.d.ts → verdict/findings.d.ts} +86 -39
- package/dist/{findings.js → verdict/findings.js} +103 -49
- package/dist/{instrumentation-gap.d.ts → verdict/instrumentation-gap.d.ts} +7 -14
- package/dist/{instrumentation-gap.js → verdict/instrumentation-gap.js} +7 -15
- package/dist/{intent.d.ts → verdict/intent.d.ts} +35 -46
- package/dist/{intent.js → verdict/intent.js} +11 -22
- package/dist/verdict/revision.d.ts +44 -0
- package/dist/verdict/revision.js +53 -0
- package/dist/{run-context.d.ts → verdict/run-context.d.ts} +13 -34
- package/dist/{run-context.js → verdict/run-context.js} +15 -36
- package/dist/{security.js → verdict/security.js} +12 -21
- package/dist/{verification-run.d.ts → verdict/verification-run.d.ts} +381 -105
- package/dist/{verification-run.js → verdict/verification-run.js} +157 -21
- package/dist/{verified-constants.d.ts → verdict/verified-constants.d.ts} +25 -13
- package/dist/{verified-constants.js → verdict/verified-constants.js} +25 -13
- package/dist/{verify-progress.d.ts → verdict/verify-progress.d.ts} +18 -22
- package/dist/{verify-progress.js → verdict/verify-progress.js} +6 -10
- package/dist/wire/channel.d.ts +46 -0
- package/dist/wire/channel.js +95 -0
- package/dist/{constants.d.ts → wire/constants/constants.d.ts} +91 -28
- package/dist/{constants.js → wire/constants/constants.js} +105 -28
- package/dist/{session-constants.d.ts → wire/constants/session-constants.d.ts} +9 -2
- package/dist/{session-constants.js → wire/constants/session-constants.js} +9 -2
- package/dist/{desktop-contract.js → wire/desktop-contract.js} +1 -1
- package/dist/{event-classification.js → wire/event-classification.js} +1 -1
- package/dist/{event-payloads.d.ts → wire/event-payloads.d.ts} +68 -13
- package/dist/{event-payloads.js → wire/event-payloads.js} +21 -3
- package/dist/{event-priority.d.ts → wire/event-priority.d.ts} +1 -4
- package/dist/{event-priority.js → wire/event-priority.js} +2 -5
- package/dist/{global-press.js → wire/global-press.js} +1 -1
- package/dist/{messages.d.ts → wire/messages.d.ts} +239 -48
- package/dist/{messages.js → wire/messages.js} +68 -5
- package/dist/wire/narrow.d.ts +39 -0
- package/dist/wire/narrow.js +45 -0
- package/dist/{net.d.ts → wire/net.d.ts} +12 -13
- package/dist/{net.js → wire/net.js} +12 -13
- package/dist/wire/platform.d.ts +37 -0
- package/dist/wire/platform.js +36 -0
- package/dist/{redaction.js → wire/redaction.js} +12 -12
- package/dist/wire/tool-names.d.ts +133 -0
- package/dist/wire/tool-names.js +142 -0
- package/dist/{toon.js → wire/toon.js} +1 -1
- package/dist/{types.d.ts → wire/types.d.ts} +77 -76
- package/dist/{types.js → wire/types.js} +4 -3
- package/dist/{no-session-reason.d.ts → words/no-session-reason.d.ts} +7 -3
- package/dist/{no-session-reason.js → words/no-session-reason.js} +7 -3
- package/dist/{notices.d.ts → words/notices.d.ts} +8 -12
- package/dist/{notices.js → words/notices.js} +8 -12
- package/package.json +16 -7
- package/dist/flow-types.d.ts +0 -1711
- package/dist/flow-types.js +0 -247
- package/dist/{impact-savings.d.ts → artifacts/impact-savings.d.ts} +0 -0
- package/dist/{impact-savings.js → artifacts/impact-savings.js} +0 -0
- package/dist/{brand.js → identity/brand.js} +0 -0
- package/dist/{edit-epoch.d.ts → identity/edit-epoch.d.ts} +0 -0
- package/dist/{edit-epoch.js → identity/edit-epoch.js} +0 -0
- package/dist/{project-id.d.ts → identity/project-id.d.ts} +0 -0
- package/dist/{project-id.js → identity/project-id.js} +0 -0
- package/dist/{daemon-registry.d.ts → registry/daemon-registry.d.ts} +0 -0
- package/dist/{daemon-registry.js → registry/daemon-registry.js} +0 -0
- package/dist/{finding-fingerprint.d.ts → verdict/finding-fingerprint.d.ts} +0 -0
- package/dist/{security.d.ts → verdict/security.d.ts} +0 -0
- package/dist/{desktop-contract.d.ts → wire/desktop-contract.d.ts} +0 -0
- package/dist/{event-classification.d.ts → wire/event-classification.d.ts} +0 -0
- package/dist/{global-press.d.ts → wire/global-press.d.ts} +0 -0
- package/dist/{redaction.d.ts → wire/redaction.d.ts} +0 -0
- package/dist/{state-select.d.ts → wire/state-select.d.ts} +0 -0
- package/dist/{state-select.js → wire/state-select.js} +0 -0
- package/dist/{toon.d.ts → wire/toon.d.ts} +0 -0
- package/dist/{browser-misdirect.d.ts → words/browser-misdirect.d.ts} +0 -0
- package/dist/{browser-misdirect.js → words/browser-misdirect.js} +0 -0
- package/dist/{unreachable-notice.d.ts → words/unreachable-notice.d.ts} +0 -0
- package/dist/{unreachable-notice.js → words/unreachable-notice.js} +0 -0
- package/dist/{upgrade.d.ts → words/upgrade.d.ts} +2 -2
- /package/dist/{upgrade.js → words/upgrade.js} +0 -0
|
@@ -1,18 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* What a verification can FIND — the vocabulary of faults and contradictions shared by the crawl,
|
|
3
|
-
* the contradiction hunter and the tools that report them.
|
|
4
|
-
* file under the size cap.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Cross-channel contradictions: two observation channels making INCOMPATIBLE claims about the same
|
|
8
|
-
* action. This is the bug class a human structurally cannot see, because a human has one channel
|
|
9
|
-
* open — the screen. The agent holds DOM, store, signals, console and network in one causally
|
|
10
|
-
* ordered window and can notice they disagree.
|
|
11
|
-
*
|
|
12
|
-
* Every kind here describes a shipped-today false green: the run is green, the screen looks right,
|
|
13
|
-
* and the app is wrong. Contrast `CrawlAnomalyKind`, whose members are all SINGLE-channel facts (an
|
|
14
|
-
* error was logged; a request failed) — those are findable by reading one stream.
|
|
3
|
+
* the contradiction hunter and the tools that report them.
|
|
15
4
|
*/
|
|
5
|
+
import { ChannelId, disagreementCanConvict } from '../wire/channel.js';
|
|
16
6
|
export const ContradictionKind = {
|
|
17
7
|
/** The screen moved forward while a request in the same window failed — the swallowed rejection. */
|
|
18
8
|
UI_ADVANCED_REQUEST_FAILED: 'ui-advanced-request-failed',
|
|
@@ -29,7 +19,7 @@ export const ContradictionKind = {
|
|
|
29
19
|
* "dispatched but the app did NOTHING (no DOM/net/route/signal)", so firing a signal was enough to
|
|
30
20
|
* rescue a control that did nothing at all. That is the hole. An app whose signal is emitted from
|
|
31
21
|
* the value it was ASKED for rather than the one it COMMITTED gets a verdict at signal grade —
|
|
32
|
-
* the strongest
|
|
22
|
+
* the strongest grade there is — for a click that changed nothing. On the bench fixture: a
|
|
33
23
|
* modal that never opened came back `verified: "yes" / proved`.
|
|
34
24
|
*
|
|
35
25
|
* Absence-derived on purpose (see below). "Nothing corroborated it" is not "it did not happen":
|
|
@@ -37,6 +27,20 @@ export const ContradictionKind = {
|
|
|
37
27
|
* so the false green cannot stand, without asserting a fault nobody proved.
|
|
38
28
|
*/
|
|
39
29
|
SIGNAL_WITHOUT_CONSEQUENCE: 'signal-without-consequence',
|
|
30
|
+
/**
|
|
31
|
+
* The store committed and the screen never moved.
|
|
32
|
+
*
|
|
33
|
+
* `response-ignored` covers *a write succeeded and nothing moved*; `action-had-no-effect` covers
|
|
34
|
+
* *the click did nothing at all*. Neither covers the commonest render defect there is: state
|
|
35
|
+
* commits and the component that should have re-rendered does not — a memo with a stale
|
|
36
|
+
* comparator, a key that never changes, a selector reading the wrong slice. The app is internally
|
|
37
|
+
* consistent and the user is looking at the old value.
|
|
38
|
+
*
|
|
39
|
+
* Absence-derived, for the same reason as the entry above: a store holds plenty that was never
|
|
40
|
+
* meant to paint — an analytics flag, a timer, a cached token — so "nothing rendered" is not proof
|
|
41
|
+
* of a fault. It removes the false green and never invents a NO.
|
|
42
|
+
*/
|
|
43
|
+
STATE_VS_RENDER: 'state-vs-render',
|
|
40
44
|
/**
|
|
41
45
|
* A write succeeded on the server and nothing moved in THIS document — because the page opened
|
|
42
46
|
* another browsing context (an OAuth popup is the archetype) and the consequence lives there,
|
|
@@ -96,7 +100,7 @@ export const ContradictionKind = {
|
|
|
96
100
|
* PATCH honouring a subset, an enum falling back to a default. The status is 2xx, the body reports
|
|
97
101
|
* no failure, the UI advanced, the page settled — so every channel except the payload agrees the
|
|
98
102
|
* save worked, and the screen goes on showing the value the user typed rather than the value that
|
|
99
|
-
* was stored
|
|
103
|
+
* was stored — a write asking for `locale: fr` and echoing `locale: en`.
|
|
100
104
|
*/
|
|
101
105
|
WRITE_FIELD_IGNORED: 'write-field-ignored',
|
|
102
106
|
/** The UI advanced while a request was still in flight, so `settled` was reported over a live call. */
|
|
@@ -115,9 +119,8 @@ export const ContradictionKind = {
|
|
|
115
119
|
* `dispatched: true, settled: true`, and every observation channel reports an empty window. The
|
|
116
120
|
* settle half is the trap — a page that does nothing is quiet, and quiet is exactly what `settled`
|
|
117
121
|
* tests for, so `until: { kind: 'settled' }` PASSES on a dead click and the verdict read
|
|
118
|
-
* `verified: "yes", because: "no channel disagreeing"`.
|
|
119
|
-
*
|
|
120
|
-
* beside it: zero events, store unchanged, green verdict.
|
|
122
|
+
* `verified: "yes", because: "no channel disagreeing"`. The shape that produces it: a `by: 'text'`
|
|
123
|
+
* query resolves a `styled.div` instead of the button beside it, and the click lands on nothing.
|
|
121
124
|
*/
|
|
122
125
|
ACTION_HAD_NO_EFFECT: 'action-had-no-effect',
|
|
123
126
|
/**
|
|
@@ -125,22 +128,18 @@ export const ContradictionKind = {
|
|
|
125
128
|
* The URL says you arrived somewhere; the page is blank.
|
|
126
129
|
*
|
|
127
130
|
* This is the class every "did the control work" heuristic misses, because the control DID work:
|
|
128
|
-
* it navigated.
|
|
129
|
-
*
|
|
130
|
-
* `deadControls: 0` — correctly, by its own definition, since a route change is activity.
|
|
131
|
+
* it navigated. A crawler counting dead controls reports none, correctly by its own definition,
|
|
132
|
+
* since a route change IS activity.
|
|
131
133
|
*
|
|
132
|
-
* The discriminator
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
* or renders something.
|
|
134
|
+
* The discriminator: a working nav emits `domAdded: 1, network: 2`; a blank one emits
|
|
135
|
+
* `domAdded: 0, domRemoved: 0, network: 0`. A real transition either fetches something or renders
|
|
136
|
+
* something.
|
|
136
137
|
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
* Over-warning is the safe direction here (a false alarm costs a glance; a blank page shipped as
|
|
143
|
-
* working does not), so it is reported with that ceiling stated rather than tuned into silence.
|
|
138
|
+
* THE LIMIT IS REAL, and is not fixable by tuning: a route whose view is REVEALED from DOM that
|
|
139
|
+
* already existed emits `route.change` + `dom.attr` and nothing else, which is byte-for-byte the
|
|
140
|
+
* window a blank destination emits. No event-only rule separates them. Over-warning is the safe
|
|
141
|
+
* direction (a false alarm costs a glance; a blank page shipped as working does not), so this is
|
|
142
|
+
* reported with the ceiling stated rather than tuned into silence.
|
|
144
143
|
*/
|
|
145
144
|
ROUTE_RENDERED_NOTHING: 'route-rendered-nothing',
|
|
146
145
|
/**
|
|
@@ -206,26 +205,22 @@ export const ContradictionKind = {
|
|
|
206
205
|
/**
|
|
207
206
|
* Contradictions inferred from the ABSENCE of evidence in a window whose end Reticle itself chose.
|
|
208
207
|
*
|
|
209
|
-
* The distinction
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
* exists to catch.
|
|
208
|
+
* The distinction decides whether Reticle is entitled to say an action FAILED. The other kinds are
|
|
209
|
+
* POSITIVELY observed — a request came back 500 while the UI advanced, a signal fired carrying data
|
|
210
|
+
* that disagrees with the DOM, a written field echoed a different value — and they must keep
|
|
211
|
+
* outranking a passing assertion, because a green assertion on top of a failed write is the bug
|
|
212
|
+
* class this product exists to catch.
|
|
215
213
|
*
|
|
216
|
-
* These five
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
* consequence observation, which inverts the grade hierarchy the verifier is built on.
|
|
214
|
+
* These five say only "the thing I expected had not happened YET when I stopped looking", and the
|
|
215
|
+
* window closes the moment the predicate first passes — on an app that navigates optimistically,
|
|
216
|
+
* routinely before the network drains. Letting one assert NO makes a timing observation overrule a
|
|
217
|
+
* consequence observation, which inverts the grade hierarchy the verifier is built on: the bench app
|
|
218
|
+
* produces a `no` over a fired signal with matching data, changed state, a stored token and a clean
|
|
219
|
+
* capture, because one POST had not settled.
|
|
223
220
|
*
|
|
224
221
|
* A false negative is not the mirror of a false positive here. A false positive stops an agent
|
|
225
222
|
* early; a false NEGATIVE makes it redo work that already succeeded, or stop trusting the verdict
|
|
226
|
-
* channel — and the verdict channel is the product.
|
|
227
|
-
* reason: every `attribution: 'app'` on `request-never-settled` turned out to be a misattribution.
|
|
228
|
-
* We removed the field and left the verdict.
|
|
223
|
+
* channel — and the verdict channel is the product.
|
|
229
224
|
*
|
|
230
225
|
* So these downgrade a verdict to UNKNOWN rather than asserting NO. The finding is still reported in
|
|
231
226
|
* `contradictions` either way — nothing is hidden, and an agent that wants to wait and re-check has
|
|
@@ -238,6 +233,9 @@ export const ABSENCE_DERIVED_CONTRADICTIONS = new Set([
|
|
|
238
233
|
// never proof the app is wrong — a signal about non-visual state has nothing to corroborate it by
|
|
239
234
|
// construction. UNKNOWN removes the false green; NO would invent a fault.
|
|
240
235
|
ContradictionKind.SIGNAL_WITHOUT_CONSEQUENCE,
|
|
236
|
+
// The store moved and nothing painted. Non-visual state is a legitimate reason for that, so the
|
|
237
|
+
// absence of a render is never by itself proof the app is wrong.
|
|
238
|
+
ContradictionKind.STATE_VS_RENDER,
|
|
241
239
|
// The consequence is not missing, it is somewhere this document's SDK cannot look — a claim about
|
|
242
240
|
// the reach of the observation, never a positive fault in the app.
|
|
243
241
|
ContradictionKind.CONSEQUENCE_ELSEWHERE,
|
|
@@ -297,13 +295,14 @@ export const FindingTier = {
|
|
|
297
295
|
OBSERVED: 'observed',
|
|
298
296
|
/**
|
|
299
297
|
* Inferred from something NOT having happened yet, in a window whose end Reticle chose. It may
|
|
300
|
-
* become true a moment later. It is a statement about
|
|
298
|
+
* become true a moment later. It is a statement about the window's timing at least as much as
|
|
299
|
+
* about the app.
|
|
301
300
|
*/
|
|
302
301
|
ABSENCE_DERIVED: 'absence-derived',
|
|
303
302
|
/**
|
|
304
303
|
* True, reported, and not about the question asked. Traffic the assertion never named.
|
|
305
304
|
*
|
|
306
|
-
* Distinct from ABSENCE_DERIVED, which IS about the declared consequence and says
|
|
305
|
+
* Distinct from ABSENCE_DERIVED, which IS about the declared consequence and says the timing was
|
|
307
306
|
* inconclusive about it. This one is about something else entirely, so downgrading on it answers a
|
|
308
307
|
* question nobody put.
|
|
309
308
|
*/
|
|
@@ -333,6 +332,61 @@ export function tierOfFinding(kind) {
|
|
|
333
332
|
* write. Narrowing to writes is what keeps the rules from crying wolf on ordinary reads.
|
|
334
333
|
*/
|
|
335
334
|
export const MUTATING_METHODS = ['POST', 'PUT', 'PATCH', 'DELETE', 'IPC'];
|
|
335
|
+
/**
|
|
336
|
+
* Which two channels each contradiction sets against each other.
|
|
337
|
+
*
|
|
338
|
+
* `Record<ContradictionKind, ...>` on purpose: a new kind does not compile until somebody says what
|
|
339
|
+
* it compares. That is the point -- the independence rule is only checkable if the pairing is
|
|
340
|
+
* written down, and until now it was carried in the head of whoever added the rule.
|
|
341
|
+
*
|
|
342
|
+
* The pairing is causal, not observational: it names where each side of the disagreement was
|
|
343
|
+
* PRODUCED. A screenshot is `ui` even though it is taken out of process, because the pixels came
|
|
344
|
+
* from the render the action caused.
|
|
345
|
+
*/
|
|
346
|
+
export const CONTRADICTION_CHANNELS = {
|
|
347
|
+
[ContradictionKind.UI_ADVANCED_REQUEST_FAILED]: [ChannelId.UI, ChannelId.NET],
|
|
348
|
+
[ContradictionKind.SIGNAL_CONTRADICTED]: [ChannelId.SIGNAL, ChannelId.NET],
|
|
349
|
+
[ContradictionKind.RESPONSE_IGNORED]: [ChannelId.NET, ChannelId.UI],
|
|
350
|
+
[ContradictionKind.SIGNAL_WITHOUT_CONSEQUENCE]: [ChannelId.SIGNAL, ChannelId.NET],
|
|
351
|
+
// The two channels that disagree are the store and the screen it should have driven.
|
|
352
|
+
[ContradictionKind.STATE_VS_RENDER]: [ChannelId.STATE, ChannelId.UI],
|
|
353
|
+
[ContradictionKind.CONSEQUENCE_ELSEWHERE]: [ChannelId.NET, ChannelId.UI],
|
|
354
|
+
[ContradictionKind.DUPLICATE_REQUEST]: [ChannelId.NET, ChannelId.NET],
|
|
355
|
+
[ContradictionKind.DUPLICATE_REQUEST_UNRELATED]: [ChannelId.NET, ChannelId.NET],
|
|
356
|
+
// The evidence is the interleaving of two responses, read against what the screen ended up showing.
|
|
357
|
+
[ContradictionKind.STALE_RESPONSE_APPLIED]: [ChannelId.NET, ChannelId.UI],
|
|
358
|
+
// Both sides are the server's own answer: the status line and the payload under it.
|
|
359
|
+
[ContradictionKind.PARTIAL_FAILURE_IN_OK_RESPONSE]: [ChannelId.NET, ChannelId.NET],
|
|
360
|
+
[ContradictionKind.UNIT_MISMATCH]: [ChannelId.UI, ChannelId.NET],
|
|
361
|
+
// What was sent against what came back -- the request and its echo, neither derived from the click.
|
|
362
|
+
[ContradictionKind.WRITE_FIELD_IGNORED]: [ChannelId.NET, ChannelId.NET],
|
|
363
|
+
[ContradictionKind.REQUEST_NEVER_SETTLED]: [ChannelId.TIME, ChannelId.NET],
|
|
364
|
+
// The app's message to the user, against the status the server actually returned.
|
|
365
|
+
[ContradictionKind.FAILURE_MISATTRIBUTED]: [ChannelId.UI, ChannelId.NET],
|
|
366
|
+
// "Nothing anywhere moved" is a claim about every channel; `net` is the independent one in it.
|
|
367
|
+
[ContradictionKind.ACTION_HAD_NO_EFFECT]: [ChannelId.NET, ChannelId.UI],
|
|
368
|
+
[ContradictionKind.ROUTE_RENDERED_NOTHING]: [ChannelId.ROUTE, ChannelId.NET],
|
|
369
|
+
// The crashed variant pairs against LOG rather than NET, because that is what makes it a
|
|
370
|
+
// different finding from the one above: its positive evidence is a console error in the same
|
|
371
|
+
// window, not a request. Pairing it with `net` would claim the network disagreed when nothing
|
|
372
|
+
// about the network was read.
|
|
373
|
+
[ContradictionKind.ROUTE_RENDERED_NOTHING_CRASHED]: [ChannelId.ROUTE, ChannelId.LOG],
|
|
374
|
+
// Not two channels disagreeing but evidence disagreeing with the clock, which is the independent
|
|
375
|
+
// side. Recorded rather than exempted: an exemption is a hole somebody later widens.
|
|
376
|
+
[ContradictionKind.EVIDENCE_SUPERSEDED]: [ChannelId.TIME, ChannelId.UI],
|
|
377
|
+
[ContradictionKind.EVIDENCE_PREDATES_EDIT]: [ChannelId.TIME, ChannelId.UI],
|
|
378
|
+
};
|
|
379
|
+
/**
|
|
380
|
+
* May this kind of disagreement be reported as a fault in the app?
|
|
381
|
+
*
|
|
382
|
+
* False when both sides come from the app's own actuation path. Such a disagreement is real and
|
|
383
|
+
* worth reporting -- the app contradicted itself -- but it is not evidence that the action failed,
|
|
384
|
+
* and treating it as such is how a verdict channel earns a reputation for crying wolf.
|
|
385
|
+
*/
|
|
386
|
+
export function contradictionCanConvict(kind) {
|
|
387
|
+
const pair = CONTRADICTION_CHANNELS[kind];
|
|
388
|
+
return disagreementCanConvict(pair[0], pair[1]);
|
|
389
|
+
}
|
|
336
390
|
export const CrawlAnomalyKind = {
|
|
337
391
|
CONSOLE_ERROR: 'console-error', // the click logged a console.error / uncaught error
|
|
338
392
|
FAILED_REQUEST: 'failed-request', // it fired a request that returned >= 400
|
|
@@ -5,20 +5,14 @@
|
|
|
5
5
|
* verdict rather than passing it. That is a safety property and it is why a green verdict here means
|
|
6
6
|
* something. What it has never answered is the other half: **what would I need in order to see it?**
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* app stops being a silent weakness in the verdict and becomes a piece of work, at the moment the
|
|
12
|
-
* agent is trying to finish.
|
|
8
|
+
* An agent will act on a cost it is paying right now if it is handed the file, the line and the
|
|
9
|
+
* change — so an absence in the app becomes a piece of work rather than a silent weakness in the
|
|
10
|
+
* verdict.
|
|
13
11
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* A gap nobody hit is a backlog, not a finding, and this product does not need another surface
|
|
20
|
-
* producing findings nobody reads. The test for whether a gap belongs here is: *did this absence
|
|
21
|
-
* change the answer the agent just got?* If not, it does not fire.
|
|
12
|
+
* THE RULE THAT KEEPS IT FROM BECOMING NOISE: a gap is reported ONLY when a verdict came back weaker
|
|
13
|
+
* than it would otherwise have been, BECAUSE of an absence in the app. Never as a survey of
|
|
14
|
+
* everything uninstrumented on the page. The test is *did this absence change the answer the agent
|
|
15
|
+
* just got?* — if not, it does not fire.
|
|
22
16
|
*/
|
|
23
17
|
/**
|
|
24
18
|
* The kinds of absence that can weaken a verdict. Most name a capability the app did not provide;
|
|
@@ -43,7 +37,6 @@ export declare const InstrumentationGapKind: {
|
|
|
43
37
|
*/
|
|
44
38
|
readonly NO_SIGNAL_ON_MUTATION: "no-signal-on-mutation";
|
|
45
39
|
/** The route changed and no route signal fired, so route consequences cannot be asserted. */
|
|
46
|
-
readonly NO_ROUTE_SIGNAL: "no-route-signal";
|
|
47
40
|
/** A control was driven that the declared capability contract does not mention. */
|
|
48
41
|
readonly UNDECLARED_CONTROL: "undeclared-control";
|
|
49
42
|
/**
|
|
@@ -5,20 +5,14 @@
|
|
|
5
5
|
* verdict rather than passing it. That is a safety property and it is why a green verdict here means
|
|
6
6
|
* something. What it has never answered is the other half: **what would I need in order to see it?**
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* app stops being a silent weakness in the verdict and becomes a piece of work, at the moment the
|
|
12
|
-
* agent is trying to finish.
|
|
8
|
+
* An agent will act on a cost it is paying right now if it is handed the file, the line and the
|
|
9
|
+
* change — so an absence in the app becomes a piece of work rather than a silent weakness in the
|
|
10
|
+
* verdict.
|
|
13
11
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* A gap nobody hit is a backlog, not a finding, and this product does not need another surface
|
|
20
|
-
* producing findings nobody reads. The test for whether a gap belongs here is: *did this absence
|
|
21
|
-
* change the answer the agent just got?* If not, it does not fire.
|
|
12
|
+
* THE RULE THAT KEEPS IT FROM BECOMING NOISE: a gap is reported ONLY when a verdict came back weaker
|
|
13
|
+
* than it would otherwise have been, BECAUSE of an absence in the app. Never as a survey of
|
|
14
|
+
* everything uninstrumented on the page. The test is *did this absence change the answer the agent
|
|
15
|
+
* just got?* — if not, it does not fire.
|
|
22
16
|
*/
|
|
23
17
|
/**
|
|
24
18
|
* The kinds of absence that can weaken a verdict. Most name a capability the app did not provide;
|
|
@@ -43,7 +37,6 @@ export const InstrumentationGapKind = {
|
|
|
43
37
|
*/
|
|
44
38
|
NO_SIGNAL_ON_MUTATION: 'no-signal-on-mutation',
|
|
45
39
|
/** The route changed and no route signal fired, so route consequences cannot be asserted. */
|
|
46
|
-
NO_ROUTE_SIGNAL: 'no-route-signal',
|
|
47
40
|
/** A control was driven that the declared capability contract does not mention. */
|
|
48
41
|
UNDECLARED_CONTROL: 'undeclared-control',
|
|
49
42
|
/**
|
|
@@ -128,7 +121,6 @@ const GAP_FIX = {
|
|
|
128
121
|
[InstrumentationGapKind.NO_SOURCE_MAPPING]: 'add the Reticle build plugin (@reticlehq/vite-plugin, @reticlehq/next, or the babel plugin) so elements carry data-reticle-source',
|
|
129
122
|
[InstrumentationGapKind.NO_STORE_REGISTERED]: 'register the store with reticle.registerStore(name, getState) so state can be read directly instead of inferred from the DOM',
|
|
130
123
|
[InstrumentationGapKind.NO_SIGNAL_ON_MUTATION]: 'fire reticle.signal(name, data) where this state is committed — commitAndSignal binds the two so they cannot drift',
|
|
131
|
-
[InstrumentationGapKind.NO_ROUTE_SIGNAL]: 'let the Reticle router adapter observe navigation, or fire reticle.signal on route commit',
|
|
132
124
|
[InstrumentationGapKind.UNDECLARED_CONTROL]: 'add this control to reticle.describe() so the capability contract matches what the app actually exposes',
|
|
133
125
|
[InstrumentationGapKind.MISSING_TESTID]: 'add data-testid="..." on this control so the flow can name it after a refactor',
|
|
134
126
|
[InstrumentationGapKind.UNDECLARED_CHANGE]: 'declare it with reticle_intent { action: "declare", intents: [{ id, statement }] } — the statement is prose, in your own words: which user does what, and what should become true',
|
|
@@ -8,31 +8,20 @@ import { z } from 'zod';
|
|
|
8
8
|
* holding the DOM, the diff, and no intent. So it asserts what it can SEE rather than what was
|
|
9
9
|
* MEANT, and what it can see is almost always weaker. That gap is where a false green comes from.
|
|
10
10
|
*
|
|
11
|
-
* ##
|
|
11
|
+
* ## Prose early, predicate late
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* appears.
|
|
19
|
-
*
|
|
20
|
-
* Capture at either end alone loses one of them. Demanding a predicate at declare time collects
|
|
21
|
-
* MECHANISMS, which is what assertions already are. Waiting until drive time collects a
|
|
22
|
-
* RE-DERIVATION, which is the weak artifact this exists to replace — by then the agent has already
|
|
23
|
-
* forgotten, and that is the entire premise.
|
|
24
|
-
*
|
|
25
|
-
* So: `statement` is prose and mandatory. `binding` is a predicate, optional, and may arrive later
|
|
26
|
-
* or never. An intent that stays `declared` and never becomes `bound` is not a failure — it is the
|
|
27
|
-
* most interesting row in the ledger, because it names something the team meant that nothing can
|
|
28
|
-
* currently prove.
|
|
13
|
+
* Fidelity is highest the moment the human asks and decays from there. Bindability — whether it can
|
|
14
|
+
* be written as something checkable — is near zero then and rises as the code appears. So
|
|
15
|
+
* `statement` is prose and mandatory, and `binding` is a predicate, optional, arriving later or
|
|
16
|
+
* never. An intent that stays `declared` is not a failure: it names something the team meant that
|
|
17
|
+
* nothing can currently prove.
|
|
29
18
|
*
|
|
30
19
|
* ## Amendments are append-only
|
|
31
20
|
*
|
|
32
|
-
* A long build changes its mind, so an intent must be amendable
|
|
33
|
-
* an agent could quietly rewrite what it meant to match what it can already prove. Keeping the
|
|
34
|
-
* previous statement makes a NARROWING visible in the git diff
|
|
35
|
-
*
|
|
21
|
+
* A long build changes its mind, so an intent must be amendable — and an amendable intent is also
|
|
22
|
+
* how an agent could quietly rewrite what it meant to match what it can already prove. Keeping the
|
|
23
|
+
* previous statement makes a NARROWING visible in the git diff. That is a PARTIAL defence and the
|
|
24
|
+
* only one there is.
|
|
36
25
|
*/
|
|
37
26
|
export declare const INTENT_FILE_VERSION = 1;
|
|
38
27
|
export declare const IntentState: {
|
|
@@ -66,12 +55,12 @@ export declare const IntentProofSchema: z.ZodObject<{
|
|
|
66
55
|
at: z.ZodNumber;
|
|
67
56
|
}, "strip", z.ZodTypeAny, {
|
|
68
57
|
at: number;
|
|
69
|
-
verdictId: string;
|
|
70
58
|
grade: string;
|
|
59
|
+
verdictId: string;
|
|
71
60
|
}, {
|
|
72
61
|
at: number;
|
|
73
|
-
verdictId: string;
|
|
74
62
|
grade: string;
|
|
63
|
+
verdictId: string;
|
|
75
64
|
}>;
|
|
76
65
|
export declare const IntentSchema: z.ZodObject<{
|
|
77
66
|
id: z.ZodString;
|
|
@@ -100,12 +89,12 @@ export declare const IntentSchema: z.ZodObject<{
|
|
|
100
89
|
at: z.ZodNumber;
|
|
101
90
|
}, "strip", z.ZodTypeAny, {
|
|
102
91
|
at: number;
|
|
103
|
-
verdictId: string;
|
|
104
92
|
grade: string;
|
|
93
|
+
verdictId: string;
|
|
105
94
|
}, {
|
|
106
95
|
at: number;
|
|
107
|
-
verdictId: string;
|
|
108
96
|
grade: string;
|
|
97
|
+
verdictId: string;
|
|
109
98
|
}>>;
|
|
110
99
|
/** Every statement this intent previously carried, oldest first. Append-only, never rewritten. */
|
|
111
100
|
amended: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -119,40 +108,40 @@ export declare const IntentSchema: z.ZodObject<{
|
|
|
119
108
|
statement: string;
|
|
120
109
|
}>, "many">>;
|
|
121
110
|
}, "strip", z.ZodTypeAny, {
|
|
111
|
+
state: "proved" | "declared" | "bound";
|
|
122
112
|
id: string;
|
|
123
113
|
statement: string;
|
|
124
|
-
state: "declared" | "bound" | "proved";
|
|
125
114
|
declaredAt: number;
|
|
126
|
-
binding?: unknown;
|
|
127
115
|
surface?: {
|
|
128
116
|
route?: string | undefined;
|
|
129
117
|
flow?: string | undefined;
|
|
130
118
|
files?: string[] | undefined;
|
|
131
119
|
} | undefined;
|
|
120
|
+
binding?: unknown;
|
|
132
121
|
provenBy?: {
|
|
133
122
|
at: number;
|
|
134
|
-
verdictId: string;
|
|
135
123
|
grade: string;
|
|
124
|
+
verdictId: string;
|
|
136
125
|
} | undefined;
|
|
137
126
|
amended?: {
|
|
138
127
|
at: number;
|
|
139
128
|
statement: string;
|
|
140
129
|
}[] | undefined;
|
|
141
130
|
}, {
|
|
131
|
+
state: "proved" | "declared" | "bound";
|
|
142
132
|
id: string;
|
|
143
133
|
statement: string;
|
|
144
|
-
state: "declared" | "bound" | "proved";
|
|
145
134
|
declaredAt: number;
|
|
146
|
-
binding?: unknown;
|
|
147
135
|
surface?: {
|
|
148
136
|
route?: string | undefined;
|
|
149
137
|
flow?: string | undefined;
|
|
150
138
|
files?: string[] | undefined;
|
|
151
139
|
} | undefined;
|
|
140
|
+
binding?: unknown;
|
|
152
141
|
provenBy?: {
|
|
153
142
|
at: number;
|
|
154
|
-
verdictId: string;
|
|
155
143
|
grade: string;
|
|
144
|
+
verdictId: string;
|
|
156
145
|
} | undefined;
|
|
157
146
|
amended?: {
|
|
158
147
|
at: number;
|
|
@@ -189,12 +178,12 @@ export declare const IntentFileSchema: z.ZodObject<{
|
|
|
189
178
|
at: z.ZodNumber;
|
|
190
179
|
}, "strip", z.ZodTypeAny, {
|
|
191
180
|
at: number;
|
|
192
|
-
verdictId: string;
|
|
193
181
|
grade: string;
|
|
182
|
+
verdictId: string;
|
|
194
183
|
}, {
|
|
195
184
|
at: number;
|
|
196
|
-
verdictId: string;
|
|
197
185
|
grade: string;
|
|
186
|
+
verdictId: string;
|
|
198
187
|
}>>;
|
|
199
188
|
/** Every statement this intent previously carried, oldest first. Append-only, never rewritten. */
|
|
200
189
|
amended: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -208,40 +197,40 @@ export declare const IntentFileSchema: z.ZodObject<{
|
|
|
208
197
|
statement: string;
|
|
209
198
|
}>, "many">>;
|
|
210
199
|
}, "strip", z.ZodTypeAny, {
|
|
200
|
+
state: "proved" | "declared" | "bound";
|
|
211
201
|
id: string;
|
|
212
202
|
statement: string;
|
|
213
|
-
state: "declared" | "bound" | "proved";
|
|
214
203
|
declaredAt: number;
|
|
215
|
-
binding?: unknown;
|
|
216
204
|
surface?: {
|
|
217
205
|
route?: string | undefined;
|
|
218
206
|
flow?: string | undefined;
|
|
219
207
|
files?: string[] | undefined;
|
|
220
208
|
} | undefined;
|
|
209
|
+
binding?: unknown;
|
|
221
210
|
provenBy?: {
|
|
222
211
|
at: number;
|
|
223
|
-
verdictId: string;
|
|
224
212
|
grade: string;
|
|
213
|
+
verdictId: string;
|
|
225
214
|
} | undefined;
|
|
226
215
|
amended?: {
|
|
227
216
|
at: number;
|
|
228
217
|
statement: string;
|
|
229
218
|
}[] | undefined;
|
|
230
219
|
}, {
|
|
220
|
+
state: "proved" | "declared" | "bound";
|
|
231
221
|
id: string;
|
|
232
222
|
statement: string;
|
|
233
|
-
state: "declared" | "bound" | "proved";
|
|
234
223
|
declaredAt: number;
|
|
235
|
-
binding?: unknown;
|
|
236
224
|
surface?: {
|
|
237
225
|
route?: string | undefined;
|
|
238
226
|
flow?: string | undefined;
|
|
239
227
|
files?: string[] | undefined;
|
|
240
228
|
} | undefined;
|
|
229
|
+
binding?: unknown;
|
|
241
230
|
provenBy?: {
|
|
242
231
|
at: number;
|
|
243
|
-
verdictId: string;
|
|
244
232
|
grade: string;
|
|
233
|
+
verdictId: string;
|
|
245
234
|
} | undefined;
|
|
246
235
|
amended?: {
|
|
247
236
|
at: number;
|
|
@@ -251,20 +240,20 @@ export declare const IntentFileSchema: z.ZodObject<{
|
|
|
251
240
|
}, "strip", z.ZodTypeAny, {
|
|
252
241
|
version: 1;
|
|
253
242
|
intents: Record<string, {
|
|
243
|
+
state: "proved" | "declared" | "bound";
|
|
254
244
|
id: string;
|
|
255
245
|
statement: string;
|
|
256
|
-
state: "declared" | "bound" | "proved";
|
|
257
246
|
declaredAt: number;
|
|
258
|
-
binding?: unknown;
|
|
259
247
|
surface?: {
|
|
260
248
|
route?: string | undefined;
|
|
261
249
|
flow?: string | undefined;
|
|
262
250
|
files?: string[] | undefined;
|
|
263
251
|
} | undefined;
|
|
252
|
+
binding?: unknown;
|
|
264
253
|
provenBy?: {
|
|
265
254
|
at: number;
|
|
266
|
-
verdictId: string;
|
|
267
255
|
grade: string;
|
|
256
|
+
verdictId: string;
|
|
268
257
|
} | undefined;
|
|
269
258
|
amended?: {
|
|
270
259
|
at: number;
|
|
@@ -274,20 +263,20 @@ export declare const IntentFileSchema: z.ZodObject<{
|
|
|
274
263
|
}, {
|
|
275
264
|
version: 1;
|
|
276
265
|
intents: Record<string, {
|
|
266
|
+
state: "proved" | "declared" | "bound";
|
|
277
267
|
id: string;
|
|
278
268
|
statement: string;
|
|
279
|
-
state: "declared" | "bound" | "proved";
|
|
280
269
|
declaredAt: number;
|
|
281
|
-
binding?: unknown;
|
|
282
270
|
surface?: {
|
|
283
271
|
route?: string | undefined;
|
|
284
272
|
flow?: string | undefined;
|
|
285
273
|
files?: string[] | undefined;
|
|
286
274
|
} | undefined;
|
|
275
|
+
binding?: unknown;
|
|
287
276
|
provenBy?: {
|
|
288
277
|
at: number;
|
|
289
|
-
verdictId: string;
|
|
290
278
|
grade: string;
|
|
279
|
+
verdictId: string;
|
|
291
280
|
} | undefined;
|
|
292
281
|
amended?: {
|
|
293
282
|
at: number;
|
|
@@ -319,7 +308,7 @@ export declare function dischargeIntent(intent: Intent, proof: {
|
|
|
319
308
|
at: number;
|
|
320
309
|
}): Intent;
|
|
321
310
|
/**
|
|
322
|
-
* Add or amend an intent, keeping
|
|
311
|
+
* Add or amend an intent, keeping the previous statement in its history.
|
|
323
312
|
*
|
|
324
313
|
* An amendment is recorded only when the statement actually changed — re-declaring the same intent
|
|
325
314
|
* unchanged is what a re-run does, and filling the history with identical rows would bury the one
|
|
@@ -8,31 +8,20 @@ import { z } from 'zod';
|
|
|
8
8
|
* holding the DOM, the diff, and no intent. So it asserts what it can SEE rather than what was
|
|
9
9
|
* MEANT, and what it can see is almost always weaker. That gap is where a false green comes from.
|
|
10
10
|
*
|
|
11
|
-
* ##
|
|
11
|
+
* ## Prose early, predicate late
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* appears.
|
|
19
|
-
*
|
|
20
|
-
* Capture at either end alone loses one of them. Demanding a predicate at declare time collects
|
|
21
|
-
* MECHANISMS, which is what assertions already are. Waiting until drive time collects a
|
|
22
|
-
* RE-DERIVATION, which is the weak artifact this exists to replace — by then the agent has already
|
|
23
|
-
* forgotten, and that is the entire premise.
|
|
24
|
-
*
|
|
25
|
-
* So: `statement` is prose and mandatory. `binding` is a predicate, optional, and may arrive later
|
|
26
|
-
* or never. An intent that stays `declared` and never becomes `bound` is not a failure — it is the
|
|
27
|
-
* most interesting row in the ledger, because it names something the team meant that nothing can
|
|
28
|
-
* currently prove.
|
|
13
|
+
* Fidelity is highest the moment the human asks and decays from there. Bindability — whether it can
|
|
14
|
+
* be written as something checkable — is near zero then and rises as the code appears. So
|
|
15
|
+
* `statement` is prose and mandatory, and `binding` is a predicate, optional, arriving later or
|
|
16
|
+
* never. An intent that stays `declared` is not a failure: it names something the team meant that
|
|
17
|
+
* nothing can currently prove.
|
|
29
18
|
*
|
|
30
19
|
* ## Amendments are append-only
|
|
31
20
|
*
|
|
32
|
-
* A long build changes its mind, so an intent must be amendable
|
|
33
|
-
* an agent could quietly rewrite what it meant to match what it can already prove. Keeping the
|
|
34
|
-
* previous statement makes a NARROWING visible in the git diff
|
|
35
|
-
*
|
|
21
|
+
* A long build changes its mind, so an intent must be amendable — and an amendable intent is also
|
|
22
|
+
* how an agent could quietly rewrite what it meant to match what it can already prove. Keeping the
|
|
23
|
+
* previous statement makes a NARROWING visible in the git diff. That is a PARTIAL defence and the
|
|
24
|
+
* only one there is.
|
|
36
25
|
*/
|
|
37
26
|
export const INTENT_FILE_VERSION = 1;
|
|
38
27
|
export const IntentState = {
|
|
@@ -102,7 +91,7 @@ export function dischargeIntent(intent, proof) {
|
|
|
102
91
|
return { ...intent, state: IntentState.PROVED, provenBy: proof };
|
|
103
92
|
}
|
|
104
93
|
/**
|
|
105
|
-
* Add or amend an intent, keeping
|
|
94
|
+
* Add or amend an intent, keeping the previous statement in its history.
|
|
106
95
|
*
|
|
107
96
|
* An amendment is recorded only when the statement actually changed — re-declaring the same intent
|
|
108
97
|
* unchanged is what a re-run does, and filling the history with identical rows would bury the one
|