tasks: add drift sync tasks to align source with architecture specs
This commit is contained in:
38
tasks/drift/any-to-unknown.md
Normal file
38
tasks/drift/any-to-unknown.md
Normal 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
|
||||
Reference in New Issue
Block a user