docs(04): plan revision 1 — fix wave-1 bundle proof + acceptance-criteria corrections

This commit is contained in:
araharah-executor
2026-10-24 00:02:27 +08:00
parent c0134c7e99
commit 4a83ec6871
5 changed files with 62 additions and 43 deletions
@@ -42,16 +42,16 @@ updated: 2026-10-23
|---------|------|------|-------------|------------|-----------------|-----------|-------------------|-------------|--------|
| 04-01-T1 (workspace + types + JUPEM table + normalizer) | 01 | 1 | SRCH-02, D-09 | T-04-01/02/08 | no logging/storage in the module; table is DATA; symmetric normalization | unit | `npm run search:test` | ❌ W0 | ⬜ pending |
| 04-01-T2 (OSA distance + tiered scorer) | 01 | 1 | SRCH-02 | T-04-03/05 | min-length guard; disjoint tiers; fuzzy admission ≥ 0.72 | unit | `npm run search:test` | ❌ W0 | ⬜ pending |
| 04-01-T3 (gazetteer + loader + source + LICENSE/ODbL) | 01 | 1 | SRCH-01, D-04/06/07/15 | T-04-04/06/07/09/11 | honest refusal (`[]`); dataset invariants; GPL+ODbL notices; lazy index; 3-environment inline proof | unit + bundle | `npm run search:test` + `npx wrangler deploy --dry-run` (in `bot/`) | ❌ W0 | ⬜ pending |
| 04-01-T3 (gazetteer + loader + source + LICENSE/ODbL) | 01 | 1 | SRCH-01, D-04/06/07/15 | T-04-04/06/07/09/11 | honest refusal (`[]`); dataset invariants; GPL+ODbL notices; lazy index; 3-environment loader proof (esbuild search-module bundle marker at wave 1; wrangler dry-run = exit-0 build guard) | unit + bundle | `npm run search:test` + `node_modules/.bin/esbuild search/src/index.ts --bundle` marker grep + `npx wrangler deploy --dry-run` exit 0 (in `bot/`) | ❌ W0 | ⬜ pending |
| 04-02-T1 (golden corpus + D-14 runner + Nyquist gate) | 02 | 2 | SRCH-01/02, D-13/14 | T-04-12/13/19 | pinned corpus; threshold 0.9 un-editable; zero negative leaks | corpus | `npm run search:corpus` + `npm run search:test` | ❌ W0 | ⬜ pending |
| 04-02-T2 (Overpass top-up + JSON→SQLite converter) | 02 | 2 | D-05/06 | T-04-14/15/16/17/20 | repo tools never runtime deps; UA mandatory; soft-exit on busy; id set preserved | fixture-driven | `npm run search:test` | ❌ W0 | ⬜ pending |
| 04-02-T3 (bake-off close + SEARCH-QUALITY.md + coord verification) | 02 | 2 | D-14 | T-04-13 | measured, recorded, honest decision; one named lever | record | `npm run search:corpus` | ❌ | ⬜ pending |
| 04-03-T1 (/cari + venue card + OPEN deep link + MINI_APP_URL) | 03 | 2 | SRCH-03, D-01/02/10/11/15 | T-04-21/22/24/30 | 128-char cap; category-only logs; configured origin | source-gate + typecheck | `npm run bot:typecheck` + `npm test -w bot` | ❌ W0 | ⬜ pending |
| 04-03-T2 (alternates callback handler + bot factory wiring) | 03 | 2 | SRCH-03, D-02 | T-04-23/27/28 | id validated before lookup; every callback answered; no editMessageText | integration | `npm test -w bot` | ❌ W0 | ⬜ pending |
| 04-03-T2 (alternates callback handler + bot factory wiring) | 03 | 2 | SRCH-03, D-02 | T-04-23/27/28 | id validated before lookup; every callback answered; no editMessageText; Worker-bundle marker grep (deferred from 04-01-T3 — `bot.ts` now imports the source) | integration | `npm test -w bot` + `npx wrangler deploy --dry-run` marker grep (in `bot/`) | ❌ W0 | ⬜ pending |
| 04-03-T3 (commands.test.mjs landmines + cari.test.mjs gates) | 03 | 2 | SRCH-03, D-11/15 | T-04-25/26/29 | no crypto in deep-link path; no-match refusal honest; no query in logs | gates | `npm test -w bot` | ❌ W0 | ⬜ pending |
| 04-04-T1 (two-carrier destination resolver + mock + strings) | 04 | 3 | ONBD-02, D-11 | T-04-32/33/34/35 | both carriers one validation; honest null; memory-only; no crypto | unit | `npm test -w web` | ❌ W0 | ⬜ pending |
| 04-04-T2 (ONBD-03 hooks + boot wiring + `?dest=` profile) | 04 | 3 | ONBD-03, D-12 | T-04-36/37/38 | Bot API 8.0 guard; "unknown" ≠ error; no browser install APIs | unit | `npm test -w web` | ❌ W0 | ⬜ pending |
| 04-04-T3 (BA7/BA8 drift gates + destination-preload capture) | 04 | 3 | ONBD-02 | T-04-39/40/41/42 | gazetteer inlined in bundle; no crypto shipped; capture asserts state=resolved + card text | integration + capture | `npm test -w web` + `npm run web:capture` | ✅ extend | ⬜ pending |
| 04-04-T3 (BA7/BA8 drift gates + destination-preload capture) | 04 | 3 | ONBD-02 | T-04-39/40/41/42 | gazetteer inlined in bundle; no crypto shipped; capture asserts state=resolved + card text | integration + capture | `npm test -w web` + `npm run capture -w web` | ✅ extend | ⬜ pending |
| 04-04-T4 (device gate — BLOCKING checkpoint) | 04 | 3 | ONBD-02/03 | — | real-device deep-link + home-screen verification; honest UNVERIFIED if no device | manual (checkpoint) | automated half: `npm test -w bot && npm test -w web && npm run search:corpus` | ❌ exit gate | ⬜ pending |
*Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky*
@@ -67,7 +67,7 @@ All new this phase (the repo has no search infrastructure today). The owning tas
- [ ] `search/test/distance.test.mjs` — hand-computed OSA vectors (04-01-T2)
- [ ] `search/test/score.test.mjs` — tier disjointness, min-length guard, exact-outranks-fuzzy, admission boundary (04-01-T2)
- [ ] `search/test/gazetteer.test.mjs` — entry schema, unique slug ids, KL bbox, ODbL header, LICENSE presence, no-logging/no-storage, lazy loader (04-01-T3)
- [ ] `search/test/loader-env.test.mjs` — bare-Node import + static-import assertion + `wrangler deploy --dry-run` bundle marker (04-01-T3)
- [ ] `search/test/loader-env.test.mjs` — bare-Node import + static-import assertion + esbuild search-module bundle marker (`suria-klcc`); the `wrangler deploy --dry-run` Worker-bundle marker grep lands in 04-03-T2 once `bot.ts` imports the source (04-01-T3 + 04-03-T2)
- [ ] `search/test/fixtures/golden-corpus.json` — the pinned D-13 corpus, 60+ hand-written cases (04-02-T1)
- [ ] `search/scripts/gazetteer-corpus.mjs` + `search/test/corpus.test.mjs` — the D-14 runner and its in-suite Nyquist gate (04-02-T1)
- [ ] `search/scripts/overpass-topup.mjs` + `search/test/topup.test.mjs` + `search/test/fixtures/overpass-response.json` — the D-06 tool, proven offline (04-02-T2)