From 91a5b086b7756de5578484ce3a13c2d59bbbfd3f Mon Sep 17 00:00:00 2001 From: reoring Date: Mon, 9 Nov 2026 10:48:25 +0900 Subject: [PATCH] fix: adopt project IAM access from appserver-go v0.3.0 --- README.md | 6 +++--- cmd/server/internal/api/api_test.go | 6 ++---- cmd/server/server_test.go | 6 ++---- go.mod | 2 +- go.sum | 4 ++-- 5 files changed, 10 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 4b34417..5714fee 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Imported from `appthrust/platform` commit - Shared frontend fixture paths point into `cmd/server/internal/domain/testdata`. The old platform-only Dockerfile is replaced by the root standalone Dockerfile. -The public Go SDK is `github.com/appthrust/appserver-go v0.2.0`; no platform checkout, +The public Go SDK is `github.com/appthrust/appserver-go v0.3.0`; no platform checkout, module replacement, or private Go credential is required. The launcher and i18n packages use the published `^0.1.0` GitHub Packages versions rather than workspace packages. Tailwind scans the installed launcher package for its classes. @@ -90,8 +90,8 @@ or committed files. `ApplicationStackDefinition/tool-builder` in `appthrust-ink-pmc001` on 2026-11-06, excluding cluster-owned metadata. The served compatibility floor is `0.1.0`, stream `0.1`, with its original immutable `ghcr.io/appthrust/platform/tool-builder` -image. The next release is **`0.2.0`**, stream **`0.2`**. No speculative new-version -image is committed. +image. The next release is **`0.3.0`**, stream **`0.3`**, using Project IAM access +from appserver-go v0.3.0. No speculative new-version image is committed. After the release prerequisites are available, push a SemVer tag such as `v0.2.0`. The tag workflow: diff --git a/cmd/server/internal/api/api_test.go b/cmd/server/internal/api/api_test.go index 241dd6a..ee1d54d 100644 --- a/cmd/server/internal/api/api_test.go +++ b/cmd/server/internal/api/api_test.go @@ -59,14 +59,12 @@ func newTestAPI(t *testing.T, db *store.Store, eng Engine, issuer *testutil.OIDC } w.Header().Set("Content-Type", "application/json") switch r.URL.Path { - case "/api/v1/projects/pj-test": - _ = json.NewEncoder(w).Encode(map[string]any{"teamSlug": "test"}) - case "/api/v1/teams": + case "/api/v1/projects/pj-test/access": role := "Viewer" if admin { role = "Admin" } - _ = json.NewEncoder(w).Encode(map[string]any{"items": []any{map[string]any{"id": "team", "slug": "test", "role": role}}}) + _ = json.NewEncoder(w).Encode(map[string]any{"projectId": "pj-test", "member": true, "role": role, "platformRoles": []string{}}) case "/api/v1/projects/pj-test/app-installations/tool-builder": _, _ = w.Write([]byte(`{"id":"tool-builder","stackId":"adopted-tool-stack","links":[{"definitionId":"knowledge","state":"Absent"},{"definitionId":"builder-console","state":"Installing"}]}`)) case "/api/v1/projects/pj-test/components/orders-db": diff --git a/cmd/server/server_test.go b/cmd/server/server_test.go index 3bf9371..d2de97c 100644 --- a/cmd/server/server_test.go +++ b/cmd/server/server_test.go @@ -214,10 +214,8 @@ func TestServedOpenAPIEqualsCommittedContract(t *testing.T) { platform := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { require.Equal(t, bearer, r.Header.Get("Authorization")) switch r.URL.Path { - case "/api/v1/projects/pj-test": - _, _ = w.Write([]byte(`{"teamSlug":"test"}`)) - case "/api/v1/teams": - _, _ = w.Write([]byte(`{"items":[{"id":"team","slug":"test","role":"Viewer"}]}`)) + case "/api/v1/projects/pj-test/access": + _, _ = w.Write([]byte(`{"projectId":"pj-test","member":true,"role":"Viewer","platformRoles":[]}`)) default: t.Errorf("unexpected platform route %s", r.URL.Path) w.WriteHeader(http.StatusNotFound) diff --git a/go.mod b/go.mod index 8985c4c..5600078 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/appthrust/tool-builder go 1.26.0 require ( - github.com/appthrust/appserver-go v0.2.0 + github.com/appthrust/appserver-go v0.3.0 github.com/lib/pq v1.12.3 github.com/oklog/ulid/v2 v2.1.1 github.com/stretchr/testify v1.11.1 diff --git a/go.sum b/go.sum index 855dd9f..3faaba0 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/appthrust/appserver-go v0.2.0 h1:TLb4pzbTXy3uMER5vQAXdzeeOTLxuNYEUXXvTAVzWm8= -github.com/appthrust/appserver-go v0.2.0/go.mod h1:0KSf9RQZ6OxBcE0lxYzzjKF37nfwbKps3wXUGlE0oFo= +github.com/appthrust/appserver-go v0.3.0 h1:zxOz0hkspZSXjLq3KWGDLkZIz42Jag6wqRujZ8lTru0= +github.com/appthrust/appserver-go v0.3.0/go.mod h1:0KSf9RQZ6OxBcE0lxYzzjKF37nfwbKps3wXUGlE0oFo= github.com/coreos/go-oidc/v3 v3.20.0 h1:EtE0WIBHk03N+DqGkY4+UONzzZHk7amKt6IyNd7OsZE= github.com/coreos/go-oidc/v3 v3.20.0/go.mod h1:DYCf24+ncYi+XkIH97GY1+dqoRlbaSI26KVTCI9SrY4= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=