Replace generic resolution recording with intent methods

This commit is contained in:
2026-10-27 15:12:38 +00:00
parent eafbd32489
commit 9833ca3aa3
30 changed files with 124 additions and 63 deletions

View File

@@ -259,10 +259,19 @@ func (r *Resolution) Source(id string) (SourceInfo, bool) {
return fromEngineSourceInfo(value), ok
}
// Record declares the intent for a resolver mutation. A container path covers
// mutations to its descendants.
func (r *Resolution) Record(path Path, kind ChangeKind, reason string, dependencies ...Path) {
r.engineContext().Record(toEnginePath(path), engine.ChangeKind(kind), reason, toEnginePaths(dependencies)...)
// RecordDerivedDefault records a derived-default intent for a resolver mutation
// already performed by application code. A container path covers mutations to
// its descendants. This does not assign a value or suppress work for explicit
// input.
func (r *Resolution) RecordDerivedDefault(path Path, reason string, dependencies ...Path) {
r.engineContext().RecordDerivedDefault(toEnginePath(path), reason, toEnginePaths(dependencies)...)
}
// RecordNormalization records a normalization intent for a resolver mutation
// already performed by application code. A container path covers mutations to
// its descendants. This does not assign a value.
func (r *Resolution) RecordNormalization(path Path, reason string, dependencies ...Path) {
r.engineContext().RecordNormalization(toEnginePath(path), reason, toEnginePaths(dependencies)...)
}
// Error reports a safe, value-free resolution error at path.