docs(04): commit plan-revision residue + 04-01 SUMMARY
This commit is contained in:
@@ -244,6 +244,7 @@ Lebuh → Lbh
|
|||||||
Simpang → Spg
|
Simpang → Spg
|
||||||
Kampung → Kg
|
Kampung → Kg
|
||||||
Kampong → Kg
|
Kampong → Kg
|
||||||
|
Kpg → Kampung
|
||||||
Taman → Tmn
|
Taman → Tmn
|
||||||
Bangunan → Bgn
|
Bangunan → Bgn
|
||||||
Bukit → Bkt
|
Bukit → Bkt
|
||||||
@@ -537,7 +538,7 @@ NO `exports`/`main` field — consumers import sub-paths directly (the `@arahara
|
|||||||
*/
|
*/
|
||||||
```
|
```
|
||||||
|
|
||||||
**`search/src/rules/abbreviations.ts`** — the vendored table as DATA, exactly per the `<abbreviation_table_contract>` block: a `ReadonlyArray<readonly [string, string]>` named `ABBREVIATION_ROWS` with all 47 rows listed there plus the explicit `Presint → Prsn` row, and an exported `buildAbbreviationMap(): Map<string, string[]>` that inverts the table once (abbreviation → full forms; full form → itself) — the canonical form is ALWAYS the long form. The header comment MUST cite the source:
|
**`search/src/rules/abbreviations.ts`** — the vendored table as DATA, exactly per the `<abbreviation_table_contract>` block: a `ReadonlyArray<readonly [string, string]>` named `ABBREVIATION_ROWS` with every row listed there (48 minimum rows, including `Kpg → Kampung` — required by the `"Kpg Ampang" → "kampung ampang"` normalizer vector) plus the explicit `Presint → Prsn` row, and an exported `buildAbbreviationMap(): Map<string, string[]>` that inverts the table once (abbreviation → full forms; full form → itself) — the canonical form is ALWAYS the long form. The header comment MUST cite the source:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -564,7 +564,7 @@ Otherwise describe which leg failed and the exact symptom. If no physical device
|
|||||||
<automated>cd /home/C-Fu/araharah && npm test -w bot 2>&1 | tail -3 && npm test -w web 2>&1 | tail -3 && npm run search:corpus 2>&1 | tail -5 && test -f .planning/phases/04-destination-search-kl-gazetteer/04-DEVICE-GATE.md && grep -c 'PASS\|FAIL\|UNVERIFIED' .planning/phases/04-destination-search-kl-gazetteer/04-DEVICE-GATE.md</automated>
|
<automated>cd /home/C-Fu/araharah && npm test -w bot 2>&1 | tail -3 && npm test -w web 2>&1 | tail -3 && npm run search:corpus 2>&1 | tail -5 && test -f .planning/phases/04-destination-search-kl-gazetteer/04-DEVICE-GATE.md && grep -c 'PASS\|FAIL\|UNVERIFIED' .planning/phases/04-destination-search-kl-gazetteer/04-DEVICE-GATE.md</automated>
|
||||||
</verify>
|
</verify>
|
||||||
<acceptance_criteria>
|
<acceptance_criteria>
|
||||||
- `npm test -w bot`, `npm test -w web`, and `npm run search:corpus` all exit 0 (the automated half is green BEFORE any device is touched)
|
- `npm test -w bot`, `npm test -w web` exit 0, and `npm run search:corpus` exits 0 (threshold met) OR exits 1 with the lever-2/3 outcome recorded in `docs/SEARCH-QUALITY.md` (the automated half is resolved BEFORE any device is touched)
|
||||||
- `test -f .planning/phases/04-destination-search-kl-gazetteer/04-DEVICE-GATE.md` exits 0
|
- `test -f .planning/phases/04-destination-search-kl-gazetteer/04-DEVICE-GATE.md` exits 0
|
||||||
- `grep -c 'PASS\|FAIL\|UNVERIFIED' .planning/phases/04-destination-search-kl-gazetteer/04-DEVICE-GATE.md | head -1` returns >= 6 (all six legs carry an explicit verdict)
|
- `grep -c 'PASS\|FAIL\|UNVERIFIED' .planning/phases/04-destination-search-kl-gazetteer/04-DEVICE-GATE.md | head -1` returns >= 6 (all six legs carry an explicit verdict)
|
||||||
- `grep -q 'Android' .planning/phases/04-destination-search-kl-gazetteer/04-DEVICE-GATE.md` exits 0 AND `grep -q 'iOS' .planning/phases/04-destination-search-kl-gazetteer/04-DEVICE-GATE.md` exits 0 AND `grep -q 'Desktop' .planning/phases/04-destination-search-kl-gazetteer/04-DEVICE-GATE.md` exits 0 AND `grep -q 'home screen' .planning/phases/04-destination-search-kl-gazetteer/04-DEVICE-GATE.md` exits 0 (the legs are recorded, not implied)
|
- `grep -q 'Android' .planning/phases/04-destination-search-kl-gazetteer/04-DEVICE-GATE.md` exits 0 AND `grep -q 'iOS' .planning/phases/04-destination-search-kl-gazetteer/04-DEVICE-GATE.md` exits 0 AND `grep -q 'Desktop' .planning/phases/04-destination-search-kl-gazetteer/04-DEVICE-GATE.md` exits 0 AND `grep -q 'home screen' .planning/phases/04-destination-search-kl-gazetteer/04-DEVICE-GATE.md` exits 0 (the legs are recorded, not implied)
|
||||||
@@ -607,7 +607,7 @@ Otherwise describe which leg failed and the exact symptom. If no physical device
|
|||||||
<verification>
|
<verification>
|
||||||
- `npm test -w web` green — including the 11 destination-preload cases, the 9 home-screen cases, BA1-BA8, and the extended no-storage gate
|
- `npm test -w web` green — including the 11 destination-preload cases, the 9 home-screen cases, BA1-BA8, and the extended no-storage gate
|
||||||
- `npm test -w bot` green (unaffected by this plan, but the deep-link contract's other half)
|
- `npm test -w bot` green (unaffected by this plan, but the deep-link contract's other half)
|
||||||
- `npm run search:corpus` green (the shared module both sides depend on)
|
- `npm run search:corpus` resolved (exit 0, or the lever-2/3 close recorded per D-14) — the shared module both sides depend on
|
||||||
- `npm run build -w theme && npm run build -w web` green from a fresh clone
|
- `npm run build -w theme && npm run build -w web` green from a fresh clone
|
||||||
- `npm run capture -w web` exits 0 with 8 non-blank captures, including `shell-dest-preload.png` whose leg verified `state=resolved` AND the rendered card text `Suria KLCC` specifically
|
- `npm run capture -w web` exits 0 with 8 non-blank captures, including `shell-dest-preload.png` whose leg verified `state=resolved` AND the rendered card text `Suria KLCC` specifically
|
||||||
- `grep -rl 'suria-klcc' web/dist/assets/*.js` succeeds (the gazetteer ships in the bundle) AND the same grep over `web/dist/assets/*.js` for `createHmac|crypto.subtle|sha256` returns NOTHING (no crypto in the shipped bundle)
|
- `grep -rl 'suria-klcc' web/dist/assets/*.js` succeeds (the gazetteer ships in the bundle) AND the same grep over `web/dist/assets/*.js` for `createHmac|crypto.subtle|sha256` returns NOTHING (no crypto in the shipped bundle)
|
||||||
|
|||||||
@@ -4,6 +4,25 @@
|
|||||||
**Files analyzed:** 30 new/modified surfaces (grouped into 18 rows below)
|
**Files analyzed:** 30 new/modified surfaces (grouped into 18 rows below)
|
||||||
**Analogs found:** 16 / 18 rows matched (2 rows are genuinely new: repo-level LICENSE + ODbL data notice)
|
**Analogs found:** 16 / 18 rows matched (2 rows are genuinely new: repo-level LICENSE + ODbL data notice)
|
||||||
|
|
||||||
|
> **PATH RECONCILIATION (2026-10-23, plan-phase revision).** This map was written BEFORE the
|
||||||
|
> phase plans fixed the file layout. The ANALOGS below are all still correct and are cited by
|
||||||
|
> the plans; only the NAMES of the new files changed. The plans are authoritative. Mapping:
|
||||||
|
>
|
||||||
|
> | Pre-planning path in this map | Realized path (per plans 04-01…04-04) |
|
||||||
|
> |---|---|
|
||||||
|
> | `shared/` workspace pkg | the `search/` workspace pkg (`@araharah/search`) |
|
||||||
|
> | `shared/src/types.ts` / `rules.ts` / `normalize.ts` / `distance.ts` / `score.ts` | `search/src/types.ts` / `rules/abbreviations.ts` / `normalize.ts` / `distance.ts` / `score.ts` |
|
||||||
|
> | `bot/src/search/source.ts` (SearchSource impl) | `search/src/source.ts` (+ `search/src/gazetteer.ts` loader, `search/src/index.ts` public API) |
|
||||||
|
> | `shared/data/kl-gazetteer.json` | `search/src/data/kl-gazetteer.json` |
|
||||||
|
> | `shared/data/golden-corpus.json` | `search/test/fixtures/golden-corpus.json` |
|
||||||
|
> | `shared/data/NOTICE.md` (ODbL) | `LICENSES.md` (repo root) |
|
||||||
|
> | `bot/scripts/gazetteer-topup.mjs` | `search/scripts/overpass-topup.mjs` |
|
||||||
|
> | `bot/scripts/gazetteer-corpus.mjs` | `search/scripts/gazetteer-corpus.mjs` |
|
||||||
|
> | `bot/scripts/gazetteer-to-sqlite.mjs` | `search/scripts/json-to-sqlite.mjs` |
|
||||||
|
> | `web/src/search/destination.ts` | `web/src/search/resolve-destination.ts` (+ `web/src/search/destination-card.ts`) |
|
||||||
|
> | `web/src/pwa/homescreen.ts` | `web/src/telegram/homescreen.ts` |
|
||||||
|
> | `web/test/destination.test.mjs` | `web/test/destination-preload.test.mjs` |
|
||||||
|
|
||||||
## File Classification
|
## File Classification
|
||||||
|
|
||||||
| New/Modified File | Role | Data Flow | Closest Analog | Match Quality |
|
| New/Modified File | Role | Data Flow | Closest Analog | Match Quality |
|
||||||
|
|||||||
Reference in New Issue
Block a user