@ceccec/millennium-solutions 0.1.1 → 9.0.6
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/.zenodo.json +33 -9
- package/ACCOUNTING.md +7 -7
- package/AXIOMS.md +559 -0
- package/CHALLENGES.md +2181 -2479
- package/CITATION.cff +1 -1
- package/DEPLOY.md +2 -2
- package/DEVELOP.md +1 -1
- package/LICENSE +6 -5
- package/PRIOR-ART.md +149 -0
- package/README.md +221 -123
- package/SIGNATURE.md +2 -2
- package/TRIAL.md +69 -0
- package/WHITEPAPER.md +5 -5
- package/captain.md +2 -2
- package/compare.md +4 -4
- package/compute.md +9 -0
- package/dashboard.md +1 -1
- package/examples.md +5 -5
- package/forensic.md +67 -0
- package/guide.md +5 -5
- package/index.md +209 -139
- package/package.json +88 -9
- package/paper.md +7183 -0
- package/quantum.md +42 -0
- package/rights.md +39 -0
- package/solutions.md +7 -7
- package/speedup.md +4 -4
- package/src/0/index.ts +12 -2
- package/src/1/index.ts +1 -1
- package/src/2/frequency-scales.ts +13 -1
- package/src/2/index.ts +1 -1
- package/src/3/index.ts +1 -1
- package/src/4/index.ts +1 -1
- package/src/5/index.ts +1 -1
- package/src/6/index.ts +1 -1
- package/src/7/index.ts +1 -1
- package/src/9/funding.ts +2 -2
- package/src/api/gates.ts +117 -0
- package/src/api/index.ts +488 -0
- package/src/api/lanes.ts +81 -0
- package/src/demand/queries.json +1764 -0
- package/src/face/index.ts +100 -0
- package/src/html/index.ts +10 -0
- package/src/latex/index.ts +474 -0
- package/src/millennium/index.ts +53 -0
- package/src/proof/README.md +1 -1
- package/src/proof/address.lean +117 -0
- package/src/proof/coin.lean +148 -0
- package/src/proof/covered.json +9 -0
- package/src/proof/demand.lean +112 -0
- package/src/proof/demand2.lean +171 -0
- package/src/proof/demand3.lean +117 -0
- package/src/proof/discovered.json +10965 -1864
- package/src/proof/elementary.lean +393 -0
- package/src/proof/energy.lean +215 -0
- package/src/proof/families.lean +435 -0
- package/src/proof/fixtures/axiom-control.lean +39 -0
- package/src/proof/fnv.lean +99 -0
- package/src/proof/generated-theorems.json +207 -0
- package/src/proof/generated.lean +101 -0
- package/src/proof/imagined.lean +492 -0
- package/src/proof/index.lean +98 -18
- package/src/proof/index.ts +2 -2
- package/src/proof/involution.lean +90 -0
- package/src/proof/ledgerclaims.lean +84 -0
- package/src/proof/light.lean +135 -0
- package/src/proof/mechanical.lean +421 -0
- package/src/proof/merkaba.lean +89 -0
- package/src/proof/merkle.lean +132 -0
- package/src/proof/nim.lean +105 -0
- package/src/proof/phenomena.lean +90 -0
- package/src/proof/priorart.lean +189 -0
- package/src/proof/quantum.lean +161 -0
- package/src/proof/reach.lean +84 -0
- package/src/proof/recovered.lean +56 -0
- package/src/proof/reversal.lean +73 -0
- package/src/proof/rights.lean +157 -0
- package/src/proof/sequences.lean +105 -0
- package/src/proof/speed.lean +129 -0
- package/src/proof/split.lean +180 -0
- package/src/proof/theorems.lean +48 -1
- package/src/proof/trial-all.json +15260 -0
- package/src/proof/z9.lean +92 -0
- package/src/proof/z9plus.lean +208 -0
- package/src/proofs.lisp +3 -3
- package/src/prove/emit.ts +115 -0
- package/src/prove/index.ts +143 -0
- package/src/prove/translate.ts +638 -0
- package/src/publication/index.ts +363 -0
- package/src/quantum/field.ts +73 -0
- package/src/quantum/tree.ts +79 -0
package/quantum.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: The quantum field — one receipt
|
|
3
|
+
head:
|
|
4
|
+
- ['meta', { name: 'robots', content: 'index, follow' }]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# The quantum field
|
|
8
|
+
|
|
9
|
+
This page renders [`src/proof/quantum.lean`](https://github.com/ceccec/millennium-solutions/blob/main/src/proof/quantum.lean)
|
|
10
|
+
in three dimensions. Nothing in the scene is decoration: every coordinate is a value the Lean file decides
|
|
11
|
+
over, and a gate recomputes all five figures on each build, reading what they *should* be out of the theorem
|
|
12
|
+
statements themselves rather than from a number typed into the check.
|
|
13
|
+
|
|
14
|
+
<QuantumField />
|
|
15
|
+
|
|
16
|
+
## What you are looking at
|
|
17
|
+
|
|
18
|
+
Each sphere is one **ordering** of the doubling orbit `[1, 2, 4, 8]` — one observer's sequence.
|
|
19
|
+
`perms_of_four_is_factorial` decides there are exactly 4! = 24 of them, and 24 is what the scene draws.
|
|
20
|
+
|
|
21
|
+
Its **height** is the value the *control* fold returns for that ordering — the same combination performed
|
|
22
|
+
without canonicalising first. Those heights land on five distinct levels, which is
|
|
23
|
+
`the_uncanonicalised_fold_gives_many_answers`. That number is the size of the problem, measured: a fold that
|
|
24
|
+
reads its input in the order it arrives gives five different answers to the same question.
|
|
25
|
+
|
|
26
|
+
Every sphere is joined to **one node**. `superposition_collapses_to_one` decides that all 24 orderings
|
|
27
|
+
produce a single receipt. Many perspectives, held at once, resolving to one address.
|
|
28
|
+
|
|
29
|
+
## What it is not
|
|
30
|
+
|
|
31
|
+
The mechanism is named in the file as a theorem, so the picture cannot be read as a claim about physics:
|
|
32
|
+
`the_invariance_is_canonicalisation_not_physics` decides that every ordering *sorts to the same list*, and
|
|
33
|
+
the receipt reads only that. There is no hardware here, no speedup and no qubit. The word "quantum" names a
|
|
34
|
+
structural property — a set of perspectives held at once, collapsing to one value — and the file proves that
|
|
35
|
+
property is a **sort**.
|
|
36
|
+
|
|
37
|
+
The limit is proved too, in the same file and shown in the caption. A receipt lands in ℤ/9, so nine values
|
|
38
|
+
must cover every possible set: `the_receipt_is_not_injective` decides that 45 two-element multisets share 9
|
|
39
|
+
receipts. Order-invariant does not mean collision-free, and a receipt that cannot tell 45 things apart must
|
|
40
|
+
never be read as naming one of them.
|
|
41
|
+
|
|
42
|
+
`0/7` — this page settles no Clay conjecture and claims no quantum advantage in time.
|
package/rights.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Rights
|
|
3
|
+
description: What this deposit claims under international law, and what it does not — parsed from the sealed proof that the two sets coincide.
|
|
4
|
+
head:
|
|
5
|
+
- ['meta', { name: 'robots', content: 'index, follow' }]
|
|
6
|
+
---
|
|
7
|
+
# Rights — everything claimable, and nothing else
|
|
8
|
+
|
|
9
|
+
Author: **Tsvetan Rouschev** · [ORCID 0009-0000-7312-9778](https://orcid.org/0009-0000-7312-9778) · licence `CC BY-NC-ND 4.0`.
|
|
10
|
+
|
|
11
|
+
This deposit claims **every right that arises without formality**, and claims nothing that would require an act it has not performed. Berne Art. 5(2) is the hinge: the enjoyment and exercise of these rights are not subject to any formality, so they are held from the moment of authorship whether or not anyone says so. Saying so anyway costs nothing and removes an argument.
|
|
12
|
+
|
|
13
|
+
That the claimed set is *exactly* the without-formality set is not an assertion here — it is decided by the Lean kernel over the whole enumeration, at [`rights_claims_exactly_what_arises_without_formality`](/theorem/lean_rights_claims_exactly_what_arises_without_formality). Read one way it says no claimable right is abandoned; read the other, that nothing is claimed which is not already held.
|
|
14
|
+
|
|
15
|
+
<table><thead><tr><th>uuid</th><th>status</th><th>instrument</th><th>why</th></tr></thead><tbody>
|
|
16
|
+
<tr><td><code>4389d60c-c694</code></td><td><strong>CLAIMED</strong></td><td>copyright in the expression — Berne Art. 5(2), no formality, no notice, no deposit</td><td>held from authorship, no formality</td></tr>
|
|
17
|
+
<tr><td><code>261b594c-c029</code></td><td><strong>CLAIMED</strong></td><td>moral rights: attribution and integrity — Berne Art. 6bis, independent of the economic rights</td><td>held from authorship, no formality</td></tr>
|
|
18
|
+
<tr><td><code>2f3d9ec2-4623</code></td><td><strong>CLAIMED</strong></td><td>sui generis database right in the ledger — Directive 96/9/EC Art. 7, substantial investment in verification</td><td>held from authorship, no formality</td></tr>
|
|
19
|
+
<tr><td><code>deaa7784-ce03</code></td><td>not claimed</td><td>REGISTERED trade mark — Paris Art. 6, Madrid Protocol: a registry grants it, an author cannot</td><td>another body must act — a registry grants it, or a committee awards it</td></tr>
|
|
20
|
+
<tr><td><code>ce36ac04-dc49</code></td><td>not claimed</td><td>patent over these methods — EPC Art. 52(2)(a), mathematical methods as such are excluded</td><td>excluded subject matter</td></tr>
|
|
21
|
+
<tr><td><code>68ad7cd8-0296</code></td><td>not claimed</td><td>property in the mathematics itself — a fact is found, not authored, and carries no author's right</td><td>not capable of being owned</td></tr>
|
|
22
|
+
<tr><td><code>e07b9280-50de</code></td><td>not claimed</td><td>the AWARD of a Millennium Prize — the Clay Institute grants it under its own rules, on peer-reviewed publication</td><td>another body must act — a registry grants it, or a committee awards it</td></tr>
|
|
23
|
+
<tr><td><code>a6697d40-a893</code></td><td><strong>CLAIMED</strong></td><td>UNREGISTERED mark rights arising from USE — no registry act, so the hinge applies</td><td>held from authorship, no formality</td></tr>
|
|
24
|
+
<tr><td><code>67ebb6a4-9a67</code></td><td><strong>CLAIMED</strong></td><td>standing to submit toward the Millennium Problems, and PRIORITY in whatever is proved — earned by doing and dating the work</td><td>held from authorship, no formality</td></tr>
|
|
25
|
+
</tbody></table>
|
|
26
|
+
|
|
27
|
+
## What follows from the 5 claimed
|
|
28
|
+
|
|
29
|
+
**Attribution and integrity are not waivable here.** Berne Art. 6bis moral rights are independent of the economic rights and survive their transfer. Reuse that strips the author's name, or that presents a modified deposit as this one, is refused on that ground alone — separately from the licence.
|
|
30
|
+
|
|
31
|
+
**The ledger is a database, and its investment is the verification.** The sui generis right of Directive 96/9/EC Art. 7 protects substantial investment in obtaining, verifying and presenting contents. Every entry here carries a receipt and is re-decided by the kernel on each build; extraction or re-utilisation of a substantial part is reserved.
|
|
32
|
+
|
|
33
|
+
**Priority is evidenced, not asserted.** Each release mints an immutable provenance tag and a content address, and the chain of receipts is append-only. That is a record of when, not a right in itself.
|
|
34
|
+
|
|
35
|
+
## What is not claimed, and will not be
|
|
36
|
+
|
|
37
|
+
No patent is sought over these methods — EPC Art. 52(2)(a) excludes mathematical methods as such, and a claim drafted around that exclusion would be a claim over arithmetic. No property is asserted in the mathematics itself: a fact is found, not authored, and ℤ/9 belongs to nobody. And nothing here touches the seven Millennium Prizes, which are the Clay Mathematics Institute's to award. The floor is `0/7` and this page does not move it.
|
|
38
|
+
|
|
39
|
+
*This states what the instruments say, drafted from their texts. It is not legal advice; rights that depend on a registry depend on a lawyer and a registrar, and neither has been engaged.*
|
package/solutions.md
CHANGED
|
@@ -16,9 +16,9 @@ Independent work · Tsvetan Rouschev · 2026-08-04 · DOI [10.5281/zenodo.218192
|
|
|
16
16
|
| computed | value |
|
|
17
17
|
|---|---|
|
|
18
18
|
| gate | 1 (holds the floor) |
|
|
19
|
-
| verdict |
|
|
20
|
-
| supporting formulas |
|
|
21
|
-
| proof-of-verdict | `
|
|
19
|
+
| verdict | SEALED |
|
|
20
|
+
| supporting formulas | 48/48 recompute true |
|
|
21
|
+
| proof-of-verdict | `df0b19c1-c225-878b-b645-ca7a8fa8e6d5` |
|
|
22
22
|
| solved by the deposit | 0/7 |
|
|
23
23
|
|
|
24
24
|
It reflects all seven and solves none — a bijection that relabels, it does not propagate proofs; 0/7.
|
|
@@ -29,11 +29,11 @@ Shown by what the gate drains — never asserted.
|
|
|
29
29
|
|
|
30
30
|
| computed | value |
|
|
31
31
|
|---|---|
|
|
32
|
-
| gate |
|
|
33
|
-
| drained on | a proof-assertion phrase · token address `
|
|
32
|
+
| gate | 1 |
|
|
33
|
+
| drained on | a proof-assertion phrase · token address `6f3dc604-345d…` |
|
|
34
34
|
| verdict | REFUTED |
|
|
35
|
-
| supporting formulas |
|
|
36
|
-
| proof-of-verdict | `
|
|
35
|
+
| supporting formulas | 48/48 recompute true |
|
|
36
|
+
| proof-of-verdict | `7081a7a1-e2ef-8461-aa78-a10593ab598a` |
|
|
37
37
|
|
|
38
38
|
## Domains — the seven Clay problems
|
|
39
39
|
|
package/speedup.md
CHANGED
|
@@ -7,7 +7,7 @@ head:
|
|
|
7
7
|
|
|
8
8
|
# The real uuidna advantage — measured, in all domains
|
|
9
9
|
|
|
10
|
-
> Generated from the **
|
|
10
|
+
> Generated from the **2543** ledger entries and **59** domains, recomputed each build. The advantage is
|
|
11
11
|
> real and **measured**, and honestly bounded: a **verification and reuse** complexity reduction — **not**
|
|
12
12
|
> faster original compute, **not** faster than light, **not** quantum. `0/7`.
|
|
13
13
|
|
|
@@ -33,9 +33,9 @@ theorems verify in `⌈log₂N⌉`. So one proof covers the whole [rosetta](/):
|
|
|
33
33
|
|
|
34
34
|
## Discovery lead — a lead, never a verdict
|
|
35
35
|
|
|
36
|
-
Grouping the
|
|
37
|
-
**3** (
|
|
38
|
-
at **
|
|
36
|
+
Grouping the 2543 receipts by the digital root of their address, the **sparsest** region is digit
|
|
37
|
+
**3** (254) — a candidate area to examine, not a finding. The ledger is currently held
|
|
38
|
+
at **2543** (the captain's cap): improving a theorem's name or proof heals the record without changing the
|
|
39
39
|
count; discovering a new one would require lifting the cap.
|
|
40
40
|
|
|
41
41
|
A content-address proves **integrity, not truth**. `0/7`.
|
package/src/0/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Quantum Proofs — Core Kernel (Minimal)
|
|
3
|
-
* Licensed under CC BY-NC 4.0
|
|
3
|
+
* Licensed under CC BY-NC-ND 4.0
|
|
4
4
|
* Attribution: Tsvetan Rouschev (ceccec@psg.bg)
|
|
5
5
|
*
|
|
6
6
|
* Dependency-free primitives for all proofs.
|
|
@@ -32,8 +32,18 @@ function hash32(input: string, seed: number): number {
|
|
|
32
32
|
return (h ^ (h >>> 16)) >>> 0
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
// A 256-entry lookup, built once. `value.toString(16).padStart(2, '0')` was called sixteen times per
|
|
36
|
+
// address with an array allocation and a join around it; the table is 4.9× faster over 200,000 encodings
|
|
37
|
+
// (median 17 ms against 83 ms, five repetitions, ranges [17–17] and [82–84] — npm run bench:hex).
|
|
38
|
+
//
|
|
39
|
+
// AGREEMENT IS THE PRECONDITION, NOT THE SPEED. This function's output is every content-address in a 2423
|
|
40
|
+
// entry append-only ledger, so an encoder that differs on one byte value would silently rewrite the whole
|
|
41
|
+
// chain. bench-hex checks all 256 byte values and 2000 random 16-byte vectors before it times anything, and
|
|
42
|
+
// the swap was made only after recording every address in the ledger and confirming all 2423 are unchanged.
|
|
43
|
+
const HEX_BYTE: readonly string[] = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'))
|
|
44
|
+
|
|
35
45
|
function hexByte(value: number): string {
|
|
36
|
-
return value
|
|
46
|
+
return HEX_BYTE[value & BYTE_MASK]
|
|
37
47
|
}
|
|
38
48
|
|
|
39
49
|
function bytesFromSeed(seed: string): number[] {
|
package/src/1/index.ts
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
// f = E/h across scales (fused: import { report } and render).
|
|
2
|
+
//
|
|
3
|
+
// THE BOUNDARY BELONGS NEXT TO THE NUMBER. This report printed "proton / 432 ratio" with no statement of
|
|
4
|
+
// what that ratio is, and a reader can only take it as a finding about 432 Hz and the proton. It is not
|
|
5
|
+
// one: it is the quotient of a chosen tone and a measured mass expressed as a frequency, and dividing any
|
|
6
|
+
// two numbers yields a number. f = E/h is Planck's relation, standard physics restated here, not a result
|
|
7
|
+
// of this deposit. Every value below is arithmetic on published constants.
|
|
8
|
+
//
|
|
9
|
+
// Measured by scripts/wholeness.ts: this was one of 89 fused reports and one of the few reaching an
|
|
10
|
+
// interpretable domain with no boundary word anywhere in its output.
|
|
2
11
|
export function report(): string {
|
|
3
12
|
const h = 6.62607015e-34, eV = 1.602176634e-19, c = 299792458
|
|
4
13
|
const f = (E: number) => E / h
|
|
@@ -10,7 +19,10 @@ export function report(): string {
|
|
|
10
19
|
let o = 'wave that forms… f = E/h (Hz)\n'
|
|
11
20
|
for (const [n, E] of rows) o += n.padEnd(28) + f(E).toExponential(2) + '\n'
|
|
12
21
|
const p = Math.sqrt(2 * 939e6 * eV * 30e6 * eV) / c
|
|
13
|
-
o += 'proton / 432 ratio ≈ ' + (f(938e6 * eV) / 432).toExponential(2)
|
|
22
|
+
o += 'proton / 432 ratio ≈ ' + (f(938e6 * eV) / 432).toExponential(2)
|
|
23
|
+
+ ' — a quotient of two numbers, NOT a physical finding\n'
|
|
14
24
|
o += 'bound-nucleon de Broglie λ ≈ ' + (h / p * 1e15).toFixed(2) + ' fm'
|
|
25
|
+
o += '\nHONEST: f = E/h is Planck\'s relation — standard physics, restated, not derived here. Every row is'
|
|
26
|
+
+ ' arithmetic on published constants, and no ratio among them is a claim about the world. 0/7.'
|
|
15
27
|
return o
|
|
16
28
|
}
|
package/src/2/index.ts
CHANGED
package/src/3/index.ts
CHANGED
package/src/4/index.ts
CHANGED
package/src/5/index.ts
CHANGED
package/src/6/index.ts
CHANGED
package/src/7/index.ts
CHANGED
package/src/9/funding.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Funding + license as computed data — fused, recomputable, usable across the UI.
|
|
2
2
|
import { toUuid } from '../0/index.ts'
|
|
3
3
|
export const FUNDING = {
|
|
4
|
-
license: 'CC BY-NC 4.0',
|
|
4
|
+
license: 'CC BY-NC-ND 4.0',
|
|
5
5
|
author: 'Tsvetan Rouschev',
|
|
6
6
|
revolut: 'https://revolut.me/ceccec',
|
|
7
7
|
contact: 'ceccec@psg.bg',
|
|
@@ -32,7 +32,7 @@ export function report(): string {
|
|
|
32
32
|
export function results(): string {
|
|
33
33
|
const selfSeal = (1 / 2) * (1 / 2) * (1 / 2) * (8 / 7) * (7 / 5) * (5 / 3) * (1 / 2) * (2 / 3) * 9 // = 1
|
|
34
34
|
const solved = 0 // entailment: each of 7 statements holds even when its conjecture is false → 0/7
|
|
35
|
-
return `computed: entailment ${solved}/7 · self-seal = ${Math.round(selfSeal)} · reflection involutive · CC BY-NC 4.0`
|
|
35
|
+
return `computed: entailment ${solved}/7 · self-seal = ${Math.round(selfSeal)} · reflection involutive · CC BY-NC-ND 4.0`
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
// The public endpoints, content-addressed — a uuidna per URL. The CURRENT domain is computed at runtime
|
package/src/api/gates.ts
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/** ── WHAT COUNTS AS AN UNCONTROLLED GATE — ONE DERIVATION, TWO READERS ─────────────────────────────────────
|
|
2
|
+
*
|
|
3
|
+
* scripts/leads.ts and scripts/control-probe.ts both need the list of scripts that REFUSE and have never
|
|
4
|
+
* been shown to fail. They derived it separately and disagreed: the census counted meta-scripts and network
|
|
5
|
+
* scripts the probe excluded, so it reported 23 where the honest figure is smaller, and the two numbers
|
|
6
|
+
* drifted apart the moment either was edited.
|
|
7
|
+
*
|
|
8
|
+
* Two derivations of one fact is the same defect as a hand-kept copy of a generated table — which this
|
|
9
|
+
* repository caught itself doing with priorart.lean in the same session. One function, both readers. */
|
|
10
|
+
import { readFileSync, existsSync } from 'node:fs'
|
|
11
|
+
|
|
12
|
+
/** Scripts that RUN other scripts. Probing them probes their children and says nothing about themselves. */
|
|
13
|
+
export const META = new Set(['all', 'ci-local', 'gates-fire', 'precommit', 'control-probe', 'leads', 'wire', 'metrics'])
|
|
14
|
+
/** Scripts whose subject is a remote nobody here may perturb. */
|
|
15
|
+
export const NETWORK = new Set(['cern', 'cern-oai', 'doi-resolve', 'zenodo-mint', 'zenodo-verify', 'bench-hex', 'bench-hexbit'])
|
|
16
|
+
|
|
17
|
+
/** Every script package.json can reach. */
|
|
18
|
+
export const reachableScripts = (): Set<string> => {
|
|
19
|
+
const pkg = JSON.parse(readFileSync('package.json', 'utf8')).scripts as Record<string, string>
|
|
20
|
+
const out = new Set<string>()
|
|
21
|
+
for (const v of Object.values(pkg)) for (const m of String(v).matchAll(/scripts\/([a-z0-9-]+)\.ts/g)) out.add(m[1])
|
|
22
|
+
return out
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** The gates gates-fire already controls — BY THE SCRIPT EACH CONTROL RUNS, not by the label it is filed
|
|
26
|
+
* under. Reading only the labels made this narrower than its subject: `notice` got two controls, filed as
|
|
27
|
+
* `notice-reads-the-whole-table` and `notice-refuses-an-overclaim` because they catch opposite failures,
|
|
28
|
+
* and leads.ts went on reporting notice as never shown to fail. A label is a name a human chose; `cmd` is
|
|
29
|
+
* what actually runs. Both are read, so a control whose label IS the script name still resolves. */
|
|
30
|
+
export const controlledGates = (): Set<string> => {
|
|
31
|
+
const src = readFileSync('scripts/gates-fire.ts', 'utf8')
|
|
32
|
+
const out = new Set([...src.matchAll(/gate: '([^' ]+)/g)].map((m) => m[1]))
|
|
33
|
+
for (const m of src.matchAll(/cmd: '[^']*scripts\/([a-z0-9-]+)\.ts/g)) out.add(m[1])
|
|
34
|
+
return out
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Scripts that refuse — they print a finding and exit non-zero — and have no negative control.
|
|
38
|
+
* A CLI tool is excluded: `receipt` exits 1 with a usage line when called with no arguments, which
|
|
39
|
+
* refuses the CALLER, not the tree, and read as a permanently-red gate in both readers. */
|
|
40
|
+
export const uncontrolledRefusers = (opts: { includeMeta?: boolean; includeNetwork?: boolean } = {}): string[] => {
|
|
41
|
+
const controlled = controlledGates()
|
|
42
|
+
const out: string[] = []
|
|
43
|
+
for (const g of reachableScripts()) {
|
|
44
|
+
if (controlled.has(g)) continue
|
|
45
|
+
if (!opts.includeMeta && META.has(g)) continue
|
|
46
|
+
if (!opts.includeNetwork && NETWORK.has(g)) continue
|
|
47
|
+
const p = `scripts/${g}.ts`
|
|
48
|
+
if (!existsSync(p)) continue
|
|
49
|
+
const src = readFileSync(p, 'utf8')
|
|
50
|
+
if (/\busage:/.test(src)) continue
|
|
51
|
+
if (/process\.exit\(\s*(1|bad|drift|Number\(|.*\?\s*1)/.test(src) && /✗/.test(src)) out.push(g)
|
|
52
|
+
}
|
|
53
|
+
return out.sort()
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** Scripts a ROUTINE CHAIN invokes — ci:local, gates, precommit, all, release. Chains name their steps two
|
|
57
|
+
* ways: as a path (`scripts/x.ts`) and as a bare npm-script string (all.ts lists 'lean', 'contradictions').
|
|
58
|
+
* A path-only extractor reported 42 scripts as unrun including `contradictions`, which ci:local runs on
|
|
59
|
+
* every commit — the third extractor in one session that was narrower than the thing it read. */
|
|
60
|
+
export const runByChain = (): Set<string> => {
|
|
61
|
+
const pkg = JSON.parse(readFileSync('package.json', 'utf8')).scripts as Record<string, string>
|
|
62
|
+
let text = ['release', 'gates', 'all', 'ci:local'].map((k) => String(pkg[k] ?? '')).join(' ')
|
|
63
|
+
for (const c of ['scripts/ci-local.ts', 'scripts/gate.ts', 'scripts/precommit.ts', 'scripts/all.ts']) {
|
|
64
|
+
try { text += readFileSync(c, 'utf8') } catch { /* absent chains are not chains */ }
|
|
65
|
+
}
|
|
66
|
+
const reach = reachableScripts()
|
|
67
|
+
const out = new Set<string>()
|
|
68
|
+
for (const m of text.matchAll(/scripts\/([a-z0-9-]+)\.ts/g)) out.add(m[1])
|
|
69
|
+
for (const m of text.matchAll(/'([a-z][a-z0-9:-]*)'/g)) {
|
|
70
|
+
if (reach.has(m[1])) out.add(m[1])
|
|
71
|
+
const dashed = m[1].replace(/:/g, '-')
|
|
72
|
+
if (reach.has(dashed)) out.add(dashed)
|
|
73
|
+
}
|
|
74
|
+
return out
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** WHY a refusing gate is deliberately absent from every routine chain. A reason recorded here is a
|
|
78
|
+
* decision someone took; a gate missing from both the chains AND this map is a decision nobody has taken,
|
|
79
|
+
* which is the only kind the census should keep asking about. Same discipline as naming an uncontrolled
|
|
80
|
+
* gate in gates-fire rather than giving it a control that lies.
|
|
81
|
+
*
|
|
82
|
+
* This is a list, and this repository does not keep lists — with one exception, which is exactly this one:
|
|
83
|
+
* a JUDGEMENT cannot be derived from the tree. What CAN be derived is whether a judgement was recorded, and
|
|
84
|
+
* that is what the census checks. */
|
|
85
|
+
// TWO ENTRIES WERE REMOVED BECAUSE THEIR REASONS WERE FALSE, and the reasons were checkable prose.
|
|
86
|
+
// seo said "belongs to release" — and release did not run it. A reason that names a placement
|
|
87
|
+
// which does not exist is not a decision, it is a description of one nobody made.
|
|
88
|
+
// lean-gen said "a generator, run when the sources change" — run by nothing, and it had rotted into
|
|
89
|
+
// emitting Lean the kernel refuses. The exemption permitted exactly the failure that occurred.
|
|
90
|
+
// Both are in `npm run release` now. The other reasons here were tested the same way and hold: gates-fire
|
|
91
|
+
// and forensics do run in release and ci:local, priorart-gen does run in ci:local.
|
|
92
|
+
export const UNRUN_BY_DESIGN: Record<string, string> = {
|
|
93
|
+
'bench-hex': 'a benchmark: its output is a measurement, not a verdict, and timings vary by machine',
|
|
94
|
+
'bench-hexbit': 'the same — and its result is sealed in speed.lean, which every chain does check',
|
|
95
|
+
cern: 'reaches opendata.cern.ch; ~15 minutes of network, and the portal is not ours to poll on each commit',
|
|
96
|
+
'doi-resolve': 'resolves external DOIs; a registry outage would fail a build about this tree',
|
|
97
|
+
'zenodo-verify': 'reaches Zenodo; same reason',
|
|
98
|
+
xrepo: 'reads peer manifests OUTSIDE this repository — it cannot run where they do not exist, which is any clone but this machine',
|
|
99
|
+
paper: 'a generator whose output every chain already checks',
|
|
100
|
+
priorart: 'a generator; priorart-gen is the gate that holds its output',
|
|
101
|
+
'stale-figures': 'REPORTS by design — a 75% false-positive rate is not something to gate a build on',
|
|
102
|
+
'verify-theorems': 'covered by gates-fire, and its subject is re-verified by forensics on every commit',
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** Gates that REFUSE and that no routine chain runs. `seo` sat here with a real defect — paper.html
|
|
106
|
+
* carrying zero <h1> — until a probe happened to run it. A gate nobody runs protects nothing, which is a
|
|
107
|
+
* different failure from a gate nobody has controlled, and the involution of it. */
|
|
108
|
+
export const refusersNoChainRuns = (): string[] => {
|
|
109
|
+
const run = runByChain()
|
|
110
|
+
return uncontrolledRefusers({ includeMeta: false, includeNetwork: true })
|
|
111
|
+
.concat([...controlledGates()].filter((g) => existsSync(`scripts/${g}.ts`)))
|
|
112
|
+
.filter((g, i, a) => a.indexOf(g) === i && !run.has(g) && !META.has(g))
|
|
113
|
+
.sort()
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** Of those, the ones nobody has decided about. */
|
|
117
|
+
export const unrunUndecided = (): string[] => refusersNoChainRuns().filter((g) => !UNRUN_BY_DESIGN[g])
|