@flyingrobots/parley-read 0.0.0-stage → 0.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/CHANGELOG.md +272 -0
- package/LICENSE +202 -0
- package/NOTICE +5 -0
- package/README.md +560 -2
- package/package.json +39 -4
- package/src/digest.ts +438 -0
- package/src/fold.ts +166 -0
- package/src/index.ts +10 -0
- package/src/lines.ts +77 -0
- package/src/load.ts +711 -0
- package/src/locate.ts +70 -0
- package/src/open.ts +435 -0
- package/src/query.ts +760 -0
- package/src/rank.ts +309 -0
- package/src/schemas.ts +2042 -0
- package/src/validate.ts +94 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). This package is versioned
|
|
4
|
+
on its own; the spec and each message schema move separately (spec §4.4).
|
|
5
|
+
|
|
6
|
+
## [Unreleased]
|
|
7
|
+
|
|
8
|
+
## [0.1.0] — 2026-11-22
|
|
9
|
+
|
|
10
|
+
The first public version. It depends on `@flyingrobots/parley-emit` `^0.2.0`, so parley-emit 0.2.0
|
|
11
|
+
is published first. The schemas it ships are the released versions of the repository's first
|
|
12
|
+
schema release, spec `0.2.0` in the root `CHANGELOG.md`, byte for byte (`src/schemas.ts` records the
|
|
13
|
+
commit and each digest); no schema version is released by this package release (spec §4.5).
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- **A run section carries the head's `resolved`** (flyingrobots/parley#90): the run's
|
|
18
|
+
interpretation after defaults and environment, copied whole when it is an object, so a reader
|
|
19
|
+
can tell which commits `HEAD~1..HEAD` was without opening the head. It is the first field
|
|
20
|
+
dropped to fit `RUN_SECTION_BYTES` and is named in `dropped`. `RunSection` gains `resolved`.
|
|
21
|
+
Runs whose heads' `resolved` differ no longer fold, even with one `inv` (RD-100g).
|
|
22
|
+
|
|
23
|
+
- **Runs of one invocation with one result are named once** (flyingrobots/parley#79). Before the
|
|
24
|
+
bound is applied, `digestFor` folds the window's runs whose `inv`, outcome, `reason`, `end`
|
|
25
|
+
status and error, warning and startup-failure codes are all equal into the most recent of
|
|
26
|
+
them. That run's section carries `folded: {others, records}`, both counting the other runs only, so
|
|
27
|
+
the section reads as "this run, plus `others` like it" (flyingrobots/parley#100; `RunFold.others`
|
|
28
|
+
replaced `RunFold.runs`, which included the representative), and the lens's `loss` carries
|
|
29
|
+
`folded`, how many of `excluded` the fold left out. A run with no `inv`, or a redacted run,
|
|
30
|
+
never folds, and nothing folds when `digestFor` is given no outcomes. New exports: `foldRuns`
|
|
31
|
+
and the types `Folding` and `RunFold`. `Digested` and `QueryAnswer.counts` gain `folded`,
|
|
32
|
+
`runSection` takes the run's fold as a fourth argument, and `sufficientBytes` takes the fold's
|
|
33
|
+
count as a fifth, default 0. On footprint's own 50 receipts a digest of 20 under `what-ran` now
|
|
34
|
+
names 11 distinct invocations where it named 6 (`docs/topics/reader/cold-resume.md`).
|
|
35
|
+
|
|
36
|
+
- **A decline on budget grounds** (flyingrobots/parley#71). `budget.ms` is a deadline for the
|
|
37
|
+
whole read, read on `opts.clock` (default `MONOTONIC`, `performance.now`) once at the call and
|
|
38
|
+
once at each check: after the load, after the ranking and before the digest is written, and for
|
|
39
|
+
`openRecords` after the load and after the ids are opened. The deadline is inclusive. A read past
|
|
40
|
+
it, or whose `budget.bytes` cannot hold a digest naming no records, writes no lens, reports a
|
|
41
|
+
`receipt.step` and one `parley.error` `query.over_budget` (`measured`, `limit`, `remedy`,
|
|
42
|
+
`retryable: true`, and `detail` with `bound`, `phase`, `given`, `measured`, `sufficient` and
|
|
43
|
+
`at_least`), ends with status 2, and returns a new `QueryDeclined` / `OpenDeclined` outcome.
|
|
44
|
+
New exports: `Deadline`, `MONOTONIC`, `OVER_BUDGET`, `declineOnRun`, `sufficientBytes` and the
|
|
45
|
+
types `BudgetDecline`, `BudgetPhase`, `QueryDeclined`, `OpenDeclined`; `digestFor` reports
|
|
46
|
+
`fits`. `openRecords` accepts `budget.ms` and records it in its `parley.query`.
|
|
47
|
+
|
|
48
|
+
- **Each run a digest names, stated once** (flyingrobots/parley#83). A `parley.lens` now carries
|
|
49
|
+
`runs`, one section per run its entries name, in the order they first name it: the head's
|
|
50
|
+
`tool`, `v`, `argv` and `inv` (or `receipt.inputs`'s `inv`), the run's `outcome` over the whole
|
|
51
|
+
window, and a `reason` (`no_end_in_window`, `end_status_unusable`) when that outcome is
|
|
52
|
+
`undetermined`. A run whose head is outside the window says `head: "not_in_window"`. A section is
|
|
53
|
+
bounded by `RUN_SECTION_BYTES` (512): whole fields are dropped, `argv`, then `inv`, then `v`,
|
|
54
|
+
then `tool`, and named in `dropped`; no string is cut. An `error` or `warning` entry also carries
|
|
55
|
+
its `code`. `runSection`, `RUN_SECTION_BYTES`, `DROPPABLE` and `UNDETERMINED_REASONS` are
|
|
56
|
+
exported. Under `{records: 20, bytes: 2048}` over three-record runs a digest now names 13 records
|
|
57
|
+
(RD-22b).
|
|
58
|
+
|
|
59
|
+
- **A summary beside each record a digest names** (flyingrobots/parley#77). Each `parley.lens`
|
|
60
|
+
entry now carries the record's `event` and `t` as the loader read them, each absent when the
|
|
61
|
+
record does not carry it. `lensEntry(record)` builds one; `digestFor` takes the ranking's
|
|
62
|
+
`outcomes` as a fifth argument and `queryReceipts` passes them. The run's outcome, which this
|
|
63
|
+
entry first put on every entry, is stated once per run in `runs` since flyingrobots/parley#83,
|
|
64
|
+
and `lensEntry` no longer takes `outcomes`. The summary counts against `budget.bytes` (RD-22b).
|
|
65
|
+
- **A byte budget for the drill-down** (flyingrobots/parley#78): `openRecords` accepts
|
|
66
|
+
`budget: { bytes }`. Records open whole, in the order asked, while their summed size (UTF-8 bytes
|
|
67
|
+
of each record's JSON as returned, sidecar contents included) stays within the bound; every id
|
|
68
|
+
past it is a new `over_budget` outcome carrying `bytes` and no contents, never a truncated
|
|
69
|
+
record. Each id is judged against what remains, so a small record after an over-budget one may
|
|
70
|
+
still open; not-found and `sidecar_unavailable` outcomes cost nothing. The recorded
|
|
71
|
+
`parley.query` and the answer's `budget` carry the bound applied; `counts.overBudget` is new.
|
|
72
|
+
`recordBytes`, `openedBytes` and `applyBudget` are exported. A malformed bound is refused
|
|
73
|
+
`query.budget_invalid`.
|
|
74
|
+
- **The drill-down**, `openRecords(request, opts)` (flyingrobots/parley#51): records by the
|
|
75
|
+
`(run, seq)` pairs a `parley.lens` names, each in full, in the order asked, with exactly one
|
|
76
|
+
outcome per id — `opened`, `sidecar_unavailable`, `run_not_found` or `seq_not_found` — and never
|
|
77
|
+
a throw for one bad id. A record stored in a sidecar opens with its contents, checked by the
|
|
78
|
+
loader against the declared `bytes` and `sha256`; opening the `sidecar` event itself brings the
|
|
79
|
+
stored record as `held`; a sidecar missing, mismatched or unchecked is that id's outcome and
|
|
80
|
+
claims no contents. Every id whose run resolved carries its bundle's replay ruling, so a failed
|
|
81
|
+
run's `error` opens and says its bundle is unavailable for replay.
|
|
82
|
+
- A drill-down is **a recorded read**: refused without an asker, a view, a window and at least one
|
|
83
|
+
well-formed id (`open.records_missing`, `open.records_invalid` beside the query's own codes),
|
|
84
|
+
writing nothing; accepted, it is a run of its own whose `parley.query` record carries the new
|
|
85
|
+
optional `records` field, followed by a `receipt.step` stating the outcome counts. It emits no
|
|
86
|
+
`parley.lens`. `planOpen` and `openOne` are its refusal rules and its per-id resolution as pure
|
|
87
|
+
functions. `src/schemas.ts` is re-synced for the `parley.query` draft change; no version moved.
|
|
88
|
+
- **The least-projected copy of a record** (flyingrobots/parley#58, spec §8). The loader folds the
|
|
89
|
+
copies from the sources that carry no `parley.history.transform` line for a run first and alone,
|
|
90
|
+
so the receipt copy is the record and a projected copy never contributes a field to it. A
|
|
91
|
+
projected copy whose body differs is recorded as a `Projection` on the bundle — the source, the
|
|
92
|
+
transform's `name` and `sha256`, the `seq` its opening line took, the `seq` values it
|
|
93
|
+
`superseded` and the ones it `withheld`, and whether it is the `sole` copy read — rather than
|
|
94
|
+
reported as a `copies.disagree` defect, which it never was. A record whose only copy is a
|
|
95
|
+
projection's is returned with `projected: true` and `projectedBy` naming the transforms.
|
|
96
|
+
Identical copies dedupe exactly as before.
|
|
97
|
+
- §8 lets a projection narrow the body and never the envelope, so a projected copy that disagrees
|
|
98
|
+
with the record on `event`, `t` or `_schema` is still §1.3's `copies.disagree` defect, reported
|
|
99
|
+
whichever copy the preference returned.
|
|
100
|
+
- Two projected copies of one event, by different transforms, are the edge the rule cannot settle:
|
|
101
|
+
neither is the less projected one, so they are folded as §1.3 copies in an order stated by the
|
|
102
|
+
transform's name, its digest and the file — never the order the files were read in — and a
|
|
103
|
+
disagreement between them is the new `copies.projected_disagree` defect.
|
|
104
|
+
- `loadReceipts({ history: [path] })` and `readHistorySegment(path)`: a segment of the shared
|
|
105
|
+
stream, by name. The stream is opt-in and this reader never looks for it; a segment named but
|
|
106
|
+
unopenable is a `history.unreadable` defect rather than a throw. `Where` gains `history`.
|
|
107
|
+
`queryReceipts` passes the same option to its load, so a read and its digest see the copies a
|
|
108
|
+
load would. Its options type already accepted `history`, and until now it dropped it.
|
|
109
|
+
|
|
110
|
+
- `src/schemas.ts` re-synced from the repository drafts: the reader now ships seventeen, adding
|
|
111
|
+
`parley.history.transform` 1.0.0 (flyingrobots/parley#57), so a projected copy's opening line on
|
|
112
|
+
the shared stream validates against its exact pair rather than being reported as partial. No
|
|
113
|
+
reader behaviour changed and no schema moved; preferring the least-projected copy of a record is
|
|
114
|
+
flyingrobots/parley#58.
|
|
115
|
+
|
|
116
|
+
- A read over the loaded records, `queryReceipts`, taking the representation decided in
|
|
117
|
+
flyingrobots/parley#46: a read states an `asker`, a `view` and a `window`, and is **refused**
|
|
118
|
+
without them. `asker.tool` is never invented (§2.1) and there is no privileged view to fall back
|
|
119
|
+
on, so each is refused rather than guessed; a window is refused missing, half-stated, malformed
|
|
120
|
+
or inverted; `budget` is the one field with a default, `{"records": 20}`, and the answer says
|
|
121
|
+
when it defaulted. Every refusal that applies is returned, each carrying §6's `code`, `problem`
|
|
122
|
+
and `remedy` with the field it is about, so a caller that is itself a parley tool can hand one
|
|
123
|
+
to `run.error`.
|
|
124
|
+
- The inference the decision asks for, and no more: `asker.cwd` is the directory the read was made
|
|
125
|
+
against when the caller states none, recorded so it is visible. `asker.task` is "from the
|
|
126
|
+
environment" in flyingrobots/parley#46 without a variable named, so it comes from the request and
|
|
127
|
+
is omitted when absent rather than read out of a variable this library would be inventing (§2.1).
|
|
128
|
+
A value `parley.query` could not carry — a relative `asker.cwd`, an empty `task`, an empty
|
|
129
|
+
`note` — is refused rather than emitted as a line that fails its own schema.
|
|
130
|
+
- A refused read is **not a run**: no receipt, no `.parley` directory, nothing written anywhere.
|
|
131
|
+
§9 records a question that was asked, and a question nobody could state has no asker to
|
|
132
|
+
attribute it to. `planQuery` is the same rules as a pure function, for a caller that wants the
|
|
133
|
+
verdict without making the read.
|
|
134
|
+
- An accepted read is **recorded**: the `parley.query` 1.0.0 event is emitted through
|
|
135
|
+
`@flyingrobots/parley-emit`, so a read is a run with a receipt beside the ones it read, its two
|
|
136
|
+
decisions are in that receipt, and the loader reads the query back as `validated` against the
|
|
137
|
+
exact pair. The answer names the record by `(run, seq)`. The read's own run identity is
|
|
138
|
+
`parley-read` at the package version, or whatever a host program embedding the reader names
|
|
139
|
+
itself; that is not the asker.
|
|
140
|
+
- **The view orders the answer, and filters none of it** (flyingrobots/parley#49). Spec §9 says the
|
|
141
|
+
purpose shapes the result and is the ranking function rather than a filter applied afterwards, so
|
|
142
|
+
`rankRecords(query, records)` is that order on its own: a pure function from an accepted query
|
|
143
|
+
and records to the same records, reordered, reading nothing and writing nothing. One total order
|
|
144
|
+
on a key per record, compared left to right — the **failure surface** when the view is an answer
|
|
145
|
+
about a change, then the **view's own surface**, then **`(t, run, seq)` ascending** — so a view
|
|
146
|
+
whose surface no record touches leaves the answer exactly as it was, and `everything` ranks
|
|
147
|
+
nothing. Under a view that implies a change, a failed run's records also rank above an
|
|
148
|
+
`undetermined` run's and those above a succeeded run's, within a tier and never across one.
|
|
149
|
+
`queryReceipts` answers through it and carries the whole key back in `answer.ranking`: each
|
|
150
|
+
record's `rank`, `tier`, `outcome` and the `why` behind them, the per-run outcomes and the tier
|
|
151
|
+
counts.
|
|
152
|
+
- Each view's surface is read off the vocabulary's own definition of its token
|
|
153
|
+
(flyingrobots/parley#46), and **which token implies a change is derived the same way rather than
|
|
154
|
+
from a new field**: `parley.query` 1.0.0 carries none, and of the five tokens exactly one is an
|
|
155
|
+
answer about a change, `what-changed`. `what-failed` is deliberately not in that set, because
|
|
156
|
+
failure is already its whole surface. No schema moved and `spec/` is untouched.
|
|
157
|
+
- A run's outcome is established from **the records being ranked**, not from the whole history: an
|
|
158
|
+
`error`, a `startup.failed` or a non-zero `end` is `failed`, an `end` of zero is `succeeded`, and
|
|
159
|
+
anything else — including a run whose `end` the window does not hold — is `undetermined` rather
|
|
160
|
+
than counted as a success (§1.2a). A `warning` is on the failure surface and does not make its
|
|
161
|
+
run a failed one (§6.1).
|
|
162
|
+
- **Ranking never drops a record.** Over-filtering is the failure mode §9 warns about, so every
|
|
163
|
+
record in the window is in the answer whatever the view, pinned by a case over all five views and
|
|
164
|
+
by a golden case on receipts a real tool wrote. Six thousand records rank in about 5 ms here,
|
|
165
|
+
against a stated bound in the suite.
|
|
166
|
+
- The answer is the window's records, ordered by the view and cut at the budget, with the
|
|
167
|
+
window echoed verbatim and the read's own records excluded — a read does not answer itself, and
|
|
168
|
+
`counts` says how many were scanned, in the window, answered, excluded, undated and the read's
|
|
169
|
+
own. A record whose `t` is not a number cannot be placed in a window and is counted rather than
|
|
170
|
+
dropped silently.
|
|
171
|
+
- **The first response is a bounded digest that states its lens and what it excluded**
|
|
172
|
+
(flyingrobots/parley#50). Spec §9 asks a result to carry its own lens so a later reader "cannot
|
|
173
|
+
mistake a digest for the whole", and to report what it excluded at least as a count. The digest
|
|
174
|
+
is a **`parley.lens` 1.0.0 record** — the message decided in flyingrobots/parley#46, not a new
|
|
175
|
+
one — emitted through the writer onto the read's stream and into its receipt, so the loader reads
|
|
176
|
+
it back `validated` against the exact pair. It names the query it answers by `(run, seq)`, the
|
|
177
|
+
asker, the view, the window, the budget actually applied, the records it holds by `(run, seq)`
|
|
178
|
+
and the loss. `digestFor`, `digestLine` and `digestBytes` are the bound as pure functions, and
|
|
179
|
+
`answer.digest` and `answer.digestBytes` are what the read wrote.
|
|
180
|
+
- **The bound, exactly.** `budget.records` bounds the count of records a digest names.
|
|
181
|
+
`budget.bytes`, when stated, bounds the lens line as written — serialised JSON plus its newline,
|
|
182
|
+
in UTF-8 — and records are dropped from the tail of the ranking until it fits, by binary search
|
|
183
|
+
over the prefix length; a bytes budget too small even for a digest naming no records left it
|
|
184
|
+
naming none, because the envelope and the lens's own fields are not negotiable (it now declines:
|
|
185
|
+
flyingrobots/parley#71, under Changed). `budget.ms` bounded nothing until the same issue made it
|
|
186
|
+
a deadline. The bound is
|
|
187
|
+
applied **before** the line is written, by reconstructing the line the writer will write, which a
|
|
188
|
+
case pins against the line the writer really wrote.
|
|
189
|
+
- **A digest cannot read as complete.** `loss.excluded` is always present, zero included, because
|
|
190
|
+
an absent count and a count of zero are different claims; `loss.bound` is `none` only beside a
|
|
191
|
+
count of 0 and the schema refuses the other pairing, so the claim is structural rather than
|
|
192
|
+
prose. The answer's `records` and the ranking it carries stop at the bound, while
|
|
193
|
+
`counts.inWindow` and the ranking's per-run outcomes and tier census still describe the whole
|
|
194
|
+
window the digest was drawn from — a caller can see the digest is not the whole without being
|
|
195
|
+
handed what it cut, and a run's outcome stays established from the window rather than from a
|
|
196
|
+
prefix of it (§1.2a). Measured over a history grown from 3 to 300 receipts under one budget, the
|
|
197
|
+
digest's line went 823 → 1325 → 1326 bytes: a hundredfold more history costs one byte.
|
|
198
|
+
- Deliberately **not** done, the safe intermediate state flyingrobots/parley#51 names: what a
|
|
199
|
+
digest excluded is not fetchable. The count is all a caller gets, and the digest stores the way
|
|
200
|
+
back by `(run, seq)` for the call that will.
|
|
201
|
+
- A read states a retention policy that deletes nothing (`NO_RETENTION`): §5.1 asks every tool for
|
|
202
|
+
one, and expiring the receipts a read was asked to read would destroy the history in order to
|
|
203
|
+
answer a question about it. (Since flyingrobots/parley#75 retention is per tool, so a read's
|
|
204
|
+
receipts no longer cost another tool its history; a read still deletes nothing, because it
|
|
205
|
+
would expire only its own receipts, and nothing asked it to.)
|
|
206
|
+
- The loader: `loadReceipts` returns every run in both receipt locations for a working directory
|
|
207
|
+
as bundles, and `readReceiptFile` reads one receipt file, yielding one bundle per run it holds.
|
|
208
|
+
A bundle carries its records in `seq` order, its resolved sidecars, its quarantined lines, every
|
|
209
|
+
defect found, whether it terminated, its status, whether it is redacted, and whether anything
|
|
210
|
+
rules replay out.
|
|
211
|
+
- `receiptLocations`, `repoReceiptDir` and `stateReceiptDir`: both places spec §5 lets a writer put
|
|
212
|
+
a receipt, each reported present or absent, creating nothing. The repository-root digest and the
|
|
213
|
+
state base come from `@flyingrobots/parley-emit` so the key cannot drift from the writer's.
|
|
214
|
+
- `LineBuffer`, `splitLines` and `readFileLines`: newline buffering over bytes, so a line — or a
|
|
215
|
+
multi-byte character — split across two reads is one line (§1.4), and the unterminated fragment
|
|
216
|
+
at EOF is kept apart and is never a record (§5.4).
|
|
217
|
+
- Quarantine under §1.4 and §1.3: a complete line that is not a JSON object, a blank line, an
|
|
218
|
+
object with no usable `(run, seq)`, and the unterminated tail are each kept verbatim, reported as
|
|
219
|
+
a defect attributed to the run where the file name allows it, and never returned as a record.
|
|
220
|
+
- `(run, seq)` folding under §1.3: copies are one record, a copy contributes the fields it alone
|
|
221
|
+
carries, a disagreement on a shared field is a `copies.disagree` defect, two runs interleaved on
|
|
222
|
+
one stream come back as two bundles, and a bundle copied into both locations comes back as one.
|
|
223
|
+
- `validator`: validation against the schema for a line's exact advertised `(id, version)` pair
|
|
224
|
+
(§4.5, §4.6). A `parley.*` pair the package does not ship is reported `partial` with the §1.3
|
|
225
|
+
gaps, never as validated; a tool-owned id is passed through `unvalidated`; a line with no
|
|
226
|
+
`_schema` is `unvalidated` too. Compilation is lazy and cached.
|
|
227
|
+
- Sidecar resolution under §5: the stored bytes are checked against the declared `sha256` and
|
|
228
|
+
`bytes`, the record is restored at the `seq` the event names, and a path that is absolute or
|
|
229
|
+
would leave the receipt's directory is refused before anything is read.
|
|
230
|
+
- `replay`: a missing, mismatched, escaping, unparseable or unreadable sidecar, no
|
|
231
|
+
newline-terminated `end`, a non-zero status, or a redacted receipt each rule a bundle out, with a
|
|
232
|
+
reason per rule (§5, §5.3, §5.4). Nothing ruling it out is reported as exactly that, since
|
|
233
|
+
§2.3 and §5.3 eligibility for a given invocation is the caller's to decide.
|
|
234
|
+
- Robustness, from the review of the first candidate: a receipt file that cannot be opened is a
|
|
235
|
+
`receipt.unreadable` defect in `load.defects`, not a throw that loses the rest of the directory;
|
|
236
|
+
and with `sidecars: false` a sidecar is reported `unchecked` rather than `intact`, since nothing
|
|
237
|
+
about its stored bytes was established (§1.2a), which also rules replay out.
|
|
238
|
+
- The sixteen draft schemas at the pinned commit, with a test that they match the repository.
|
|
239
|
+
|
|
240
|
+
### Changed
|
|
241
|
+
|
|
242
|
+
- **`DROPPABLE` is `resolved`, `argv`, `inv`, `v`, `tool`** (flyingrobots/parley#90), one longer and
|
|
243
|
+
with `resolved` first. Under `{records: 20, bytes: 2048}` over three-record runs a digest names
|
|
244
|
+
12 records where it named 13 (RD-22b: 1526, 1916 and 1917 bytes).
|
|
245
|
+
|
|
246
|
+
- **A digest no longer names every repeat of a run** (flyingrobots/parley#79). Where two runs are
|
|
247
|
+
one invocation with one result, the answer's `records` and the ranking it carries now hold only
|
|
248
|
+
the most recent one's records, and `loss.excluded` counts the other's. Three runs of the
|
|
249
|
+
writer's `count` example, two of which succeed, now come back as 7 named records of 11. Every
|
|
250
|
+
lens line carries `"folded":0` or more in its `loss`, 11 bytes more than before when nothing
|
|
251
|
+
folds (RD-22b: 1433, 1981 and 1982 bytes).
|
|
252
|
+
|
|
253
|
+
- **A `budget.bytes` too small for an empty digest declines** (flyingrobots/parley#71). It used to
|
|
254
|
+
answer with a digest naming no records whose line was still over the stated bound; it now
|
|
255
|
+
declines with `query.over_budget` and names the smallest sufficient `bytes`. `QueryAnswer` and
|
|
256
|
+
`OpenAnswer` carry `declined: false`, and `QueryOutcome` and `OpenOutcome` gain the declined
|
|
257
|
+
variant, so a caller that narrowed on `refused` alone narrows on `declined` too.
|
|
258
|
+
|
|
259
|
+
### Fixed
|
|
260
|
+
|
|
261
|
+
- **Under `what-changed`, a warning no longer outranks every result** (flyingrobots/parley#76).
|
|
262
|
+
The change-view promotion put the whole failure surface in the `failure` tier, warnings included,
|
|
263
|
+
so a history of runs that warned and went on filled a digest with warnings and named none of the
|
|
264
|
+
view's own surface: on 50 real footprint receipts, every one of the 20 records a default
|
|
265
|
+
`what-changed` read named was an error, a non-zero `end` or a warning, and no result was among
|
|
266
|
+
them. The tier now holds **the failure surface of the runs that failed**. A `warning` from a run
|
|
267
|
+
the ranked records do not establish as failed, whether it succeeded or its outcome is
|
|
268
|
+
`undetermined`, is placed by the view's own surface rule (§6.1, §1.2a), and its `why` says so.
|
|
269
|
+
Errors, startup failures and non-zero ends still rank first, a failed run's warning ranks with
|
|
270
|
+
them, and `what-failed` keeps every warning on its surface. `onFailureSurface` is unchanged. No
|
|
271
|
+
schema moved and `spec/` is untouched. RD-18e's oracle changed with the rule; RD-40a to RD-40d
|
|
272
|
+
are new.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 James Ross
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
202
|
+
|