tasks: add drift sync tasks to align source with architecture specs

This commit is contained in:
2026-05-29 10:41:15 +00:00
parent 62f8da8ec4
commit 2b0badd501
9 changed files with 418 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
---
id: drift/any-to-unknown
name: Replace Type.Any() with Type.Unknown() across all source files
status: pending
depends_on: []
scope: narrow
risk: trivial
impact: component
level: implementation
---
## Description
The architecture spec (metagraph-module.md, ADR-012) mandates `Type.Unknown()` as the canonical choice for "no validation applied" fields, not `Type.Any()`. Both produce `{}` in JSON Schema, but `Type.Unknown()` explicitly communicates intent. There are 6 locations in the source that use `Type.Any()` where the spec says `Type.Unknown()`.
This is a mechanical find-and-replace with no behavioral change — `Type.Any()` and `Type.Unknown()` produce identical JSON Schema output (`{}`).
## Acceptance Criteria
- [ ] `src/graphs/types.ts`: `metadata` fields in `BaseNodeAttributes` and `BaseEdgeAttributes` use `Type.Unknown()` instead of `Type.Any()`
- [ ] `src/graphs/types.ts`: `schema` fields in `NodeType` and `EdgeType` use `Type.Unknown()` instead of `Type.Any()`
- [ ] `src/sqlite/tables/nodes.ts`: `AttributesSchema` uses `Type.Record(Type.String(), Type.Unknown())` instead of `Type.Any()`
- [ ] `src/sqlite/tables/edges.ts`: `AttributesSchema` uses `Type.Record(Type.String(), Type.Unknown())` instead of `Type.Any()`
- [ ] `deno check mod.ts src/graphs/mod.ts src/sqlite/mod.ts` passes with no errors
- [ ] No remaining `Type.Any()` calls in `src/` (verified via grep)
## References
- docs/architecture/metagraph-module.md — "Type.Unknown() is canonical"
- docs/architecture/decisions/012-node-edge-attributes-as-module-entries.md
## Notes
> To be filled by implementation agent
## Summary
> To be filled on completion