Release a whole-file hold once the file is declared written into (hq ADR 0102)

This commit is contained in:
2026-09-22 18:33:45 +02:00
parent bd3fd17ad8
commit b4f3eaf11b
2 changed files with 30 additions and 0 deletions
+9
View File
@@ -235,6 +235,15 @@ func holdOnAdopted(ctx context.Context, sys system.System, r declaration.Resourc
}
}
// A file written into replaces nothing that was found, so it is never held (novox/hq ADR
// 0102) — and a hold from when it was declared whole must not keep the mesh's keys out.
if f, ok := r.(*declaration.File); ok && f.Into != "" {
if already {
known.Release(r.Identity())
}
return false, false, out, nil
}
module, untaken := d.Adoption.UntakenModuleOf(r.Identity())
if !untaken {
return false, false, out, nil