Files
hub/tasks/architecture/storage/fix-path-index-locale.md
glm-5.1 2b63cda1c7 Setup repo: migrate architecture specs, code stubs, and tasks from alkhub_ts
Copy architecture docs, ADRs, storage domain specs, research, reviews,
and 56 storage architecture tasks from the alkhub_ts monorepo. Adapt for
standalone @alkdev/hub repo structure (src/ not packages/hub/).

Sanitize all sensitive information:
- Replace private IPs (10.0.0.1) with localhost defaults
- Remove internal server hostnames (dev1, ns528096)
- Replace /workspace/ private paths with npm package references
- Remove hardcoded credentials from examples
- Rewrite infrastructure.md without private network details

Add Deno project scaffolding: deno.json (pinned deps), .gitignore,
AGENTS.md, entry point. Migrate existing code stubs (crypto, config
types, logger) with updated import paths.
2026-05-25 10:56:32 +00:00

35 lines
1.0 KiB
Markdown

---
id: fix-path-index-locale
name: Fix Path Index for LIKE Pattern Matching
status: completed
depends_on: []
scope: narrow
risk: low
impact: isolated
level: implementation
---
## Description
W17: `WHERE path LIKE 'implementation/%'` can use a B-tree index only with the `C` locale or `text_pattern_ops`. With the default locale, LIKE pattern matching may not use the index, causing sequential scans on the tasks table.
Specify that the `path` index should use `text_pattern_ops`: `CREATE INDEX idx_tasks_path ON tasks (path text_pattern_ops)`, or document the locale dependency.
## Acceptance Criteria
- [ ] `tasks.md` path index uses `text_pattern_ops` in the spec
- [ ] `table-reference.md` indexes section updated for `idx_tasks_path` with `text_pattern_ops`
- [ ] Note added about locale dependency (default locale vs C locale)
## References
- docs/reviews/storage-architecture-review-2026-04-21.md#W17
- docs/architecture/storage/tasks.md:83, :101
## Notes
> To be filled by implementation agent
## Summary
> To be filled on completion