Description
Deterministic Edge Generation extracts and normalizes join keys, resolves them against another Dotabase, and creates typed edges for exact unambiguous matches.
A binding defines where a token comes from, how it is normalized, which Dotabase is searched, and which edge type represents the match. The behavior evaluates that recipe without a model, gathers eligible targets, and emits an effect only when resolution is unique. Persistence then goes through the row service, preserving tenant scope, provenance, and edge deduplication.
Selling Points
- Creates evidence-based edges without an LLM.
- Supports path, SHA, slug, regex, and comparison rules.
- Emits nothing when a target is missing or ambiguous.
- Makes repeatable joins auditable through their declared rule and evidence.
- Avoids spending inference budget on identifiers with exact semantics.
User Story
As an engineering lead, I link a finding to the exact commit or file referenced in its structured metadata. I configure a rule that reads the trusted identifier property, normalizes it, and searches the authoritative target Dotabase. When the behavior finds exactly one match, it proposes the configured edge; if zero or several records match, it stops. I walk away with graph links whose origin can be explained from source data.
Extension Surface
Configurable: each Dotabase can declare rules, target databases, match modes, normalizers, and edge verbs.
packages/dotabases/src/behaviors/deterministic-edge/index.ts parses this rule surface, while packages/dotabases/src/behaviors/configurable-edge-type.ts constrains the edge contract. Owners compose supported rules; they cannot inject an arbitrary resolver into the behavior.
Capabilities & Limits
- Capability: Executes the scoped workflow described above through the cited live implementation paths.
- Capability: Preserves typed validation and applicable tenant, schema, lifecycle, or service boundaries.
- Limit: Rules require at least one resolvable token and another Dotabase target. Ambiguous joins deliberately fail closed. The behavior supports exact, regex-derived, path, slug, SHA, and comparison-oriented evidence within its declared modes. It can create stable links repeatedly without duplicating them. It cannot decide semantic equivalence, cross an unavailable target, or choose among ambiguous matches. Incorrect source metadata will still produce an incorrect exact match.
Implementation Map
packages/dotabases/src/behaviors/deterministic-edge/index.tspackages/dotabases/src/behaviors/configurable-edge-type.tspackages/dotabases/src/services/dotabase-row-service.ts