kotoshu 1.0.0 → 1.0.2
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.
- checksums.yaml +4 -4
- data/TODO.impl/117-deterministic-frequency-tiers.md +11 -3
- data/TODO.impl/118-server-gem-floor.md +33 -0
- data/TODO.impl/119-embedded-kelly-tiers.md +56 -0
- data/TODO.impl/120-setup-metadata-refresh.md +35 -0
- data/TODO.impl/121-jekyll-baseline-skip.md +33 -0
- data/TODO.impl/122-pack-compression-kpk2.md +66 -0
- data/TODO.impl/123-typo-corpus-synthesis.md +55 -0
- data/TODO.impl/124-owner-residue.md +19 -0
- data/TODO.impl/125-consumer-floor-guards.md +43 -0
- data/TODO.impl/126-tier-error-budgets.md +33 -0
- data/TODO.impl/127-suggestion-feedback-loop.md +34 -0
- data/TODO.impl/128-hybrid-pricing-verdict.md +47 -0
- data/TODO.impl/129-pt-fr-corpora.md +23 -0
- data/TODO.impl/130-news-truth-0912.md +23 -0
- data/TODO.impl/131-hybrid-productization.md +42 -0
- data/TODO.impl/132-techniques-page-and-prose.md +27 -0
- data/TODO.impl/133-rust-first-distribution.md +68 -0
- data/lib/kotoshu/configuration.rb +7 -2
- data/lib/kotoshu/data/frozen_kelly/en.json +1154 -0
- data/lib/kotoshu/data/frozen_kelly.rb +38 -0
- data/lib/kotoshu/jekyll.rb +4 -1
- data/lib/kotoshu/suggestions/frequency_provider.rb +8 -1
- data/lib/kotoshu/suggestions.rb +1 -0
- data/lib/kotoshu/version.rb +1 -1
- data/scripts/build_native_gem.rb +45 -0
- data/scripts/generate_frozen_tiers.rb +44 -0
- metadata +22 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 15c72e0b9eecd7ad94734eb9f8cab33e693ceff9642898fb7227f68121759425
|
|
4
|
+
data.tar.gz: 7da7d2b1d3b8bc5bdfa5651455c47ef602d0bbac53516795a51888b573adf5e8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9c14c361ee5c5cb94e3db292cd801e3af0993797643de17bf5a40b2fe0e08f2d27e8060d92290103b1db038766cddf3ee0ff8a5b9c0afc621fb4f3373f50e81e
|
|
7
|
+
data.tar.gz: 43186beae6c49a91cde7bdd66674906eb2936f75cf25c6df118c2682a26aa578a453031a903b02b08f6c8dc83b295b889da56308ffcf89ce39c5873be4dce541
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
# Plan 117 — Deterministic frequency tiers: stop the silent YAML fallback
|
|
2
2
|
|
|
3
|
-
Status:
|
|
3
|
+
Status: executed (gem PR #178, 2026-09-10)
|
|
4
|
+
|
|
5
|
+
Acceptance met: with the cache backdated past the TTL the compare is
|
|
6
|
+
2630/0/0 and suggest("ba") on the compoundrule fixtures returns the
|
|
7
|
+
frozen expectations exactly. conformance.yml gates the compare on
|
|
8
|
+
every push and PR; its first green run landed on the PR itself.
|
|
9
|
+
Suite 4007/0, rubocop clean. The checked-in-fixture variant of the
|
|
10
|
+
hermetic runner (design item 2) was not needed — the CI job seeds the
|
|
11
|
+
pinned cache instead; revisit only if the job proves flaky.
|
|
12
|
+
|
|
4
13
|
Depends on: plan 82 (conformance runner), the 2,630-vector contract (plan 66+)
|
|
5
|
-
Blocks:
|
|
6
|
-
the cut commit" — is not currently verifiable on a cache-cold machine)
|
|
14
|
+
Blocks: nothing — audit checklist item 7 is satisfied and CI-gated
|
|
7
15
|
|
|
8
16
|
## What happened (forensics, 2026-09-10)
|
|
9
17
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Plan 118 — kotoshu-server 1.0 must ride kotoshu 1.0
|
|
2
|
+
|
|
3
|
+
Status: executed (kotoshu-server PR #8 + release 1.0.1, 2026-09-11)
|
|
4
|
+
|
|
5
|
+
gemspec + Gemfile + lock floor ~> 1.0; guard spec added; server 1.0.1
|
|
6
|
+
live on RubyGems (verified). The suite ran green on kotoshu 1.0.0
|
|
7
|
+
(25/0) - the 0.6-era engine had been serving this repo's own CI.
|
|
8
|
+
Priority: P0 (a shipped 1.0.0 release cannot see the 1.0 gem)
|
|
9
|
+
|
|
10
|
+
## Problem
|
|
11
|
+
|
|
12
|
+
`kotoshu-server.gemspec` declares `spec.add_runtime_dependency "kotoshu",
|
|
13
|
+
"~> 0.6"`. Ruby's pessimistic operator makes that `>= 0.6, < 1.0` — so
|
|
14
|
+
the server 1.0.0 released in the 1.0 train resolves **kotoshu 0.11.1**,
|
|
15
|
+
not 1.0.0. Every fresh `gem install kotoshu-server` today deploys the
|
|
16
|
+
pre-freeze engine under a 1.0 label. The floor was never revisited as
|
|
17
|
+
the gem moved 0.6 → 1.0.
|
|
18
|
+
|
|
19
|
+
## Fix
|
|
20
|
+
|
|
21
|
+
- `spec.add_runtime_dependency "kotoshu", "~> 1.0"` — the server's
|
|
22
|
+
public surface consumes stable gem API only (two-stage setup, check
|
|
23
|
+
facade, semantic cascade), all frozen at 1.0.
|
|
24
|
+
- Release kotoshu-server 1.0.1 carrying the floor bump.
|
|
25
|
+
- Guard: a spec that parses the gemspec and asserts the runtime floor
|
|
26
|
+
does not exclude the current kotoshu major (the class of bug is
|
|
27
|
+
silent by construction).
|
|
28
|
+
|
|
29
|
+
## Acceptance
|
|
30
|
+
|
|
31
|
+
- `gem dependency kotoshu-server -v 1.0.1` shows kotoshu ~> 1.0.
|
|
32
|
+
- A fresh resolve (`gem install kotoshu-server --version 1.0.1` in a
|
|
33
|
+
scratch GEM_HOME) picks kotoshu 1.0.x.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Plan 119 — Embed the frozen Kelly tiers in the gem
|
|
2
|
+
|
|
3
|
+
Status: executed (gem PR #181, 2026-09-11)
|
|
4
|
+
|
|
5
|
+
Acceptance exceeded: XDG_CACHE_HOME=<empty> compare is 2630/0/0 -
|
|
6
|
+
determinism by construction, no CI seeding needed. Embedded tiers are
|
|
7
|
+
Set-equal to the checksummed cache tiers; data ships as JSON generated
|
|
8
|
+
by scripts/generate_frozen_tiers.rb (provenance + sha inside the
|
|
9
|
+
file); other languages unchanged. Full suite 4010/0, rubocop clean.
|
|
10
|
+
Depends on: plan 117 (the dataset-divergence forensics)
|
|
11
|
+
|
|
12
|
+
## Problem
|
|
13
|
+
|
|
14
|
+
Plan 117 made suggestion ranking deterministic for machines with
|
|
15
|
+
frequency data, but a cache-cold machine still falls back to
|
|
16
|
+
`lib/kotoshu/data/common_words/en.yml` — a *differently curated*
|
|
17
|
+
dataset (top_50 holds `a`; Kelly holds `a` in top_1000). The Rust
|
|
18
|
+
engine embeds the frozen Kelly tables (`kotoshu-rs
|
|
19
|
+
kotoshu/src/suggest/frequency_data.rs`, en.json sha256 97535823f41aa3f0…)
|
|
20
|
+
as its *only* source; the Ruby engine downloads them. Two engines, two
|
|
21
|
+
data paths, one contract — the fallback path is still
|
|
22
|
+
contract-divergent by construction.
|
|
23
|
+
|
|
24
|
+
## Design (single source of truth, model-driven)
|
|
25
|
+
|
|
26
|
+
- Generate `lib/kotoshu/data/frozen_kelly/en.rb` FROM the rs tables
|
|
27
|
+
(script: `scripts/generate_frozen_tiers.rb`, documented provenance:
|
|
28
|
+
the rs file path + the en.json sha). Content: three sorted word
|
|
29
|
+
arrays, sizes 47/185/907, byte-identical membership to the rs
|
|
30
|
+
`TOP_50`/`TOP_200`/`TOP_1000`.
|
|
31
|
+
- `Suggestions::FrozenTiers.tiers_for(language_code)` — returns the
|
|
32
|
+
Set-shaped tiers for `en`, nil otherwise. Pure, no IO.
|
|
33
|
+
- `FrequencyProvider#load` fallback chain becomes:
|
|
34
|
+
cache (any present data, plan 117) → **frozen embedded (en)** →
|
|
35
|
+
local YAML → empty. For `en` the YAML is thereby unreachable; for
|
|
36
|
+
every other language nothing changes (rs embeds en only — MECE with
|
|
37
|
+
the Rust side).
|
|
38
|
+
- Cache-cold machines now produce contract-exact ranking for `en`
|
|
39
|
+
with zero network, zero setup — determinism by construction instead
|
|
40
|
+
of by CI seeding.
|
|
41
|
+
|
|
42
|
+
## Acceptance
|
|
43
|
+
|
|
44
|
+
- `XDG_CACHE_HOME=<empty>` conformance compare: 2630/0/0 (today the
|
|
45
|
+
empty-cache run fails 16 — the CI seed papers over it).
|
|
46
|
+
- Parity spec: embedded tiers == the tiers `FrequencyCache` returns
|
|
47
|
+
for a checksummed en download (structural: sizes + sampled words +
|
|
48
|
+
`a` in top_1000 / `the` in top_50).
|
|
49
|
+
- Full suite green; no behavior change for cache-present machines.
|
|
50
|
+
|
|
51
|
+
## Non-goals
|
|
52
|
+
|
|
53
|
+
- No YAML deletion (other languages still use it; `en.yml` stays for
|
|
54
|
+
now as a documented dead fallback — removal is a 1.x deprecation
|
|
55
|
+
decision).
|
|
56
|
+
- No registry or format changes.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Plan 120 — setup refreshes cached_at when a download is skipped
|
|
2
|
+
|
|
3
|
+
Status: resolved as obsolete (2026-09-11, code inspection during execution)
|
|
4
|
+
|
|
5
|
+
`setup_frequency_remote` (resource_manager.rb) has no checksum-skip
|
|
6
|
+
path: `return :cached if cache.available? && !force` — expiry makes
|
|
7
|
+
`available?` false — `else cache.get` → `download` → `download_resource`
|
|
8
|
+
ALWAYS writes fresh metadata (cached_at = now). The observed
|
|
9
|
+
"downloaded but stale timestamp" was plan 117's writer/reader path
|
|
10
|
+
split in full; no second mechanism exists. Verified by walkthrough of
|
|
11
|
+
get/setup_frequency_remote/download_resource; no code change needed.
|
|
12
|
+
|
|
13
|
+
## Problem
|
|
14
|
+
|
|
15
|
+
`Kotoshu.setup(:en, want: [:frequency])` can skip the download when
|
|
16
|
+
the checksum of the fetched bytes matches the cached file, but the
|
|
17
|
+
skip path historically left `cached_at` untouched (observed 2026-09-10:
|
|
18
|
+
setup reported `frequency: :downloaded` while the reader-side metadata
|
|
19
|
+
still said 2026-09-02). An unrefreshed timestamp guarantees the next
|
|
20
|
+
TTL check fails and the resource is re-fetched for nothing — and any
|
|
21
|
+
reader still consulting TTL sees stale.
|
|
22
|
+
|
|
23
|
+
## Fix
|
|
24
|
+
|
|
25
|
+
- On a checksum-matching skip: rewrite the metadata with a fresh
|
|
26
|
+
`cached_at` (same checksum, same url) and report `:cached`, not
|
|
27
|
+
`:downloaded`. The report must describe what actually happened.
|
|
28
|
+
- Spec: backdate metadata, run setup with a stubbed fetcher (no
|
|
29
|
+
network), assert `cached_at` moved and the result says `:cached`.
|
|
30
|
+
|
|
31
|
+
## Acceptance
|
|
32
|
+
|
|
33
|
+
- Second consecutive `setup` run performs no re-download (checksum
|
|
34
|
+
match) yet leaves a TTL-valid metadata file.
|
|
35
|
+
- Honest SetupResult reporting.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Plan 121 — Jekyll generator skips the sweep for baseline-covered words
|
|
2
|
+
|
|
3
|
+
Status: executed (gem PR #181, 2026-09-11)
|
|
4
|
+
|
|
5
|
+
Third call site wired: the generator builds the per-file budget from
|
|
6
|
+
its own baseline store and threads suggestions_filter through
|
|
7
|
+
Kotoshu.check. Generator spec proves a beyond-budget occurrence
|
|
8
|
+
surfaces with suggestions while covered words never pay for the
|
|
9
|
+
sweep.
|
|
10
|
+
Depends on: plan 116 (the suggestions_filter mechanism)
|
|
11
|
+
|
|
12
|
+
## Problem
|
|
13
|
+
|
|
14
|
+
The rake task and the CLI thread `suggestions_filter:` through their
|
|
15
|
+
check callables; the Jekyll generator (plan 89) has its own baseline
|
|
16
|
+
store (`lib/kotoshu/jekyll.rb`) but still calls the checker without
|
|
17
|
+
the filter — Jekyll builds pay the full suggestion sweep for entries
|
|
18
|
+
their baseline then suppresses. Same repository, same mechanism,
|
|
19
|
+
three call sites, two wired.
|
|
20
|
+
|
|
21
|
+
## Fix
|
|
22
|
+
|
|
23
|
+
- Build the per-file budget filter via `store.suggestions_filter_for`
|
|
24
|
+
exactly as `Cli::DirectoryCheck` does, pass it through the check
|
|
25
|
+
call. The generator's baseline is a `Baseline::Store` already — the
|
|
26
|
+
filter comes from the same object (DRY by construction).
|
|
27
|
+
- Spec: a Jekyll site fixture with a baseline; assert suppressed
|
|
28
|
+
entries carry no suggestions and a new error does.
|
|
29
|
+
|
|
30
|
+
## Acceptance
|
|
31
|
+
|
|
32
|
+
- Generator output unchanged; sweep cost on baselined sites drops as
|
|
33
|
+
it did for the rake task (plan 116 evidence).
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Plan 122 — KPK2: compressed pack sections
|
|
2
|
+
|
|
3
|
+
Status: executed as REJECTED on the pre-declared gate (2026-09-12 measurement)
|
|
4
|
+
|
|
5
|
+
zstd-19 per-section, en-1.5.0.bin (15,173,525 bytes):
|
|
6
|
+
|
|
7
|
+
aff 3,086 -> 908 (3.40x)
|
|
8
|
+
dic 551,762 -> 169,700 (3.25x)
|
|
9
|
+
model 3,040,752 -> 2,769,252 (1.10x)
|
|
10
|
+
vocab 202,597 -> 59,342 (3.41x)
|
|
11
|
+
buckets 11,375,135 -> 9,854,872 (1.15x)
|
|
12
|
+
total -> 12,854,074 (84.7% of KPK1)
|
|
13
|
+
|
|
14
|
+
The acceptance gate was <= 60%. The pack is 75% int8 bucket table and
|
|
15
|
+
20% int8 ONNX weights — nearly incompressible; the sections that win
|
|
16
|
+
3.4x are 5% of the bytes. A 15% wire saving does not pay for a format
|
|
17
|
+
generation, a decompressor on the wasm surface, and a registry
|
|
18
|
+
re-cut. Revisit only if buckets shrink or sub-int8 quantization lands
|
|
19
|
+
(the thing that would actually move the 84.7%).
|
|
20
|
+
Depends on: plan 113 (KPK1), the 2026-09-10 model-efficiency research
|
|
21
|
+
|
|
22
|
+
## Problem
|
|
23
|
+
|
|
24
|
+
KPK1 packs ship raw sections: en-1.5.0.bin is 15.2 MB over the wire
|
|
25
|
+
(aff+dic text ~1.2 MB, int8 ONNX ~12 MB, vocab JSON, buckets). The
|
|
26
|
+
text/JSON sections compress ~5-10x; the int8 weights ~1.2-1.5x. The
|
|
27
|
+
playground's first-load cost is dominated by bytes that decompress in
|
|
28
|
+
microseconds — costs are being paid in the expensive dimension
|
|
29
|
+
(bandwidth) instead of the cheap one (CPU). Same pattern as
|
|
30
|
+
DeepSeek-V4.1-Flash storing KV in FP4 and dequantizing before
|
|
31
|
+
attention: compress storage, not compute.
|
|
32
|
+
|
|
33
|
+
## Design
|
|
34
|
+
|
|
35
|
+
- KPK2 container: same section framing as KPK1 (magic+count, framed
|
|
36
|
+
sections, sha256 footers) with (a) a new magic version byte, (b)
|
|
37
|
+
each section optionally zstd-frame-compressed, flagged by a new tag
|
|
38
|
+
bit; uncompressed sections remain valid — readers negotiate on the
|
|
39
|
+
magic, never on heuristics.
|
|
40
|
+
- Engine side (`kotoshu-rs`): `ruzstd` (pure-Rust decoder, no C
|
|
41
|
+
dependency — wasm-safe). Decompress per section before sha verify?
|
|
42
|
+
**No**: keep the footer sha over the COMPRESSED bytes so corruption
|
|
43
|
+
detection happens before decompression; the KPK1 golden-sha parity
|
|
44
|
+
test gains KPK2 twins.
|
|
45
|
+
- Builder side (`models-fasttext-onnx`): pack builder emits KPK2 with
|
|
46
|
+
zstd level 19 for text/JSON sections, raw-or-zstd for int8 weights
|
|
47
|
+
(measure; ship whichever wins per section).
|
|
48
|
+
- Registry: `kotoshu://packs/{lang}` entries gain the new artifacts;
|
|
49
|
+
bump registry to v1.7.0 per plan 05 policy; mirrors must serve both
|
|
50
|
+
generations during the rollout window.
|
|
51
|
+
- Consumers: wasm `loadPack` (versioned by magic), worker pack mode,
|
|
52
|
+
playground pin bump, site caching-docs truth.
|
|
53
|
+
|
|
54
|
+
## Acceptance
|
|
55
|
+
|
|
56
|
+
- en pack wire size measurably smaller (target: ≤ 60% of KPK1;
|
|
57
|
+
report actual), loadPack wall time within +10% of KPK1 (143 ms
|
|
58
|
+
baseline on M-series).
|
|
59
|
+
- Conformance: KPK1 packs still load unchanged (back-compat gate).
|
|
60
|
+
- Registry v1.7.0 released with both generations mirrored.
|
|
61
|
+
|
|
62
|
+
## Execution order (next session)
|
|
63
|
+
|
|
64
|
+
models builder → rs engine + wasm 1.1.0 → registry v1.7.0 →
|
|
65
|
+
worker/playground flip → site docs+news. The LFS upload pipeline is
|
|
66
|
+
the long pole (historically ~1h with CDN throttles) — start it first.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Plan 123 — Verifiable typo corpora, synthesized at scale
|
|
2
|
+
|
|
3
|
+
Status: executed (models PR #32, 2026-09-12)
|
|
4
|
+
|
|
5
|
+
de/es: 5,000 pairs each, dictionary-grounded, deterministic. The
|
|
6
|
+
admission rule was SHAPED BY MEASUREMENT: the first draft sampled raw
|
|
7
|
+
dictionary stems and 77% of corrections landed outside the model
|
|
8
|
+
vocab - the corpus would have measured the vocabulary cut, not
|
|
9
|
+
ranking; the checked-in rule samples the rank-ordered dict-vocab
|
|
10
|
+
intersection (correction-OOV now 0). make_typo_traced added to
|
|
11
|
+
noise.py (op provenance, weighting unchanged). Headline tier finding:
|
|
12
|
+
full-tier typo-OOV on these typos is 98.5% de / 98.6% es - the
|
|
13
|
+
quantified gap the hybrid thread claims to close. Tests in the repo's
|
|
14
|
+
unittest convention (admission invariants, histogram consistency,
|
|
15
|
+
dictionary verification, byte-deterministic rebuild). The hybrid
|
|
16
|
+
pricing rerun (plan 115 ship decision) still needs the plan-114
|
|
17
|
+
training environment reassembled; the data blocker is closed.
|
|
18
|
+
Depends on: plan 115 (hybrid pricing blocked on real de/es corpora);
|
|
19
|
+
validated direction: DeepSeek-V4.1-Flash §5.1 — data/environment
|
|
20
|
+
synthesis exceeds algorithmic novelty
|
|
21
|
+
|
|
22
|
+
## Problem
|
|
23
|
+
|
|
24
|
+
Plan 114's surviving thread (C-retrieve + fastText-rescore hybrid)
|
|
25
|
+
beat the full tier on all four real components but was parked for lack
|
|
26
|
+
of real de/es typo corpora; plan 115 priced the thread and named the
|
|
27
|
+
corpus as the blocker. Meanwhile the eval harness already owns the
|
|
28
|
+
generators: `eval/noise.py` (keyboard-aware grids, Turkish-Q/JCUKEN/
|
|
29
|
+
Greek, parameterized Latin family) and the per-language dictionaries.
|
|
30
|
+
|
|
31
|
+
## Design
|
|
32
|
+
|
|
33
|
+
- Formalize a corpus entry as (typo, correction, provenance) — the
|
|
34
|
+
verification system is the dictionary itself plus the noise model:
|
|
35
|
+
a pair is admitted iff the correction is dictionary-valid, the typo
|
|
36
|
+
is not, and the typo is reachable from the correction by the
|
|
37
|
+
declared noise operation(s). Difficulty calibration = the noise
|
|
38
|
+
op mix and edit distance distribution, reported per corpus.
|
|
39
|
+
- Scale: ≥ 5k pairs per language for de and es (matching the en
|
|
40
|
+
frozen benchmark's 2,509 real pairs at minimum, target 2x), plus
|
|
41
|
+
pt/fr as stretch; dedup by (typo, correction); stratify by distance
|
|
42
|
+
1/2 and by keyboard-adjacency vs random substitution.
|
|
43
|
+
- Honest split: synthesis trains/reprices, it must NOT be presented
|
|
44
|
+
as "real user" data — corpora carry `synthetic: true` provenance
|
|
45
|
+
and the plan-115 pricing reruns on both the frozen real components
|
|
46
|
+
(unchanged) and the synthetic corpora (new).
|
|
47
|
+
- Gates: the hybrid must still win on real components; synthetic
|
|
48
|
+
corpora may only ADD evidence, never replace the real gates
|
|
49
|
+
(pre-declared rule, plan 114 discipline).
|
|
50
|
+
|
|
51
|
+
## Acceptance
|
|
52
|
+
|
|
53
|
+
- de/es corpora checked in with provenance + difficulty histograms.
|
|
54
|
+
- Plan 115 pricing rerun: hybrid vs full tier on real (unchanged) +
|
|
55
|
+
synthetic (new) — ship-only-if-wins applies to the union.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Plan 124 — Owner-gated residue (inventory, not executable by agents)
|
|
2
|
+
|
|
3
|
+
Status: standing inventory (updated 2026-09-10)
|
|
4
|
+
|
|
5
|
+
- VS Code Marketplace + Open VSX PATs → publish kotoshu-vscode
|
|
6
|
+
(extension is publish-ready; owner: "later").
|
|
7
|
+
- Worktree cleanup — ASK OWNER before removing anything:
|
|
8
|
+
gem `.claude/worktrees/*` (10+ campaign worktrees), kotoshu-rs
|
|
9
|
+
`.claude/worktrees/packs` (content already merged), and /tmp
|
|
10
|
+
worktrees from the 1.0 day: fix-baseline, gem-dogfood, plan-116,
|
|
11
|
+
impl-116, impl-117, conf-0110, conf-0100, conf-092, conf-4597,
|
|
12
|
+
wasm-10, plans-118.
|
|
13
|
+
- kotoshu-lsp: still 0.1.1 — joins a future train if the owner wants
|
|
14
|
+
LSP on the 1.x line (audit train deliberately excluded it).
|
|
15
|
+
- Docker/kotoshu-ci + kotoshu-go/kotoshu-python floors: verify their
|
|
16
|
+
gem/base pins resolve 1.x on their next cuts (same class of bug as
|
|
17
|
+
plan 118 — check before, not after).
|
|
18
|
+
- rubygems 0.1.0 empties (lsp/server): support@rubygems.org deletion
|
|
19
|
+
remains the only path; cosmetic, owner call.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Plan 125 — Dependency-floor guards in every consumer repo
|
|
2
|
+
|
|
3
|
+
Status: executed (docker PR #1; site push 70df393; 2026-09-12)
|
|
4
|
+
|
|
5
|
+
The guard found a REAL break on its first run: the docker CI image
|
|
6
|
+
could not install kotoshu at all since the native extension shipped
|
|
7
|
+
(ruby:slim lacks make; the 'no native ext' comment was stale). Fix:
|
|
8
|
+
build-essential + clang/libclang + rustup in the builder stage.
|
|
9
|
+
Dispositions: kotoshu-go has no artifact pin to guard (pure /v1 HTTP
|
|
10
|
+
client); kotoshu-python's native extra rides the deliberately-0.x
|
|
11
|
+
kotoshu-native line - a floor lands when that line crosses 1.0
|
|
12
|
+
(tracked in plan 124).
|
|
13
|
+
Depends on: plan 118 (the bug class: silent floor drift)
|
|
14
|
+
|
|
15
|
+
## Problem
|
|
16
|
+
|
|
17
|
+
Plan 118 found kotoshu-server shipping 1.0.0 with a runtime floor
|
|
18
|
+
(`~> 0.6`) that excluded the gem it was releasing alongside — and its
|
|
19
|
+
own CI had been bundling kotoshu 0.6.0 the whole time. The same
|
|
20
|
+
silent-drift class lives wherever a consumer pins a kotoshu artifact:
|
|
21
|
+
docker-kotoshu-ci (base image gem), kotoshu-go (embedded wasm/native
|
|
22
|
+
pins or docs), kotoshu-python (wheel cargo/git pin of kotoshu-rs).
|
|
23
|
+
Nothing reads those pins after they are written.
|
|
24
|
+
|
|
25
|
+
## Fix
|
|
26
|
+
|
|
27
|
+
Each repo gains the same guard shape the server got: a spec/test that
|
|
28
|
+
loads the pin (gemspec/Dockerfile/dependency manifest) and asserts it
|
|
29
|
+
admits the artifact version the repo actually builds/tests against.
|
|
30
|
+
A constraint nobody reads is guarded by a test that reads it.
|
|
31
|
+
|
|
32
|
+
- docker-kotoshu-ci: a CI step that installs the pinned gem and
|
|
33
|
+
asserts `kotoshu --version` >= the floor the Dockerfile names.
|
|
34
|
+
- kotoshu-python / kotoshu-go: assert the pinned kotoshu-rs rev/tag
|
|
35
|
+
resolves to the crate the wheels/binaries were built from (build
|
|
36
|
+
metadata comparison), or at minimum that the pin admits the
|
|
37
|
+
workspace version.
|
|
38
|
+
|
|
39
|
+
## Acceptance
|
|
40
|
+
|
|
41
|
+
- Each repo's CI fails if its pin excludes the version it builds.
|
|
42
|
+
- 124's inventory item "floors to check on next cuts" shrinks to
|
|
43
|
+
"guards exist".
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Plan 126 — Publish the measured error budget per tier
|
|
2
|
+
|
|
3
|
+
Status: executed (site 70df393, 2026-09-12)
|
|
4
|
+
|
|
5
|
+
/performance carries the table: 55-language worst-case rank_corr /
|
|
6
|
+
top-1 agreement per tier against the gates, the vocabulary-cut
|
|
7
|
+
caveat, and the plan-123 finding that even the full tier embeds only
|
|
8
|
+
~1.5% of dictionary-grounded typos.
|
|
9
|
+
Depends on: the 2026-09-10 model-efficiency research (DeepSeek-V4.1-Flash:
|
|
10
|
+
every "cheaper" claim carries its measured number)
|
|
11
|
+
|
|
12
|
+
## Problem
|
|
13
|
+
|
|
14
|
+
The site documents tier sizes and the near-lossless headline
|
|
15
|
+
(fluency rank_corr 0.9999) but not a per-tier, per-language error
|
|
16
|
+
budget a user can reason about: what quality do I trade for mini's
|
|
17
|
+
3 MB vs fluency's 15 MB vs full? The numbers exist (gates.json,
|
|
18
|
+
corpus benches); they are just not published as a table.
|
|
19
|
+
|
|
20
|
+
## Fix
|
|
21
|
+
|
|
22
|
+
- /docs/performance gains an "Error budget" section: per tier, the
|
|
23
|
+
frozen gate values (fluency rank_corr, top-1/top-5 agreement deltas
|
|
24
|
+
vs full on the real corpora) with corpus sizes stated, plus the
|
|
25
|
+
dictionary-only baseline for contrast.
|
|
26
|
+
- The table cites its source (eval gates at registry tag) and its
|
|
27
|
+
date; numbers regenerate with each registry release (script optional
|
|
28
|
+
— a hand-truthed table with provenance beats a stale pipeline).
|
|
29
|
+
|
|
30
|
+
## Acceptance
|
|
31
|
+
|
|
32
|
+
- A user can answer "what do I lose on mini?" with one number pair.
|
|
33
|
+
- The section states corpora sizes and OOV caveats honestly.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Plan 127 — Report-a-wrong-suggestion: backendless feedback loop
|
|
2
|
+
|
|
3
|
+
Status: executed (site 70df393, 2026-09-12)
|
|
4
|
+
|
|
5
|
+
The popover carries a 'wrong suggestions? report' link opening a
|
|
6
|
+
pre-filled issue (word, top-5 rows with source+confidence, language,
|
|
7
|
+
engine version - no page text).
|
|
8
|
+
Depends on: the 2026-09-11 recommendation (real failure reports feed
|
|
9
|
+
plan 123's corpora; DeepSeek's environments-from-real-failures lesson)
|
|
10
|
+
|
|
11
|
+
## Problem
|
|
12
|
+
|
|
13
|
+
The playground is our only surface where real users meet real
|
|
14
|
+
suggestions, and when a suggestion is wrong the feedback evaporates.
|
|
15
|
+
Plan 123 synthesizes pairs; the higher-value stream is REAL wrong-
|
|
16
|
+
suggestion reports, and capturing them needs no backend: a GitHub
|
|
17
|
+
issue prefill carries the diagnostic.
|
|
18
|
+
|
|
19
|
+
## Fix
|
|
20
|
+
|
|
21
|
+
- Playground suggestion popover gains a small "report" affordance on
|
|
22
|
+
each row: opens github.com/kotoshu/kotoshu/issues/new?title=... with
|
|
23
|
+
a body template containing the word, the offered suggestions, the
|
|
24
|
+
language, the engine version, and (already public) tier info — no
|
|
25
|
+
page content, no user text beyond what the user chooses to add.
|
|
26
|
+
- The issue template lands in the gem repo (.github/ISSUE_TEMPLATE/
|
|
27
|
+
wrong-suggestion.md) so reports arrive structured; a triage note
|
|
28
|
+
points verified pairs at eval/corpora for the next reprice.
|
|
29
|
+
|
|
30
|
+
## Acceptance
|
|
31
|
+
|
|
32
|
+
- One click from a wrong suggestion to a structured, pre-filled issue.
|
|
33
|
+
- No PII beyond the single word the user is already looking at; the
|
|
34
|
+
template says so.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Plan 128 — The hybrid ship decision: price C-retrieve + fastText-rescore on the closed data blocker
|
|
2
|
+
|
|
3
|
+
Status: executed — VERDICT SHIP=True (models PR #34, 2026-09-12)
|
|
4
|
+
|
|
5
|
+
The full arc: frozen cbench rebuilt byte-faithfully (every sha256
|
|
6
|
+
reproduced; only the receipt wall-clock differed, reverted), c_typo_v2
|
|
7
|
+
retrained (0.481 MB, probe_hit5 0.410), pricing verdict per the
|
|
8
|
+
pre-declared rule: hybrid beats full on top-1 AND top-5 in all four
|
|
9
|
+
REAL components (en +6.3pp top5 CI [+4.9,+7.7] decisive; de +28.6,
|
|
10
|
+
ru +11.1, es +10.0), degrades nowhere, 25.8 MB int8 at ~3-4 ms.
|
|
11
|
+
Densified: on ~4,700 synth pairs/lang the hybrid evaluates essentially
|
|
12
|
+
all (top5 0.467-0.478) where full embeds only 69-85 pairs. Engine
|
|
13
|
+
productization = the follow-on plan (131).
|
|
14
|
+
Depends on: plan 123 (corpora shipped; the data blocker that parked
|
|
15
|
+
plan 115), plan 114 (the frozen C-benchmark + pre-declared verdict rule)
|
|
16
|
+
|
|
17
|
+
## Problem
|
|
18
|
+
|
|
19
|
+
Plan 115 priced the hybrid retrieval thread and parked on missing de/es
|
|
20
|
+
typo data. Plan 123 closed that blocker (5,000 dictionary-grounded
|
|
21
|
+
pairs each). The plan-114 artifacts (frozen cbench files, c_typo_v2
|
|
22
|
+
encoder) were gitignored and wiped in the September cleanup — but the
|
|
23
|
+
corpus is vendored, the builder and trainer are committed, and the
|
|
24
|
+
whole chain is deterministic. The verdict arc is executable end to end.
|
|
25
|
+
|
|
26
|
+
## Execution
|
|
27
|
+
|
|
28
|
+
1. Rebuild the frozen C-benchmark: `scripts/build_cbench.py` — the
|
|
29
|
+
receipt (eval/reports/cbench.frozen.json) carries per-file sha256s;
|
|
30
|
+
the rebuild must reproduce them byte for byte or the freeze is
|
|
31
|
+
broken and the run stops (integrity before evidence).
|
|
32
|
+
2. Retrain `c_typo_v2`: `scripts/train_typo_biencoder_v2.py` (char
|
|
33
|
+
bi-GRU, CPU, minutes; artifacts gitignored as before).
|
|
34
|
+
3. Price: `eval/hybrid_pricing_bench.py` over en/de/ru/es — the frozen
|
|
35
|
+
REAL components are the ship gate (unchanged), the plan-123 corpora
|
|
36
|
+
are additional labeled evidence for the de/es gap.
|
|
37
|
+
4. Verdict per the plan-114 pre-declared rule (wins on real, degrades
|
|
38
|
+
nowhere with n>=20) — ship, or reject on data like 114 did. Either
|
|
39
|
+
outcome closes the thread honestly.
|
|
40
|
+
|
|
41
|
+
## Acceptance
|
|
42
|
+
|
|
43
|
+
- The cbench rebuild reproduces every frozen sha256.
|
|
44
|
+
- The pricing report lands (eval/reports/hybrid-pricing.json refresh)
|
|
45
|
+
with real + synth components labeled, and the verdict is recorded in
|
|
46
|
+
the plan status with numbers.
|
|
47
|
+
- No frozen artifact changes; new evidence only.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Plan 129 — pt/fr synthetic corpora (plan 123 stretch targets)
|
|
2
|
+
|
|
3
|
+
Status: executed (models PR #34, 2026-09-12) — 5,000 pairs each,
|
|
4
|
+
same rule, tests at four languages; tier numbers in the refreshed
|
|
5
|
+
synth-corpus summary.
|
|
6
|
+
Depends on: plan 123 (the generator)
|
|
7
|
+
|
|
8
|
+
## Problem
|
|
9
|
+
|
|
10
|
+
Plan 123 shipped de/es; pt and fr were declared stretch targets. The
|
|
11
|
+
generator, tests, and bench all generalize by construction — extending
|
|
12
|
+
is a parameter, not new code.
|
|
13
|
+
|
|
14
|
+
## Fix
|
|
15
|
+
|
|
16
|
+
- Generate eval/corpora/synth/{pt,fr}.json at the same 5,000-pair
|
|
17
|
+
target with the same admission rule (pt: ABNT qwerty + accents; fr:
|
|
18
|
+
azerty alternates — both already in noise.py's layout registry).
|
|
19
|
+
- Extend the tier baseline bench + tests to the new languages.
|
|
20
|
+
|
|
21
|
+
## Acceptance
|
|
22
|
+
|
|
23
|
+
- Same invariants as 123, same test coverage, tier numbers recorded.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Plan 130 — News truth: the 1.0.1 patch and the 09-12 wave
|
|
2
|
+
|
|
3
|
+
Status: executed (site 6daa72d, 2026-09-12) — gem-1-0-1 and
|
|
4
|
+
evidence-2026-09 entries live; NewsKind widened with 'docs'.
|
|
5
|
+
Depends on: plans 119/121 (1.0.1 content), 123/125/126/127
|
|
6
|
+
|
|
7
|
+
## Problem
|
|
8
|
+
|
|
9
|
+
Two shipped changes have no news entries: gem 1.0.1 (embedded frozen
|
|
10
|
+
tiers, Jekyll sweep skip) and the 09-12 wave (corpora, error budgets,
|
|
11
|
+
the feedback loop, the docker image fix). The site's discipline is one
|
|
12
|
+
entry per user-visible change.
|
|
13
|
+
|
|
14
|
+
## Fix
|
|
15
|
+
|
|
16
|
+
- One entry for 1.0.1 (determinism by construction: cache-cold == warm
|
|
17
|
+
== frozen vectors).
|
|
18
|
+
- One entry for the wave: corpora + the 1.5% typo-embedding finding +
|
|
19
|
+
error-budget table + report-a-suggestion link.
|
|
20
|
+
|
|
21
|
+
## Acceptance
|
|
22
|
+
|
|
23
|
+
- Entries live, dates and version references truthful.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Plan 131 — Productize the hybrid: C-retrieve + fastText-rescore in the engines
|
|
2
|
+
|
|
3
|
+
Status: proposed (the decision evidence is complete; plan 128 verdict SHIP)
|
|
4
|
+
Depends on: plan 128 (verdict + artifacts), plan 113 (packs — the
|
|
5
|
+
delivery vehicle), registry v1.6.0 (typo-biencoder assets already opt-in)
|
|
6
|
+
|
|
7
|
+
## What ships
|
|
8
|
+
|
|
9
|
+
The hybrid becomes the opt-in "typo retrieval" layer, the same shape
|
|
10
|
+
as the semantic tier: per-language int8 C-matrix (25.8 MB) + the char
|
|
11
|
+
bi-encoder (0.48 MB) fetched from the registry, C-retrieve top-20 over
|
|
12
|
+
the vocabulary, fastText-rescore of the candidates, merged into the
|
|
13
|
+
suggestion pipeline ahead of frequency ranking.
|
|
14
|
+
|
|
15
|
+
## Surfaces
|
|
16
|
+
|
|
17
|
+
- kotoshu-rs: char-bi-encoder ONNX inference (the pure-Rust ONNX
|
|
18
|
+
reader already exists for the tiers), the retrieval+rescore path,
|
|
19
|
+
wasm surface (`loadTypo` + `typoSuggest`), KPK1 pack extension (the
|
|
20
|
+
C-matrix rides the pack for pack languages).
|
|
21
|
+
- gem: native-ext accelerated path where present; the merge into
|
|
22
|
+
Suggestions::Pipeline as a strategy (OCP: a new strategy class, no
|
|
23
|
+
pipeline surgery).
|
|
24
|
+
- Conformance: new vectors for the hybrid path are NOT frozen
|
|
25
|
+
initially (it is opt-in, tier-like, gated by eval not conformance —
|
|
26
|
+
the tier precedent).
|
|
27
|
+
- Registry: promote the typo-biencoder entries from opt-in to exposed;
|
|
28
|
+
server/playground/worker flips follow the semantic-tier pattern.
|
|
29
|
+
|
|
30
|
+
## Gates (pre-declared)
|
|
31
|
+
|
|
32
|
+
- The frozen real components + synth corpora re-run against the
|
|
33
|
+
SHIPPED engines must reproduce the PR-34 numbers within noise.
|
|
34
|
+
- Latency: per-suggest budget ≤ 10 ms amortized (the plan-112 gates
|
|
35
|
+
tighten for the shipped path).
|
|
36
|
+
- Degrades nowhere vs dictionary-only when disabled; zero behavior
|
|
37
|
+
change at default settings.
|
|
38
|
+
|
|
39
|
+
## Non-goals
|
|
40
|
+
|
|
41
|
+
- No retraining; the v2 artifacts are frozen (probe_hit5 0.410).
|
|
42
|
+
- No default-on: opt-in per language, like the semantic tier.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Plan 132 — The techniques page; professional prose across the site
|
|
2
|
+
|
|
3
|
+
Status: executed (2026-09-12, site push; this plan)
|
|
4
|
+
|
|
5
|
+
## What shipped
|
|
6
|
+
|
|
7
|
+
1. /docs/techniques — a complete catalog of the stack's techniques in
|
|
8
|
+
four groups (engines, models, delivery, reliability), each entry
|
|
9
|
+
naming the mechanism and its measured effect in full sentences.
|
|
10
|
+
Written as the site's first MDX page: @astrojs/mdx installed and
|
|
11
|
+
wired, DocsLayout applied through an imported component wrapper.
|
|
12
|
+
2. A professional rewrite of the published copy: 34 fragment-style
|
|
13
|
+
news titles became declarative sentences, and 69 fragment-stacked
|
|
14
|
+
summaries and senses across all 36 entries were rewritten as full
|
|
15
|
+
sentences with clear subjects. The worst patterns eliminated:
|
|
16
|
+
em-dash fragment leads ("What 1.0 freezes:"), colon-list openers
|
|
17
|
+
("Also in the patch:"), trailing fragment appends ("— no download,
|
|
18
|
+
no CI seeding"), and lowercase clause starts.
|
|
19
|
+
3. The docs pages received the same treatment where fragments
|
|
20
|
+
appeared: the performance error-budget section, the caching
|
|
21
|
+
language-packs section, and three headlines.
|
|
22
|
+
|
|
23
|
+
## Conventions established
|
|
24
|
+
|
|
25
|
+
- Text-heavy documentation pages are written in MDX, not .astro HTML.
|
|
26
|
+
- News titles are complete clauses; summaries and senses are full
|
|
27
|
+
sentences. Release titles use the "package X.Y.Z: description" form.
|