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.
1.4 KiB
1.4 KiB
id, name, status, depends_on, scope, risk, impact, level
| id | name | status | depends_on | scope | risk | impact | level |
|---|---|---|---|---|---|---|---|
| specify-client-config-validation | Specify client config validation timing and schema evolution | completed | narrow | high | component | implementation |
Description
"Validated against the TypeBox schema for this type on write" in services.md:19 is ambiguous:
- Who validates? Drizzle insert schema? API handler? DB trigger? Direct SQL bypasses application validation.
- Schema evolution: when code deployment changes a client type's TypeBox schema, existing DB rows may become invalid.
- No re-validation on read is documented.
Acceptance Criteria
services.mdspecifies: "validate on write (API handler layer) + warn on read (start-up validation pass with logging, not blocking)"- Schema evolution contract is documented: new fields MUST be
Type.Optional(); breaking changes MUST use a new clienttypestring (e.g.,llm-provider-v2) - Whether a
configSchemaVersioninmetadatais needed is decided and documented - The validation chain is explicit: API handler validates → Drizzle insert → DB stores; direct SQL bypass noted as risk
References
- docs/reviews/storage-architecture-review-2026-04-21.md#C12
- docs/architecture/storage/services.md:19
- docs/decisions/ADR-007
- docs/architecture/storage/README.md Open Question #10
Notes
To be filled by implementation agent
Summary
To be filled on completion