[agent/codex:gpt-5.4-mini] Read docs/RFC.md fully. Find ONE feature described in the sp... #52

Merged
Virgil merged 1 commit from main into dev 2026-04-03 21:49:45 +00:00
2 changed files with 39 additions and 1 deletions

View file

@ -662,7 +662,10 @@ func (service *Service) ResolveAll(name string) (ResolveAllResult, bool) {
if !ok {
if normalizeName(name) == service.ZoneApex() && service.ZoneApex() != "" {
return ResolveAllResult{
NS: []string{"ns." + service.ZoneApex()},
A: []string{},
AAAA: []string{},
TXT: []string{},
NS: []string{"ns." + service.ZoneApex()},
}, true
}
return ResolveAllResult{

View file

@ -1535,6 +1535,41 @@ func TestServiceResolveAllSynthesizesNSForDerivedZoneApex(t *testing.T) {
}
}
func TestServiceResolveAllReturnsStableShapeForDerivedZoneApex(t *testing.T) {
service := NewService(ServiceOptions{
Records: map[string]NameRecords{
"gateway.charon.lthn": {
A: []string{"10.10.10.10"},
},
"node.charon.lthn": {
AAAA: []string{"2600:1f1c:7f0:4f01::2"},
},
},
})
result, ok := service.ResolveAll("charon.lthn")
if !ok {
t.Fatal("expected derived zone apex to resolve")
}
if result.A == nil || result.AAAA == nil || result.TXT == nil || result.NS == nil {
t.Fatalf("expected stable slice fields for derived apex, got %#v", result)
}
if len(result.A) != 0 || len(result.AAAA) != 0 || len(result.TXT) != 0 {
t.Fatalf("expected empty value arrays for derived apex, got %#v", result)
}
if len(result.NS) != 1 || result.NS[0] != "ns.charon.lthn" {
t.Fatalf("expected synthesized apex NS, got %#v", result.NS)
}
raw, err := json.Marshal(result)
if err != nil {
t.Fatalf("expected derived apex payload to marshal: %v", err)
}
if string(raw) != `{"a":[],"aaaa":[],"txt":[],"ns":["ns.charon.lthn"]}` {
t.Fatalf("expected stable JSON shape for derived apex, got %s", raw)
}
}
func TestServiceResolveAllReturnsEmptyArraysForMissingRecordValues(t *testing.T) {
service := NewService(ServiceOptions{
Records: map[string]NameRecords{