carlos / platform Public

ha: inventory ingress alias name producers

Pin routing-only alias derivation and projection methods alongside existing route producers. Cover projection discovery and document the preserved name classes.
Co-Authored-By: GPT-6 Astra <noreply@openai.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev e96fe63f2fc205319a4e88d6f8dd36f1adb596db parent c40ecad
1 file changed, +34 −5
  • internal/host/group_names_test.go +34 −5
diff --git a/internal/host/group_names_test.go b/internal/host/group_names_test.go
index 0cdecc6c8..e2dfa70d0 100644
--- a/internal/host/group_names_test.go
+++ b/internal/host/group_names_test.go
@@ -289,7 +289,16 @@ func groupNameProducers(t *testing.T, body []byte) map[string]string {
if !ok || fn.Body == nil {
continue
}
- produces := fn.Name.Name == "PlatformAliasFold" || fn.Name.Name == "deriveInstanceAliases" || fn.Name.Name == "deriveRegional"
+ produces := fn.Name.Name == "PlatformAliasFold" || fn.Name.Name == "deriveInstanceAliases" || fn.Name.Name == "deriveRegional" || fn.Name.Name == "deriveHAIngressAliases"
+ if fn.Recv != nil {
+ var recv bytes.Buffer
+ if err := format.Node(&recv, fs, fn.Recv.List[0].Type); err != nil {
+ t.Fatal(err)
+ }
+ if recv.String() == "*haIngressProjection" {
+ produces = true
+ }
+ }
ast.Inspect(fn.Body, func(n ast.Node) bool {
switch n := n.(type) {
case *ast.CallExpr:
@@ -354,6 +363,13 @@ func unrelated() { println("before") }
if len(added) != len(original)+1 {
t.Error("new name producer escaped inventory")
}
+ projected := groupNameProducers(t, []byte(`package fixture
+func deriveHAIngressAliases(c Claim, rep *AliasReport) { rep.AliasIngress[c.Host] = rep.HAIngressRoutes[c.Route] }
+func (p *haIngressProjection) publishAliases(names map[string]Route) { p.aliases.Store(&names) }
+`))
+ if len(projected) != 2 {
+ t.Fatalf("routing-only alias producers escaped inventory: %v", projected)
+ }
}
// Demo claims retain exact-route names. RouteFor changes only hold/seed gate
@@ -374,12 +390,25 @@ func unrelated() { println("before") }
// - foldRegional preserves the regional claim and marks exact-route conflicts.
// - edgesFileWriteClaims omits local hosts outside the configured pool; it
// does not publish forwarding-only ingress as home.
+// - deriveHAIngressAliases projects plain aliases and delegated catchalls
+// from accepted claims. Exact names win; pending and instance catchalls
+// are excluded. HAIngressRoutesFromRecords also rejects duplicate hosts.
+// - haIngressProjection publishes exact, alias and regional names in memory.
+// Incomplete evidence retains refusal names; lookup binds aliases to the
+// primary's owner, pool, region and lifetime. No local route is created.
//
-// Existing ingress and regional tests cover routing and refusal of these names.
+// TestHAIngressNamesWithoutLocalRow, TestHAIngressAliasBinding and
+// TestHAIngressStartupNames exercise these existing name classes end to end.
var groupNameProducerInventory = map[string]string{
- "../provision/haingress.go:HAIngressRoutesFromRecords": "522ceaf7e1f57dabe02b0d6cfbd939ba73ec8826cb804506867e5120a346968e",
+ "../domains/aliases.go:deriveHAIngressAliases": "1270bb264188aa12930ace74cf721d71b801fa43efd7bee6ebf7eab3f71eb7f1",
+ "haingress.go:*haIngressProjection.lookup": "cfbab465600f42e2da5fd03bfe2a4f229d449bc00b541dc160d5debbaf6db8d0",
+ "haingress.go:*haIngressProjection.publishRegional": "31d169e6829b1de0b731f8e11f27fa80635e7b6355f16d7402ad069dde437ab5",
+ "haingress.go:*haIngressProjection.publish": "060b22fd87d0a20f7d3c4b58838139f9b2b86d9da19d7d31dc29152eb31e9132",
+ "haingress.go:*haIngressProjection.publishAliases": "c577688de88de5f13faf189eff94e291075bafb52ca653c70c7b897749ca3482",
+
+ "../provision/haingress.go:HAIngressRoutesFromRecords": "80cdbb149864a109442501ae3a2e4d605cb468502602e67a3308edfaf9b02fbc",
"../provision/demo_claim_seed.go:abortDemoClaimSeed": "e010b4e6b026a0744b7eacf6ffdb09647de6e1541e33ce73e71e7c99964a9f7a",
- "../domains/aliases.go:ReconcileAliasesReport": "4dc373672420c2d6b533bb4b5d1e442d1b0423b8af24db1cd48b89b1388ec5d2",
+ "../domains/aliases.go:ReconcileAliasesReport": "845b0a1b0c3ddd5a161a5ba5fae1e4bad3c80a9be2079e4ee3de67078af54ee1",
"../domains/aliases.go:deriveInstanceAliases": "47b40b392927d9c50cab6c350083af24565e4e148cd1b5ddc257e9803153c0c2",
"../domains/aliases.go:deriveRegional": "79fd7c432e6b0a9ffd945312851e52af2c450769416ef44ff9a4bea681b44cde",
"../domains/reconcile.go:Reconcile": "8b2848535d0a15117d578ac28c7486997c6ad8960b58b6dca5d4b35cde14eed0",
@@ -393,7 +422,7 @@ var groupNameProducerInventory = map[string]string{
"../edge/platformalias.go:PlatformAliasFold": "a18e4963cf88320ef3fb94b666b02838dc12cc3e9b2df3f2cbe2576ca682735f",
"../edge/regional.go:*Edge.foldRegional": "2c52d0d9147ab4b426649a78573a8550e0ba1073e2f5e5ef10e894f2570e9a8d",
"../provision/forward.go:forwardRowFor": "e7294d6a3c96e51646257200f5cedb26aaf491afea23be3d943b3e3f742c4db4",
- "../provision/reconcile.go:Reconcile": "f50138e764b8b8b9af30751a51e187a2a667a1bf2a3ba75cd0b30252bbd6c62e",
+ "../provision/reconcile.go:Reconcile": "b2bc85f6ea8218fe4114a2847c7f4b828daa28181562f104bd5023179c03b9d0",
"../provision/reconcile.go:RouteFor": "304e92d9123c1cc7d756319756c4311ee235266cd6b2290f058c91e45fbe0cc1",
"../provision/reconcile.go:mintHeld": "9fe4ad876c727af36cc06bd0105baf344748c61e6f21ced48e5288a323851344",
"../provision/seedreconcile.go:purgeAbortedFromLocal": "889e93e6fbd74adf614ba184bcd2f554196eccc4506829c65326a3502e98d89a",