Files
storage/tasks/drift/any-to-unknown.md

1.6 KiB

id, name, status, depends_on, scope, risk, impact, level
id name status depends_on scope risk impact level
drift/any-to-unknown Replace Type.Any() with Type.Unknown() across all source files pending
narrow trivial component 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