@hviana/sema 0.9.4 → 0.9.5
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/AGENTS.md +16 -7
- package/dist/src/mind/learning.js +11 -12
- package/dist/src/mind/mind.js +4 -4
- package/dist/src/mind/types.d.ts +10 -15
- package/dist/src/store.d.ts +10 -10
- package/dist/src/store.js +5 -5
- package/docs/INDEX.md +62 -63
- package/docs/INVARIANTS.md +36 -18
- package/docs/architecture/bounded-reads.md +31 -71
- package/docs/architecture/caches.md +61 -81
- package/docs/architecture/closure.md +88 -107
- package/docs/architecture/commonality.md +47 -38
- package/docs/architecture/cost-model.md +57 -79
- package/docs/architecture/determinism.md +43 -55
- package/docs/architecture/evidence.md +158 -235
- package/docs/architecture/exact-vs-approximate.md +41 -35
- package/docs/architecture/factored-machinery.md +34 -20
- package/docs/architecture/fold-contract.md +110 -118
- package/docs/architecture/halo-sketch.md +105 -96
- package/docs/architecture/match-project.md +51 -42
- package/docs/architecture/mechanism-market.md +87 -91
- package/docs/architecture/memoization.md +60 -74
- package/docs/architecture/meter.md +37 -47
- package/docs/architecture/saturation.md +75 -101
- package/docs/architecture/store.md +118 -99
- package/docs/architecture/thresholds.md +66 -73
- package/docs/failures/tempting-but-wrong.md +139 -165
- package/docs/harness/gates.md +27 -32
- package/docs/mechanisms/alu.md +22 -69
- package/docs/mechanisms/cast.md +76 -71
- package/docs/mechanisms/confluence.md +22 -29
- package/docs/mechanisms/cover.md +58 -66
- package/docs/mechanisms/extraction.md +33 -37
- package/docs/mechanisms/prefix-completion.md +36 -39
- package/docs/mechanisms/recall.md +60 -53
- package/docs/mechanisms/reference.md +63 -49
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/alu/README.md +90 -298
- package/src/derive/README.md +94 -256
- package/src/mind/learning.ts +11 -12
- package/src/mind/mind.ts +4 -4
- package/src/mind/types.ts +10 -15
- package/src/rabitq-ivf/README.md +11 -8
- package/src/store.ts +5 -5
|
@@ -1,90 +1,70 @@
|
|
|
1
|
-
# Caches — Every Acceleration Is a
|
|
1
|
+
# Caches — Every Acceleration Is a Budget
|
|
2
2
|
|
|
3
|
-
> **Law:** every acceleration is a `BoundedMap
|
|
4
|
-
> re-derives from durable state.
|
|
5
|
-
>
|
|
3
|
+
> **Law:** every acceleration is a byte-budgeted `BoundedMap`, and a miss
|
|
4
|
+
> re-derives from durable state. Eviction may cost speed or reach. It never
|
|
5
|
+
> changes what is stored, what is resolved or what tree is folded.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
**Why.** Resident memory is capped by configuration, not by how much was learnt,
|
|
8
|
+
so a large store does not need a large machine. That holds only if every cache
|
|
9
|
+
can forget without being wrong.
|
|
10
10
|
|
|
11
|
-
## `BoundedMap` — the one cache primitive
|
|
11
|
+
## `BoundedMap` — the one cache primitive (`src/store.ts`)
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
An LRU with byte accounting (`maxBytes`, `sizeOf`), whose eviction is amortised
|
|
14
|
+
O(1) over a persistent cursor. It has two settings:
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
**`evict`, which entry goes:**
|
|
17
|
+
|
|
18
|
+
- `"lru"` — for entries of uniform cost.
|
|
19
|
+
- `"smallest"` — for variable-cost reconstructions (`_bytesCache`). It protects
|
|
18
20
|
expensive large branches over cheap leaves.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
- `
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
ANN read caches (`_resonateCache`, `_resonateHaloCache`) are
|
|
46
|
-
|
|
47
|
-
`
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
| `_resolvedSubtrees` | `Mind._resolvedSubtrees: WeakMap<Sema,{id,len}>` | — | per-response/conversation; fast path only when `visit===undefined` |
|
|
63
|
-
|
|
64
|
-
`REACH_MEMO_MAX` / `STRUCT_MEMO_MAX` 100K (`src/mind/traverse.ts`) — whole-climb
|
|
65
|
-
and per-node structural probes (`hasNext`/`prevCount`/`hasParents`); cleared on
|
|
66
|
-
write or when cap reached. `reachMemo`/`structCaches` keyed by `_structMemoKey`,
|
|
67
|
-
bypassed under trace.
|
|
68
|
-
|
|
69
|
-
## Deposit caches — offset-keyed, caller-discharged
|
|
70
|
-
|
|
71
|
-
`_depositTrees`/`_depositLens`/`_internIds`/`_resolvedSubtrees` key **offsets**,
|
|
72
|
-
not bytes, for O(1) reuse. Offsets alone cannot witness byte agreement — caller
|
|
73
|
-
must discharge it.
|
|
74
|
-
|
|
75
|
-
- Correct: conversation append — each turn extends the prior cumulative context
|
|
76
|
-
by its own bytes; longest cached proper prefix hit (`L < bytes.length`) reuses
|
|
77
|
-
`contentFoldIncremental` segments bit-identically.
|
|
78
|
-
- Wrong: mismatched `prev` reused by offset produced wrong tree (336 vs 400
|
|
79
|
-
bytes) — a coincidental prefix length aliased unrelated content.
|
|
80
|
-
- Now: `perceiveDeposit` keys by `latin1(bytes.subarray(0,L))` (prefix bytes),
|
|
81
|
-
probes longest cached proper prefix first; `_depositTrees` populated only for
|
|
82
|
-
conversational deposits (budget discipline), otherwise cold path always
|
|
83
|
-
correct.
|
|
21
|
+
|
|
22
|
+
**`recency`, how use is recorded:**
|
|
23
|
+
|
|
24
|
+
- `"reorder"`, the default — exact LRU. It is required wherever the choice of
|
|
25
|
+
victim is load-bearing.
|
|
26
|
+
- `"clock"` — a use bit. It is only for transparent caches, where a wrong victim
|
|
27
|
+
costs a re-read: `_bytesCache` and `_recCache`. It caches the same entries as
|
|
28
|
+
`"reorder"`, at a fraction of the hot-path time.
|
|
29
|
+
|
|
30
|
+
## Store caches — budgets in `StoreConfig` (`src/config.ts`)
|
|
31
|
+
|
|
32
|
+
| Cache | Field | Default budget | Eviction | A miss costs |
|
|
33
|
+
| ------------------------------ | ----------------------------- | ---------------------------- | ---------------- | -------------------------------------------------- |
|
|
34
|
+
| dedup keys | `_leafKey` / `_branchKey` | `dedupCacheMax`, 1M entries | lru | a durable content probe |
|
|
35
|
+
| flat-branch hits | `_flatKey` | `dedupCacheMax` | lru + clock | a hashed probe |
|
|
36
|
+
| reconstructed bytes | `_bytesCache` | `bytesCacheMax`, 20 MB | smallest + clock | a subtree walk |
|
|
37
|
+
| content length | `_lenCache` | `bytesCacheMax` | lru | a capped walk |
|
|
38
|
+
| node records | `_recCache` | `recCacheBytes`, 10 MB | lru + clock | a row read |
|
|
39
|
+
| pending gists | `_pendingGist` | `pendingGistBytes`, 16 MB | lru | a DAG climb |
|
|
40
|
+
| exact halos / norms | `_haloExact` / `_haloNorm` | `haloCacheBytes`, 16 MB each | lru | decoding the 2-bit row |
|
|
41
|
+
| skipped interiors, indexed ids | `_coveredIds` / `_indexedIds` | `coveredIdsMax`, 100K | lru | a re-check |
|
|
42
|
+
| transparent chains | `_chainMemo` | `chainCacheBytes`, 16 MB | lru | one CTE; dropped on writes that break transparency |
|
|
43
|
+
| ingest memo | `CachedIngest._memo` | `ingestCacheBytes`, 50 MB | lru | a re-fold (the ids are hash-consed) |
|
|
44
|
+
|
|
45
|
+
- `_bytesCache` stores only complete reconstructions. A truncated prefix is
|
|
46
|
+
never cached.
|
|
47
|
+
- The ANN read caches (`_resonateCache`, `_resonateHaloCache`) are keyed by
|
|
48
|
+
`vecKey(v):k`, dropped on any index mutation, and cleared at
|
|
49
|
+
`RESONATE_CACHE_MAX`.
|
|
50
|
+
- `vectorCacheMb` and `sqliteCacheMb` only tune page-cache latency.
|
|
51
|
+
|
|
52
|
+
## Mind caches — the session
|
|
53
|
+
|
|
54
|
+
- **`_gistCache`** (32 MB): node gists, kept for the session's lifetime and
|
|
55
|
+
never invalidated, since perception is pure.
|
|
56
|
+
- **`_depositTrees` / `_depositLens`**: up to 8 folds, keyed by their bytes,
|
|
57
|
+
written only by conversational deposits, so that a growing context re-folds
|
|
58
|
+
only its suffix (`fold-contract.md`). Both reset together when the length set
|
|
59
|
+
exceeds 64.
|
|
60
|
+
- **`_internIds`** (a `WeakMap` from tree node to id): skips re-interning a
|
|
61
|
+
shared subtree. The ids it holds are permanent.
|
|
62
|
+
|
|
63
|
+
Per-response memos are in `memoization.md`.
|
|
84
64
|
|
|
85
65
|
## Pins
|
|
86
66
|
|
|
87
|
-
- `test/
|
|
88
|
-
|
|
89
|
-
- `test/
|
|
90
|
-
|
|
67
|
+
- `test/96` — `_bytesCache` is a byte-accounted `BoundedMap` that evicts, and a
|
|
68
|
+
miss re-derives.
|
|
69
|
+
- `test/91` — `chainRun` hops a transparent chain in one bounded read, not with
|
|
70
|
+
probes per node.
|
|
@@ -1,120 +1,101 @@
|
|
|
1
|
-
# Closure — One Law
|
|
2
|
-
|
|
3
|
-
> **Law:** a step is admitted only when it
|
|
4
|
-
> structure
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
| `
|
|
18
|
-
| `
|
|
19
|
-
| `
|
|
20
|
-
| `
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
`product` (what it stands on, its identity being `resolve(product)`),
|
|
30
|
-
`accounted` (the price its steps summed) and `remainder` (the question's debt,
|
|
31
|
-
at one quantum) are the derivation's own. What it REACHED and what it SPENT are
|
|
32
|
-
the layer's (`reaches`, `consumed`), never a field here: the law decides
|
|
33
|
-
admission and consumption, the layer decides frontier and termination.
|
|
1
|
+
# Closure — One Law for Every Transition
|
|
2
|
+
|
|
3
|
+
> **Law:** a step is admitted only when it **closes** the derivation, **moves**
|
|
4
|
+
> to structure the derivation has not consumed, or **carries** material the
|
|
5
|
+
> asker left unaccounted.
|
|
6
|
+
|
|
7
|
+
**Why.** Every tier that decides whether to continue asks this one law, and none
|
|
8
|
+
re-spells a condition it owns. Those tiers are the chart's frontier, the market,
|
|
9
|
+
the walk after grounding, fusion, and the mechanisms' own gates. Without the law
|
|
10
|
+
a derivation could wander: restate what it already said, cycle, or extend into
|
|
11
|
+
facts nobody asked for.
|
|
12
|
+
|
|
13
|
+
## The unit — `DerivationState` (`src/mind/derivation.ts`)
|
|
14
|
+
|
|
15
|
+
| Field | Meaning |
|
|
16
|
+
| ----------- | ----------------------------------------------------------------------------------- |
|
|
17
|
+
| `product` | the answer bytes, what the derivation stands on; its identity is `resolve(product)` |
|
|
18
|
+
| `accounted` | the asker's spans its steps explain, a cost quantity |
|
|
19
|
+
| `remainder` | what the asker still owes, per span, at the `W` floor; empty means **closed** |
|
|
20
|
+
| `cost` | its position on the ladder |
|
|
21
|
+
| `fixed` | a declared fixpoint: the query _is_ the context, so no transition is offered |
|
|
22
|
+
| `used` | the anchors the product speaks for; an empty set declares that it voices nothing |
|
|
23
|
+
|
|
24
|
+
There is no identity field, no frontier, no producer and no count. What the
|
|
25
|
+
derivation _reached_ and _spent_ belongs to the layer, which holds the structure
|
|
26
|
+
and hands the law its witnesses (`contains`, `moves`). The law never probes the
|
|
27
|
+
store.
|
|
34
28
|
|
|
35
29
|
## The transition
|
|
36
30
|
|
|
37
|
-
`admissible(state, continuation, query, W)` returns the witnesses
|
|
38
|
-
in, or `null
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
31
|
+
`admissible(state, continuation, query, W)` returns the witnesses a step pays
|
|
32
|
+
in, or `null`. `advance(state, continuation, witnesses)` is the only transition.
|
|
33
|
+
No state is built by hand anywhere else (`test/137.7`).
|
|
34
|
+
|
|
35
|
+
- **A state is born owing** everything its product does not carry.
|
|
36
|
+
- **`carries` admits by engagement and consumes nothing.** Only a declared move
|
|
37
|
+
consumes, and only the material its window proves. Both shortcuts were
|
|
38
|
+
refuted: draining whole spans (`test/110`) and trusting the window alone
|
|
39
|
+
(`test/138`).
|
|
40
|
+
- **A step the question did not name pays from what it still owes.** Naming is
|
|
41
|
+
the evidence law (`evidence.md`).
|
|
42
|
+
- **The law owns no search, so it cannot prevent a cycle.** That belongs to the
|
|
43
|
+
layer, which holds the structure. A fusion the law refuses is simply not
|
|
44
|
+
taken, and there is no hand-built fallback.
|
|
49
45
|
|
|
50
46
|
## The engine — `closeOver`
|
|
51
47
|
|
|
52
|
-
`closeOver(state, query, W, layers
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
`fixed`.
|
|
90
|
-
2. **Closure by the query's position in the graph is not a term of the unit** —
|
|
91
|
-
`reason`'s echo guards stop with the remainder non-empty, and recall's
|
|
92
|
-
reverse tiers close with an empty accounting. That is a fact about the
|
|
93
|
-
asker's material in the store, available only to the layer holding it.
|
|
94
|
-
3. **The extension is not priced into the market** (`test/136.2`): the engine
|
|
95
|
-
closes the WINNER only; pricing each candidate's closure would run the walk
|
|
96
|
-
for every candidate, and that comparison has not been measured.
|
|
48
|
+
`closeOver(state, query, W, layers)` closes a derivation layer by layer. A layer
|
|
49
|
+
(`ClosureLayer`) is a named offer with its own instrumentation. Layers are
|
|
50
|
+
phases: each runs to its own end, in order, and is never revisited.
|
|
51
|
+
|
|
52
|
+
- **"Not fixed" is checked first.** A fixed state admits no transition, so no
|
|
53
|
+
layer is entered.
|
|
54
|
+
- **Engagement is the layer's.** A layer with nothing to offer a state
|
|
55
|
+
(`engages`) is not entered, and pays no offer and no meter phase.
|
|
56
|
+
- **The pipeline's post-grounding stage is this engine,** with two layers. The
|
|
57
|
+
walk (`walkLayer`) absorbs forward or pivots. The fusion (`fusionLayer`) makes
|
|
58
|
+
one composed transition, and engages only while the derivation is open.
|
|
59
|
+
|
|
60
|
+
## What the law decides, and what it does not
|
|
61
|
+
|
|
62
|
+
- **The offer of a hop is a consequence.** The chart offers the corpus's
|
|
63
|
+
continuations under the read cap, each a move priced `STEP`, and the search
|
|
64
|
+
decides (`test/112`).
|
|
65
|
+
- **The depth of a join is a consequence.** A join consumes the shortest tail
|
|
66
|
+
prefix that names a learnt key leading somewhere, and chains until the tail is
|
|
67
|
+
consumed (`test/108`). It is priced only for the facts the lightest derivation
|
|
68
|
+
stands on, never for everything the exploration reached (`test/150`).
|
|
69
|
+
- **A gap's reach is not a consequence everywhere.** In alignment it is: the
|
|
70
|
+
walk goes outward with no cap. Recognition's interior pass is bounded at
|
|
71
|
+
`W⁴ + 2r`, because exact unbounded reach would need a whole-stream index the
|
|
72
|
+
store does not have.
|
|
73
|
+
|
|
74
|
+
Three limits were proved and deliberately left out:
|
|
75
|
+
|
|
76
|
+
1. **The chart cannot evaluate accounting.** Carrying it per item was measured
|
|
77
|
+
and rejected, so the chart reads the law off its items: identity is the key,
|
|
78
|
+
continuation is a rule existing, closure is the goal test.
|
|
79
|
+
2. **Closure by the query's position in the graph is the layer's, not the
|
|
80
|
+
unit's.** The echo guards stop with the remainder non-empty, and recall's
|
|
81
|
+
reverse tiers close with nothing accounted.
|
|
82
|
+
3. **The extension is not priced into the market.** Only the winner is closed,
|
|
83
|
+
because pricing every candidate's closure has not been measured
|
|
84
|
+
(`test/136.2`).
|
|
97
85
|
|
|
98
86
|
## Layering
|
|
99
87
|
|
|
100
|
-
|
|
101
|
-
`rationale.ts` and `pipeline.ts`. The span algebra
|
|
102
|
-
|
|
88
|
+
`derivation.ts` imports only `../bytes.js` and sits below `graph-search.ts`,
|
|
89
|
+
`match.ts`, `rationale.ts` and `pipeline.ts`. The span algebra
|
|
90
|
+
(`unexplainedSpans` and its relatives) lives here as the law's vocabulary.
|
|
103
91
|
|
|
104
92
|
## Pins
|
|
105
93
|
|
|
106
|
-
- `test/133`–`137` — the law's home, readings, refusal
|
|
107
|
-
- `test/138` — a cycle cannot close
|
|
108
|
-
|
|
109
|
-
- `test/140` — irrelevant supply changes nothing.
|
|
94
|
+
- `test/133`–`137` — the law's home, its readings, refusal and limits.
|
|
95
|
+
- `test/138`, `test/139` — a cycle cannot close a derivation, and a carried move
|
|
96
|
+
can; carrying is engagement, not explanation.
|
|
110
97
|
- `test/142`, `test/143` — the offer's contract, and the cycles.
|
|
111
|
-
- `test/
|
|
112
|
-
|
|
113
|
-
- `test/
|
|
114
|
-
|
|
115
|
-
ends one layer, and the pipeline sequences no layer by hand.
|
|
116
|
-
- `test/150` — the join prices the facts a derivation stands on, not every fact
|
|
117
|
-
the exploration reaches (a hub's degree changes nothing).
|
|
118
|
-
- `test/151` — the cover's other async premises (connectors, concept hops) are
|
|
119
|
-
resolved where the search reaches them; a span's cheapest completion
|
|
120
|
-
dominates; a grounding on the whole query pays no fusion climb.
|
|
98
|
+
- `test/149` — the engine: "not fixed" first, layers as phases, engagement, and
|
|
99
|
+
no layer sequenced by hand.
|
|
100
|
+
- `test/150`, `test/151` — the join prices only what the derivation stands on,
|
|
101
|
+
and a hub's degree costs nothing.
|
|
@@ -1,54 +1,63 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Commonality — What Is Shared, Relative to Whom
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
> **Law:** every judgement of relevance cuts a population into what it shares
|
|
4
|
+
> (frame, scaffolding) and what varies (filler, the discriminating part). The
|
|
5
|
+
> cut is always read over a named population. Sema uses three populations, with
|
|
6
|
+
> three measures, and never substitutes one for another.
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Commonality and discrimination are the two sides of one cut, and the cut has no
|
|
9
|
+
absolute answer. `the importance of` is frame among the essay prompts aligned to
|
|
10
|
+
a question and filler across the corpus. Reading one population's cut with
|
|
11
|
+
another population's measure was refuted every time it was tried (`test/17`, and
|
|
12
|
+
the container-as-hub saturation in `saturation.md`).
|
|
9
13
|
|
|
10
|
-
|
|
11
|
-
containment, IDF pooling._
|
|
14
|
+
## The three populations
|
|
12
15
|
|
|
13
|
-
|
|
14
|
-
(capped graph walks, memoised per response in `sharedReachMemo`).
|
|
15
|
-
`dominates(reach, N)` asks whether that reach is above the corpus-determined
|
|
16
|
-
majority threshold (`geometry.ts`, over `N`). Minority reach discriminates (a
|
|
17
|
-
filler), majority reach is scaffolding. Powers the climb, edge following and
|
|
18
|
-
vote pooling.
|
|
16
|
+
**Corpus contexts: how widely a node is used.**
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
- Measure: `reachOf(id, N)`, the learnt contexts its containment and edge climb
|
|
19
|
+
reaches, capped and memoized in `sharedReachMemo`.
|
|
20
|
+
- Cut: `dominates(reach, N)`. A majority is scaffolding, and a minority
|
|
21
|
+
discriminates. The climb reads the graded form of the same cut, weighing a
|
|
22
|
+
region by `ln(N/c)`.
|
|
23
|
+
- Read by the consensus climb, `confluence`'s gate and edge following.
|
|
21
24
|
|
|
22
|
-
|
|
23
|
-
weave, `MIN_WEAVE`); used by CAST._
|
|
25
|
+
**The cohort: the structures aligned to this question.**
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
`i
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
- Measure: `depth[i]`, the number of distinct structures in the weave that cover
|
|
28
|
+
byte `i`. They are counted as distinct, never by weight.
|
|
29
|
+
- Cut: `frame(i) ⇔ depth[i] > MIN_WEAVE ∧ dominates(depth[i], aligned)`, with
|
|
30
|
+
`MIN_WEAVE = 2`, because a pair is ambiguous when insertions are possible.
|
|
31
|
+
- Read by CAST (`cast.ts`).
|
|
29
32
|
|
|
30
|
-
|
|
31
|
-
frame(i) ⇔ depth[i] > MIN_WEAVE ∧ dominates(depth[i], aligned)
|
|
32
|
-
```
|
|
33
|
+
**Places: where a window occurs.**
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
- Measure: `containersSlice(id, 0, bound + 1).length`, the window's containers.
|
|
36
|
+
- Cut: `0` anchors nothing, and `≥ 2` marks the window as reused. Above the hub
|
|
37
|
+
bound, the window is scaffolding.
|
|
38
|
+
- Read by the bridge and by attention, which anchor on the rarest window first,
|
|
39
|
+
and by the scaffolding readings (`scaffoldExtents`,
|
|
40
|
+
`allWindowsAreScaffolding`).
|
|
36
41
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
**Scaffolding is nobody's evidence and nobody's debt.** A window in more than
|
|
43
|
+
`√N` places explains nothing, because every fact holds it. So a step cannot pay
|
|
44
|
+
the question by restating `is`, and a cover span made only of scaffolding is not
|
|
45
|
+
accounted (`evidence.md`).
|
|
40
46
|
|
|
41
|
-
|
|
47
|
+
`hubWindows` floors that bound at `chainReach(W) = W²`. Inside one deposit's
|
|
48
|
+
fold, a window is already contained by up to that many chunks and branches. On a
|
|
49
|
+
store of a few facts, `√N` alone would call every window scaffolding, which
|
|
50
|
+
measures fold structure, not commonness (`test/22`).
|
|
42
51
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
`rarity` counts how many containers hold a byte window: zero anchors nothing,
|
|
47
|
-
two or more marks it REUSED (`winReused`), and the bridge sorts its anchors by
|
|
48
|
-
it, so the rarest leads. Purpose: choosing what to anchor on.
|
|
52
|
+
Two limits bound every cut. Below lies chance: one pair, or a resemblance under
|
|
53
|
+
`3/√D`, cannot be told from accident. Above lies ubiquity: what everyone holds
|
|
54
|
+
discriminates nothing and abstracts nothing.
|
|
49
55
|
|
|
50
56
|
## Pins
|
|
51
57
|
|
|
52
|
-
- `test/17` — weave-local frame
|
|
53
|
-
reach.
|
|
58
|
+
- `test/17` — the weave-local frame, `MIN_WEAVE` and `dominates`, against corpus
|
|
59
|
+
reach (the reorder probe).
|
|
54
60
|
- `test/34` — containment and reach-driven disambiguation.
|
|
61
|
+
- `test/73` — a question made only of scaffolding is abstained from by the
|
|
62
|
+
bridge.
|
|
63
|
+
- `test/22` — the hub floor on small stores.
|