flake-ledger 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/LICENSE ADDED
@@ -0,0 +1,201 @@
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 WJDdidi-1
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.
package/README.md CHANGED
@@ -1,3 +1,338 @@
1
- # Temporary Holding Version
1
+ # flake-ledger
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![CI](https://github.com/WJDdidi-1/flake-ledger/actions/workflows/ci.yml/badge.svg)](https://github.com/WJDdidi-1/flake-ledger/actions/workflows/ci.yml)
4
+
5
+ Ranks flaky tests from JUnit XML across CI runs, including passed-on-retry.
6
+
7
+ Retries turn a red run green, so the same test burns CI time indefinitely; each
8
+ run's JUnit XML is inspected alone and the passed-on-retry evidence is
9
+ discarded. `flake-ledger` reads every JUnit XML under a directory, groups shards
10
+ into CI runs, and keeps each attempt. A test that failed and then passed on
11
+ retry stays a `passed-on-retry` row in the ledger instead of disappearing into a
12
+ green build.
13
+
14
+ ## A real session
15
+
16
+ The five runs are checked in at [`examples/runs`](examples/runs), one JUnit
17
+ report per run. From a checkout, `npm run example` (or
18
+ `node examples/demo.mjs`) runs the same CLI commands against those files and
19
+ checks the output:
20
+
21
+ ```text
22
+ examples/runs/
23
+ run-01/results.xml
24
+ run-02/results.xml
25
+ run-03/results.xml
26
+ run-04/results.xml
27
+ run-05/results.xml
28
+ ```
29
+
30
+ `run-01/results.xml` (other testcases trimmed) carries Surefire's
31
+ passed-on-retry evidence:
32
+
33
+ ```xml
34
+ <testsuite name="com.example.CheckoutTest" timestamp="2026-01-05T10:00:00">
35
+ <testcase classname="com.example.CheckoutTest" name="appliesCoupon">
36
+ <flakyFailure message="expected 10% discount, got 0">
37
+ <stackTrace>org.opentest4j.AssertionFailedError: expected 10% discount, got 0
38
+ at CheckoutTest.appliesCoupon(CheckoutTest.java:42)</stackTrace>
39
+ </flakyFailure>
40
+ </testcase>
41
+ <!-- more testcases -->
42
+ </testsuite>
43
+ ```
44
+
45
+ Scan the tree. The table is ranked by a 95% Wilson lower bound on unstable
46
+ rate, so a test with more evidence outranks one with a single bad run:
47
+
48
+ ```console
49
+ $ flake-ledger scan examples/runs
50
+ TEST ID RUNS ATTEMPTS UNSTABLE PASS-ON-RETRY FAILED RATE SCORE CLASS
51
+ com.example.LoginTest::rejectsExpiredToken 5 5 2 0 2 40.0% 0.118 cross-run flake
52
+ com.example.SearchTest::filtersByPrice 5 5 2 0 2 40.0% 0.118 cross-run flake
53
+ com.example.CheckoutTest::appliesCoupon 5 7 2 2 0 40.0% 0.118 passed-on-retry
54
+ com.example.CartTest::addsItem 5 5 0 0 0 0.0% 0.000 stable
55
+ com.example.ReportTest::exportsCsv 5 5 0 0 0 0.0% 0.000 skipped
56
+
57
+ 5 runs, 5 tests, 27 attempts, 5 XML files.
58
+ ```
59
+
60
+ `appliesCoupon` has five runs but seven attempts and two passed-on-retry runs:
61
+ the two red attempts are not lost. `explain` prints the timeline that produced
62
+ the score (it prints absolute paths; they are shown here relative to the
63
+ repository root):
64
+
65
+ ```console
66
+ $ flake-ledger explain examples/runs 'com.example.CheckoutTest::appliesCoupon'
67
+ com.example.CheckoutTest::appliesCoupon
68
+ classification: passed-on-retry
69
+ runs: 5 attempts: 7 unstable: 2/5 rate: 40.0% score: 0.118
70
+
71
+ run run-01 passed-on-retry 2 attempts
72
+ examples/runs/run-01
73
+ #1 failed examples/runs/run-01/results.xml
74
+ expected 10% discount, got 0
75
+ #2 passed examples/runs/run-01/results.xml (retried)
76
+
77
+ run run-02 passed 1 attempt
78
+ examples/runs/run-02
79
+ #1 passed examples/runs/run-02/results.xml
80
+
81
+ run run-03 passed-on-retry 2 attempts
82
+ examples/runs/run-03
83
+ #1 failed examples/runs/run-03/results.xml
84
+ expected 10% discount, got 0
85
+ #2 passed examples/runs/run-03/results.xml (retried)
86
+
87
+ run run-04 passed 1 attempt
88
+ examples/runs/run-04
89
+ #1 passed examples/runs/run-04/results.xml
90
+
91
+ run run-05 passed 1 attempt
92
+ examples/runs/run-05
93
+ #1 passed examples/runs/run-05/results.xml
94
+ ```
95
+
96
+ Use the ledger as a CI gate and write the quarantine list. The table on stdout
97
+ is the same one shown above, so it is omitted here:
98
+
99
+ ```console
100
+ $ flake-ledger scan examples/runs --quarantine flaky.txt --fail-on 0.2 --min-runs 5 > /dev/null
101
+ wrote 3 flaky test ids to flaky.txt
102
+ flaky: com.example.LoginTest::rejectsExpiredToken unstable in 2/5 runs (40.0%) >= 20.0%
103
+ flaky: com.example.SearchTest::filtersByPrice unstable in 2/5 runs (40.0%) >= 20.0%
104
+ flaky: com.example.CheckoutTest::appliesCoupon unstable in 2/5 runs (40.0%) >= 20.0%
105
+ flake-ledger: 3 flaky tests crossed --fail-on 0.2
106
+ $ echo $?
107
+ 1
108
+ $ cat flaky.txt
109
+ com.example.LoginTest::rejectsExpiredToken
110
+ com.example.SearchTest::filtersByPrice
111
+ com.example.CheckoutTest::appliesCoupon
112
+ ```
113
+
114
+ `--fail-on` and `--min-runs` are opt-in; without them the command is
115
+ report-only and exits 0.
116
+
117
+ ## Who it is for
118
+
119
+ Maintainers of multi-runner CI suites (pytest, Playwright, xUnit,
120
+ cargo-nextest, Surefire) whose jobs keep going green only after a retry.
121
+
122
+ ## Why not the obvious answer
123
+
124
+ pytest-rerunfailures, Playwright retries, and `--rerun-failed` only mask the
125
+ failure; BuildPulse, Trunk, and Datadog CI Visibility are paid hosted
126
+ dashboards; GitHub's flaky-test detection is confined to Actions. None offers a
127
+ free, offline, cross-runner ledger plus a quarantine file.
128
+
129
+ ## Install
130
+
131
+ From npm:
132
+
133
+ ```sh
134
+ npm install --global flake-ledger
135
+ flake-ledger --version
136
+ ```
137
+
138
+ From a checkout:
139
+
140
+ ```sh
141
+ git clone https://github.com/WJDdidi-1/flake-ledger.git
142
+ cd flake-ledger
143
+ npm install --global .
144
+ flake-ledger --version
145
+ ```
146
+
147
+ To try it without a global install, run the checked-in five-run example:
148
+
149
+ ```sh
150
+ npm run example
151
+ ```
152
+
153
+ Requires Node.js 18 or newer. There are no runtime dependencies, and the
154
+ published package contains the runtime (`bin/`, `lib/`), the checked-in example
155
+ (`examples/`), package metadata, `README.md`, and `LICENSE`.
156
+
157
+ ## Use
158
+
159
+ Point the scanner at a directory of JUnit XML. It reads recursively:
160
+
161
+ ```sh
162
+ flake-ledger scan path/to/runs
163
+ ```
164
+
165
+ Machine-readable output, top 10 only:
166
+
167
+ ```sh
168
+ flake-ledger scan path/to/runs --json --top 10
169
+ ```
170
+
171
+ Explain one test's per-run timeline, including XML paths and failure messages:
172
+
173
+ ```sh
174
+ flake-ledger explain path/to/runs 'com.example.FooTest::eventuallyGreen'
175
+ flake-ledger explain path/to/runs 'com.example.FooTest::eventuallyGreen' --json
176
+ ```
177
+
178
+ Write the ids of flaky tests to a quarantine file, and fail CI when a flaky
179
+ test crosses a threshold and has at least five eligible (non-skipped) runs:
180
+
181
+ ```sh
182
+ flake-ledger scan path/to/runs --quarantine flaky.txt --fail-on 0.5 --min-runs 5
183
+ ```
184
+
185
+ `--fail-on` accepts a fraction (`0.5`), a percentage (`50%`), or a whole
186
+ percentage (`50`). Exit codes:
187
+
188
+ - `0` — report written, or no flaky test crossed `--fail-on`.
189
+ - `1` — a flaky test crossed `--fail-on`, or `explain` matched no test or more
190
+ than one test.
191
+ - `2` — usage error, unreadable runs directory, or a quarantine file that
192
+ could not be written.
193
+
194
+ ### Scan options
195
+
196
+ | Option | Meaning |
197
+ | --- | --- |
198
+ | `--json`, `-j` | Print JSON instead of the terminal table. |
199
+ | `--top N` | Show only the N highest-ranked tests (totals still count every test). |
200
+ | `--quarantine <file>` | Write the ids of flaky tests, one per line. |
201
+ | `--fail-on <rate>` | Exit 1 when a flaky test's unstable rate is at or above `<rate>`. |
202
+ | `--min-runs <n>` | With `--fail-on`, ignore tests with fewer than `n` eligible runs. |
203
+ | `--group-by <mode>` | `auto` (default), `file`, or `parent`; controls what counts as one run. |
204
+
205
+ ## Input layout
206
+
207
+ The first directory below `<runs-dir>` is one CI run, so every XML file inside
208
+ it is a shard of that run:
209
+
210
+ ```text
211
+ runs/
212
+ run-1/results.xml
213
+ run-1/retry-shard/results.xml
214
+ run-2/results.xml
215
+ ```
216
+
217
+ XML files placed directly under `<runs-dir>` are separate runs unless their
218
+ names carry a shard marker (`shard-1.xml`, `run-3-part-2.xml`). Top-level
219
+ shard-named run directories (`run-3-shard-1/`, `run-3-shard-2/`) merge into one
220
+ run as well. Use `--group-by file` to make every XML document its own run, or
221
+ `--group-by parent` to group by immediate directory.
222
+
223
+ Supported inputs are Surefire and compatible JUnit XML, including
224
+ `<failure>`, `<error>`, `<skipped>`, `<flakyFailure>`, `<flakyError>`,
225
+ `<rerunFailure>`, `<rerunError>`, `retry`/`retries`/`rerun`/`rerunCount`
226
+ attributes, and repeated `<testcase>` elements for the same test. A malformed
227
+ XML file produces a warning and does not hide healthy files.
228
+
229
+ ## What it reports
230
+
231
+ `scan` collapses all of those attempts into one record per `classname::name`
232
+ and classifies it:
233
+
234
+ | Classification | Meaning |
235
+ | --- | --- |
236
+ | `stable` | Every eligible run passed without retry evidence. |
237
+ | `passed-on-retry` | A run ended green only after a retry. |
238
+ | `cross-run flake` | The test both passed and failed across runs. |
239
+ | `always-failing` | No run passed and at least one run failed. |
240
+ | `failed-on-retry` | A run ended red after at least one retry. |
241
+ | `skipped` | Every run skipped the test. |
242
+
243
+ Flaky classifications are `passed-on-retry`, `cross-run flake`, and
244
+ `failed-on-retry`; those are the records written by `--quarantine` and checked
245
+ by `--fail-on`.
246
+
247
+ The JSON output contains `totals`, `runs`, `warnings`, and one `tests` record
248
+ per test (limited to the first N by `--top`) with its `attempts`,
249
+ `unstableRuns`, `eligibleRuns`, `unstableRate`, Wilson `score`,
250
+ `classification`, and `timeline`.
251
+
252
+ ## Use it in CI
253
+
254
+ Collect one directory per CI run (artifact names become run ids), download the
255
+ reports, and gate on the ledger:
256
+
257
+ ```yaml
258
+ - uses: actions/download-artifact@v4
259
+ with:
260
+ path: runs
261
+ - run: npm install --global flake-ledger
262
+ - run: flake-ledger scan runs --fail-on 0.3 --min-runs 10 --quarantine flaky.txt
263
+ ```
264
+
265
+ The command fails only when a flaky classification crosses the threshold. Keep
266
+ the `flaky.txt` artifact or commit it if your test runner supports reading a
267
+ quarantine list.
268
+
269
+ ## FAQ
270
+
271
+ **Do I have to install it globally?**
272
+ No. From a checkout, call the CLI through Node:
273
+
274
+ ```sh
275
+ node bin/flake-ledger.mjs scan path/to/runs
276
+ ```
277
+
278
+ A global install just makes `flake-ledger` available on your `PATH`.
279
+
280
+ **Does it run or retry my tests?**
281
+ No. `flake-ledger` reads JUnit XML that your test runner already produced; it
282
+ does not execute tests, change retry settings, or modify reports.
283
+
284
+ **Does it upload my reports anywhere?**
285
+ No. `scan` and `explain` read local XML and write to stdout, `--json`, or the
286
+ `--quarantine` file you name. There are no network calls and no runtime
287
+ dependencies.
288
+
289
+ **How do I fail CI only on well-evidenced flakes?**
290
+ Combine both thresholds:
291
+
292
+ ```sh
293
+ flake-ledger scan path/to/runs --fail-on 0.3 --min-runs 10
294
+ ```
295
+
296
+ On a readable runs directory, this exits 1 only when a flaky classification has
297
+ at least 10 eligible runs and an unstable rate of at least 30%; otherwise it
298
+ exits 0. Without `--fail-on`, `scan` is report-only.
299
+
300
+ **How much history do I need?**
301
+ One run is enough to produce a ledger, and a single run can already show
302
+ `passed-on-retry` evidence; cross-run flakes need at least two runs. The score
303
+ is a 95% Wilson lower bound on the unstable rate, so use `--min-runs` to require
304
+ enough history before `--fail-on` can fail the build.
305
+
306
+ ## How we know it works
307
+
308
+ `npm test` builds temporary JUnit fixtures and exercises every feature above
309
+ through the CLI: recursive scanning, shard merging, repeated testcases,
310
+ Surefire `flakyFailure`/`rerunFailure`, retry attributes, all classifications,
311
+ Wilson-bound table ordering, `--json`, `--top`, `--quarantine`, `explain`, and
312
+ `--fail-on`/`--min-runs`.
313
+
314
+ The checked-in fixture under [`examples/runs`](examples/runs) is a second,
315
+ readable path through the same CLI: `npm run example` runs `scan`, `explain`,
316
+ `--quarantine`, and the CI gate against it, and exits nonzero if the table,
317
+ timeline, quarantine list, or exit codes change.
318
+
319
+ CI runs the suite on Ubuntu, macOS (Intel), and Windows for Node.js 18, 20, 22,
320
+ and 24. Each job also packs the tarball, installs it into a clean directory,
321
+ and runs the installed binary, so the published package is tested rather than
322
+ just the checkout.
323
+
324
+ From a checkout, the same commands run against the local entry point:
325
+
326
+ ```sh
327
+ npm test
328
+ node bin/flake-ledger.mjs scan path/to/runs
329
+ ```
330
+
331
+ ## Status
332
+
333
+ Early MVP. The features above are the scope; anything not listed is not built
334
+ yet.
335
+
336
+ ## License
337
+
338
+ Apache-2.0. See [LICENSE](LICENSE).