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.
This commit is contained in:
35
tasks/architecture/storage/fix-path-index-locale.md
Normal file
35
tasks/architecture/storage/fix-path-index-locale.md
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
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
|
||||
Reference in New Issue
Block a user