Tidy SaaS agent module metadata - #7
Conversation
|
The Codefly-owned gate is blocked by an unrelated Tracked in codefly-dev/service-go-grpc#24. The separate SDK-boundary check and the PR's local module/test/build validation pass. |
CI status: blocked by two agent-level issues (not by this PR)This PR only tidies
Both center on |
Update — fixes are now in flight (agent-level; nothing to change in this repo)Both blockers traced and addressed upstream:
Path to green for this PR (all upstream; this PR stays scoped to the go.mod tidy):
|
Correction — the
|
|
Tracking issue for the full path to green: #10 (blockers: service-go-grpc#26 → v0.1.15 release; service-nextjs#22 → fix+release; then re-pin here). |
Bump pinned agents to the releases that fix the two proto sync-drift blockers: - go-grpc 0.1.13 -> 0.1.15: builder skips the unreadable `.cache` in the staging root (Linux-CI `open /tmp/.../.cache: permission denied`). - nextjs 0.0.115 -> 0.0.116: frontend sync-drift no longer flags the dependency-cross-written *_pb.ts. Regenerate derived service.codefly.yaml manifests + base-manifest. Also refresh accounts + auth-sidecar go.sum for service-postgres@v0.0.104 (stale checksum after the module was re-released) to the canonical proxy/sumdb-verified hash, fixing a go mod download checksum-mismatch error. verify + sync-drift pass locally. A pre-existing agent bug still blocks lint/compile (platform_admin.pb.gw.go uses jobsv1 without importing it) — codefly-dev/service-go-grpc#30. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The companion buf.gen's protoc-gen-es wrote to ../../frontend/code/src/gen,
which escapes the go-grpc builder's per-service /workspace mount to the
container root /frontend. Under go-grpc 0.1.15 the companion runs as the
non-root host user, so `mkdir /frontend` fails ("permission denied") and
accounts sync-drift dies in `buf generate`. (Under 0.1.13's root it silently
wrote to a throwaway /frontend, then failed later on the .cache walk.)
accounts' checked output is only code/pkg/gen; generating the frontend's TS
into another service's tree during accounts' isolated sync is both incorrect
and unnecessary. Drop the plugin from the companion path. buf.gen.local.yaml
keeps it for full-workspace local dev (where ../frontend resolves), and the
committed frontend types are unchanged. Determinism + SDK-boundary guards and
verify+sync-drift pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…0.105 v0.0.104's module content is unstable in CI: sum.golang.org records the canonical hash but the GOPRIVATE-direct fetch the go runner uses returns different bytes (the tag was touched by service-postgres' "Restore releases / sync go.sum" workflow migration), so `go mod download` fails with a checksum-mismatch SECURITY ERROR during runtime-init. v0.0.105 is the stable release cut via the shared workflow; bump to it and refresh go.sum. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…e TS go-grpc 0.1.13->0.1.17: 0.1.17 ships #30/#32 "Insert cross-package imports missing from generated gateway code", so regenerated platform_admin.pb.gw.go now imports `jobsv1 "accounts/pkg/gen/saas/jobs/v1"` and compiles. Clears the lint/compile `undefined: jobsv1` wall (verify+sync-drift+lint pass; accounts builds). Then the compile phase surfaced two pre-existing strict-mode TS errors in the frontend (never reached before, CI failed earlier): - themePreferenceToProto: add a default return so the fn returns on all paths (TS2366). - theme-preference-provider: coerce the restored value to a string in the catch (`previous ?? "system"`) — inside the useCallback the guard doesn't persist narrowing, so it widened to string|undefined (TS2345). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… .cache) TestRESTSurfaceArtifactsAreDeterministicAndCurrent and the go:generate rest-surface step both consume the merged raw OpenAPI as an input, alongside committed siblings (generated/service-catalog.json, gateway-routes.json). But protoc-gen-openapiv2 wrote it to the gitignored .cache/openapi/ scratch dir, which the go-grpc builder produces only in its throwaway sync stage and never materializes in the real tree — so a clean checkout / CI never has it and the test failed: `open ../../../.cache/openapi/api.swagger.json: no such file`. Root cause: a required, reproducible determinism-test input was treated as an ignored intermediate. Fix the shape, not the call site: relocate the openapiv2 output to the tracked generated/openapi-raw/ and commit it as a checked fixture like its siblings. Updates both buf.gen configs, the go:generate directive, and the two test read sites; regenerates the fixture. Verified: pkg/cataloggen tests (incl. the previously-failing determinism test), TestMergedProtocolGeneratorsUseOneInvocation, SDK-boundary, and verify+sync-drift all pass. The determinism test is the covering test — it failed on the missing file and now passes, guarding the fixture's presence (readFixture) and currency (re-derives the public doc; 115 operations). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The codefly nextjs agent runs the suite as `npm run test -- --reporter=json --outputFile=<file>` and parses vitest's JSON report. The `test` script was `vitest run && node --test scripts/...`, so npm appended `--reporter=json --outputFile=…` to the LAST command (node --test), not vitest — vitest emitted no JSON and the agent read "0 passed", failing the test phase even though every test passed. Root cause: the default suite mixed two runners, breaking the agent's single-runner (vitest) result contract. Run the build-tooling unit test under vitest too (add scripts/**/*.test.mjs to the vitest include; import `test` from vitest) and set `test` to `vitest run`. Behavior-preserving. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Closing as superseded by merged #15. Current main contains the converged metadata work and a stronger billing-test repair: package-level Postgres serialization plus one transaction that holds all related table locks through plan reset. Rebasing this older branch would discard that newer architecture and reintroduce hundreds of stale tree differences. |
Summary
Validation
GOWORK=off go mod tidyGOWORK=off go mod verifyGOWORK=off go test -count=1 -timeout=3m ./...