Files
hub/tasks/architecture/storage/add-missing-indexes-identity.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

1.5 KiB

id, name, status, depends_on, scope, risk, impact, level
id name status depends_on scope risk impact level
add-missing-indexes-identity Add Missing Indexes — Identity & Project Domain completed
narrow low component implementation

Description

W03 (partial): Add missing indexes for the identity and project domain tables. Also remove the redundant index identified in the review.

Missing indexes:

  • projects: idx_projects_org_id on (orgId) — find projects for an org
  • workspaces: idx_workspaces_project_id on (projectId) — find workspaces for a project
  • spokes: idx_spokes_name on (name) — look up spoke by name

Redundant index to remove:

  • api_keys: idx_api_keys_key_hash is redundant with unq_api_keys_key_hash (UNIQUE constraint auto-creates an index)

Acceptance Criteria

  • table-reference.md indexes section includes idx_projects_org_id, idx_workspaces_project_id, idx_spokes_name
  • Per-domain docs (projects.md, spokes.md) reference the new indexes
  • idx_api_keys_key_hash removed from table-reference.md with a note that UNIQUE constraint covers it
  • All new indexes have documented purpose (query pattern)

References

  • docs/reviews/storage-architecture-review-2026-04-21.md#W03
  • docs/architecture/storage/table-reference.md:87-145
  • docs/architecture/storage/identity.md
  • docs/architecture/storage/projects.md
  • docs/architecture/storage/spokes.md

Notes

To be filled by implementation agent

Summary

To be filled on completion