Unify trunk on main: initialization → main #3

Merged
jschoubben merged 58 commits from initialization into main 2026-09-05 01:13:33 +00:00
Showing only changes of commit d81f826089 - Show all commits
@@ -0,0 +1,33 @@
package declaration
import (
"os"
"testing"
)
// The control plane's actual output, put through the host's actual parser.
//
// Skipped unless MESH_EMITTED names a file, so this is a check somebody runs deliberately rather
// than a dependency between two repositories. It exists because "the host needs no new
// vocabulary" is the load-bearing claim of every computed and contributed resource, and the only
// honest way to know it is to hand the host one and see.
func TestWhatTheControlPlaneEmittedIsSomethingThisHostAccepts(t *testing.T) {
path := os.Getenv("MESH_EMITTED")
if path == "" {
t.Skip("set MESH_EMITTED to a declaration the control plane produced")
}
raw, err := os.ReadFile(path)
if err != nil {
t.Fatal(err)
}
d, err := Parse(raw)
if err != nil {
t.Fatalf("the host refuses what the control plane sends:\n%v", err)
}
if len(d.Resources) == 0 {
t.Fatal("parsed, and empty")
}
for _, r := range d.Resources {
t.Logf("accepted %s %s → %s", r.Kind(), r.Identity(), r.Target())
}
}