Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
c936348
test(coverage): api handlers provisioning-arms slice → ≥95% (#161)
mastermanas805 May 23, 2026
fa31382
chore(deps): bump x/crypto 0.50->0.52, x/net 0.53->0.55 (OSV)
claude May 23, 2026
5ddb1dd
test(coverage): api handlers residual files + middleware → ≥95% (#162)
mastermanas805 May 23, 2026
d242385
test(coverage): wire 0%-under-CI handlers hermetically (api_keys/logs…
claude May 23, 2026
8a37465
test(coverage): recover queue + vector + audit + backup arms under CI
claude May 23, 2026
78fb742
test(coverage): deletion_confirm pure helpers + redirect handler
claude May 23, 2026
4125a94
test(coverage): github_deploy Get/Disconnect + vault GetSecret/List/D…
claude May 23, 2026
7915b2d
test(coverage): twin approval gate + promote-approval rate-limit/HTML…
claude May 23, 2026
0c4f4cb
test(coverage): webhook authed provision + vector authed provision + …
claude May 23, 2026
04b38e8
test(coverage): stack delete-confirm/cancel/UpdateEnv arms + validate…
claude May 23, 2026
5525cd1
test(coverage): stack New validation/cap arms + vector anonymous-dedu…
claude May 23, 2026
46ee3e2
test(coverage): internal_terminate auth arms + vault copy validation …
claude May 23, 2026
5bb314c
test(coverage): github webhook Receive branch/event filter arms
claude May 23, 2026
0989077
test(coverage): make new handler tests re-run-safe on the shared test DB
claude May 23, 2026
d57e2e0
test(coverage): raise handler coverage for billing/vault/twin/custom_…
mastermanas805 May 23, 2026
e701b1f
test(coverage): _vecwave handler arm coverage for vector/backup/githu…
claude May 23, 2026
8d5bdec
test(coverage): billing CreateCheckoutAPI invalid-body + dedup-guard arm
claude May 23, 2026
3759674
test(coverage): drive deploy/stack async-pipeline handlers toward 95%
claude May 23, 2026
9255505
test(coverage): final handlers pass — twin/github/custom_domain/vecto…
mastermanas805 May 23, 2026
3dd32f7
test(coverage): more handlers DB-error arms — status/api_keys/interna…
mastermanas805 May 23, 2026
08eef67
test(coverage): deletion_confirm resolveEmailConfirmedDeletion DB-err…
mastermanas805 May 23, 2026
6f1eeb0
test(coverage): vector anonymous over-cap dedup decrypt-fail fallthro…
mastermanas805 May 23, 2026
46e0631
test(coverage): vector over-cap dedup + cross-service fallback; backu…
mastermanas805 May 23, 2026
178fed0
test(coverage): storage decideStorageMode bucket-per-tenant + quota a…
mastermanas805 May 23, 2026
79e54d3
test(coverage): stack New deployment-limit/count-fail + ConfirmDelete…
mastermanas805 May 23, 2026
809e491
test(coverage): resource RotateCredentials update_failed arm
mastermanas805 May 23, 2026
b03f1b3
test(coverage): audit List/CSV DB-error; vault PutSecret bad-AES; res…
mastermanas805 May 23, 2026
6fc6e2d
test(coverage): whoami enrichment/nil-db; usage_wall + deploys_audit …
mastermanas805 May 23, 2026
172fd6a
test(coverage): final serial pass #2 — handlers DB-error/edge arms to…
mastermanas805 May 23, 2026
d40a278
test(coverage): final pass #2 batch 2 — bulk-twin happy path + vault …
mastermanas805 May 23, 2026
400a4e7
test(coverage): final serial pass #3 — handlers 93.9%→94.5% via behav…
mastermanas805 May 23, 2026
e363a94
test(coverage): final pass #3 cont. — k8s seam closures+error arms, t…
mastermanas805 May 23, 2026
2c6def2
test(coverage): final pass #3 — experiments.Converted validation arms
mastermanas805 May 23, 2026
d60f5a1
test(coverage): final pass #3 — vault.audit AppendVaultAudit-error arm
mastermanas805 May 23, 2026
04fbc42
test(coverage): final pass #3 — injectMessageID empty-id/unmarshal-er…
mastermanas805 May 23, 2026
14d7a1a
test(coverage): final pass #3 — deploy Patch invalid_body arm
mastermanas805 May 23, 2026
23e22b6
test(coverage): final pass #3 — ResourceEnvByTokenForMiddleware all 3…
mastermanas805 May 23, 2026
b9c971c
test(coverage): final pass #3 — env_policy.Get nil-policy + bad-team-…
mastermanas805 May 23, 2026
b015073
test(coverage): final pass #3 — CancelForTeam no-subscription + DB-er…
mastermanas805 May 23, 2026
5661a32
test(coverage): seam2 — quota.CheckStorageQuota + k8s logs clientset …
mastermanas805 May 23, 2026
b0c573f
Merge branch 'master' into coverage/api-integration
mastermanas805 May 23, 2026
afee4c0
ci: run NATS (monitoring :8222) in build-and-test so TestQueue_* pass
mastermanas805 May 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,23 @@ jobs:
- run: go build ./...
- run: go vet ./...

- name: Start NATS with monitoring (queue provider health-checks :8222)
# internal/providers/queue/local.go Provision() health-checks
# http://<NATSHost>:8222/healthz then returns nats://<host>:4222.
# TestQueue_* build a handler with an empty NATSHost, which defaults to
# "localhost" (queueprovider.New("")), so they need a real NATS
# reachable on localhost:8222. GitHub service containers can't pass the
# `-m` monitoring flag, so we run nats-server here instead. NATS-DOWN
# tests use the reserved non-resolvable host `nats.test`, so a live NATS
# on localhost does not collide with their 503 expectations.
run: |
docker run -d --name nats -p 4222:4222 -p 8222:8222 nats:2.10-alpine -m 8222
for i in $(seq 1 15); do
curl -sf http://localhost:8222/healthz >/dev/null && { echo "NATS healthy after ${i}s"; break; }
echo "waiting for NATS monitoring endpoint (${i}/15)"; sleep 1
done
curl -sf http://localhost:8222/healthz >/dev/null || { echo "::error::NATS monitoring never came up"; exit 1; }

# The gate. This MUST stay equal to deploy.yml's proven-green
# invocation (`go test ./... -short -count=1 -p 1`) PLUS `-race`:
# - `-p 1` is load-bearing: every package shares the single
Expand Down
34 changes: 33 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@ jobs:
# equal CI) — coverage.yml must run the same hermetic suite ci.yml does.
services:
postgres:
image: postgres:16-alpine
# pgvector/pgvector:pg16 is the stock postgres:16 image with the
# `vector` extension preinstalled. The /vector/new handler's local
# provider runs `CREATE EXTENSION vector` inside the freshly-created
# customer DB; on a plain postgres:16 image that errors and every
# vector-handler test SKIPs (vector.go measured ~44% under CI). Using
# the pgvector image lets the full /vector/new provisioning path run
# so vector.go contributes real coverage. It is a drop-in superset of
# postgres:16 — every other test behaves identically.
image: pgvector/pgvector:pg16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
Expand Down Expand Up @@ -50,6 +58,30 @@ jobs:
--health-interval 10s
--health-timeout 5s
--health-retries 5
nats:
# The /queue/new handler's local provider verifies NATS is reachable
# via the monitoring /healthz endpoint (port 8222) BEFORE returning a
# connection URL (synchronous-provisioning principle). Without a NATS
# service that 8222 health check fails → every /queue/new test 503s and
# the queue handler's provision + per-tenant-credential arms never run.
# `-js -m 8222` starts JetStream and binds the HTTP monitoring port the
# provider probes. No healthcheck option here because the stock nats
# image has no curl/wget/nc; the provider's own health probe is the
# readiness gate, and the run step waits on it implicitly via the test
# retries. (worker/provisioner added nats the same way.)
image: nats:latest
ports:
- 4222:4222
- 8222:8222
options: --name cov-ci-nats
# NATS server args. GHA passes service "options" to `docker create`;
# the image entrypoint args go via the `image` command — but GHA
# service containers don't accept a command override, so JetStream +
# monitoring are enabled through the env the nats image honours.
env:
# nats:latest reads these to enable JetStream + the 8222 monitor
# without a command override (which GHA service containers disallow).
NATS_EXTRA_ARGS: "-js -m 8222"
env:
TEST_DATABASE_URL: postgres://postgres:postgres@localhost:5432/instant_dev_test?sslmode=disable
TEST_REDIS_URL: redis://localhost:6379/15
Expand Down
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ require (
github.com/lib/pq v1.10.9
github.com/minio/madmin-go/v3 v3.0.110
github.com/minio/minio-go/v7 v7.0.90
github.com/nats-io/nkeys v0.4.15
github.com/newrelic/go-agent/v3 v3.43.3
github.com/oschwald/maxminddb-golang v1.13.0
github.com/prometheus/client_golang v1.23.2
Expand All @@ -28,6 +29,7 @@ require (
go.mongodb.org/mongo-driver v1.17.9
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0
go.opentelemetry.io/otel v1.43.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.39.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.39.0
go.opentelemetry.io/otel/sdk v1.43.0
go.opentelemetry.io/otel/trace v1.43.0
Expand Down Expand Up @@ -89,7 +91,6 @@ require (
github.com/montanaflynn/stats v0.7.1 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nats-io/jwt/v2 v2.8.1 // indirect
github.com/nats-io/nkeys v0.4.15 // indirect
github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
Expand Down Expand Up @@ -119,17 +120,16 @@ require (
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib v1.20.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.39.0 // indirect
go.opentelemetry.io/otel/metric v1.43.0 // indirect
go.opentelemetry.io/proto/otlp v1.9.0 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/crypto v0.50.0 // indirect
golang.org/x/net v0.53.0 // indirect
golang.org/x/crypto v0.52.0 // indirect
golang.org/x/net v0.55.0 // indirect
golang.org/x/oauth2 v0.34.0 // indirect
golang.org/x/sys v0.43.0 // indirect
golang.org/x/term v0.42.0 // indirect
golang.org/x/text v0.36.0 // indirect
golang.org/x/sys v0.45.0 // indirect
golang.org/x/term v0.43.0 // indirect
golang.org/x/text v0.37.0 // indirect
golang.org/x/time v0.10.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260120221211-b8f7ae30c516 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260120221211-b8f7ae30c516 // indirect
Expand Down
28 changes: 14 additions & 14 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -268,17 +268,17 @@ go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.50.0 h1:zO47/JPrL6vsNkINmLoo/PH1gcxpls50DNogFvB5ZGI=
golang.org/x/crypto v0.50.0/go.mod h1:3muZ7vA7PBCE6xgPX7nkzzjiUq87kRItoJQM1Yo8S+Q=
golang.org/x/crypto v0.52.0 h1:RMs7fP2rXdep0CftQlK8Uf+kibLm7qkCcradZWYz988=
golang.org/x/crypto v0.52.0/go.mod h1:1QgfPxDqh0T2M/elOJtp9RvuR95kVjir0e6/BvEmGbc=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.34.0 h1:xIHgNUUnW6sYkcM5Jleh05DvLOtwc6RitGHbDk4akRI=
golang.org/x/mod v0.34.0/go.mod h1:ykgH52iCZe79kzLLMhyCUzhMci+nQj+0XkbXpNYtVjY=
golang.org/x/mod v0.35.0 h1:Ww1D637e6Pg+Zb2KrWfHQUnH2dQRLBQyAtpr/haaJeM=
golang.org/x/mod v0.35.0/go.mod h1:+GwiRhIInF8wPm+4AoT6L0FA1QWAad3OMdTRx4tFYlU=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.53.0 h1:d+qAbo5L0orcWAr0a9JweQpjXF19LMXJE8Ey7hwOdUA=
golang.org/x/net v0.53.0/go.mod h1:JvMuJH7rrdiCfbeHoo3fCQU24Lf5JJwT9W3sJFulfgs=
golang.org/x/net v0.55.0 h1:bcvxaJn3e1U6InsFWt1JUq1aSjnRxLzT2rtD2KfkDF8=
golang.org/x/net v0.55.0/go.mod h1:L5U2KuzuOe1lY7Z+aWVIKK6qEeJXnXV9yzGA+WCHJww=
golang.org/x/oauth2 v0.34.0 h1:hqK/t4AKgbqWkdkcAeI8XLmbK+4m4G5YeQRrmiotGlw=
golang.org/x/oauth2 v0.34.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand All @@ -299,25 +299,25 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI=
golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY=
golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.42.0 h1:UiKe+zDFmJobeJ5ggPwOshJIVt6/Ft0rcfrXZDLWAWY=
golang.org/x/term v0.42.0/go.mod h1:Dq/D+snpsbazcBG5+F9Q1n2rXV8Ma+71xEjTRufARgY=
golang.org/x/term v0.43.0 h1:S4RLU2sB31O/NCl+zFN9Aru9A/Cq2aqKpTZJ6B+DwT4=
golang.org/x/term v0.43.0/go.mod h1:lrhlHNdQJHO+1qVYiHfFKVuVioJIheAc3fBSMFYEIsk=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg=
golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164=
golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc=
golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38=
golang.org/x/time v0.10.0 h1:3usCWA8tQn0L8+hFJQNgzpWbd89begxN66o1Ojdn5L4=
golang.org/x/time v0.10.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.43.0 h1:12BdW9CeB3Z+J/I/wj34VMl8X+fEXBxVR90JeMX5E7s=
golang.org/x/tools v0.43.0/go.mod h1:uHkMso649BX2cZK6+RpuIPXS3ho2hZo4FVwfoy1vIk0=
golang.org/x/tools v0.44.0 h1:UP4ajHPIcuMjT1GqzDWRlalUEoY+uzoZKnhOjbIPD2c=
golang.org/x/tools v0.44.0/go.mod h1:KA0AfVErSdxRZIsOVipbv3rQhVXTnlU6UhKxHd1seDI=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4=
gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E=
Expand Down
Loading
Loading