Purpose: Individual generator fixes (plans 02-05) may have introduced subtle changes that affect other generators. This final plan ensures everything is consistent end-to-end, with all tests passing simultaneously, and performs a manual semantic comparison of the key outputs. Per user decision "Fix everything immediately", any inconsistency found here is fixed in this plan.
Output: All 4 generators verified consistent, all tests passing, any final inconsistencies fixed, phase ready for verification.
<execution_context> @/Users/sebastienmelki/.claude/get-shit-done/workflows/execute-plan.md @/Users/sebastienmelki/.claude/get-shit-done/templates/summary.md </execution_context>
-
Build all plugin binaries from scratch:
make build -
Regenerate ALL golden files for ALL generators:
UPDATE_GOLDEN=1 go test ./internal/httpgen/ -run TestExhaustiveGoldenFiles -count=1 UPDATE_GOLDEN=1 go test ./internal/clientgen/ -count=1 UPDATE_GOLDEN=1 go test ./internal/tsclientgen/ -count=1 UPDATE_GOLDEN=1 go test ./internal/openapiv3/ -count=1 -
Run ALL tests without UPDATE_GOLDEN to verify they pass:
go test ./internal/httpgen/ -count=1 go test ./internal/clientgen/ -count=1 go test ./internal/tsclientgen/ -count=1 go test ./internal/openapiv3/ -count=1 -
Run the full test suite:
./scripts/run_tests.sh
If any test fails, diagnose and fix the issue. The fix should be minimal -- most issues at this stage are integration issues between the per-generator fixes from plans 02-05.
Run make lint-fix after any fixes.
./scripts/run_tests.sh passes with all tests green. make build succeeds. make lint-fix produces no changes.
For RESTfulAPIService:
-
Path consistency: Read the generated server routing config, Go client URL construction, TS client URL construction, and OpenAPI paths. Verify they all produce the same paths for each RPC:
- ListResources:
/api/v1/resources - GetResource:
/api/v1/resources/{resource_id} - GetNestedResource:
/api/v1/orgs/{org_id}/teams/{team_id}/resources/{resource_id} - CreateResource:
/api/v1/resources - UpdateResource:
/api/v1/resources/{resource_id} - PatchResource:
/api/v1/resources/{resource_id} - DeleteResource:
/api/v1/resources/{resource_id} - SearchResources:
/api/v1/resources/search(new from plan 01)
- ListResources:
-
HTTP method consistency: Verify all 4 generators agree on the HTTP method for each RPC.
-
Query parameter consistency: For ListResources and SearchResources, verify:
- Same parameter names across all 4 generators
- Same types (especially int64/uint64 as string in OpenAPI)
- Same required/optional semantics
-
Request body schema consistency: For CreateResource, UpdateResource, PatchResource:
- Verify field names match (protojson camelCase)
- Verify field types match (especially maps, nested messages, enums)
- Verify the Go client sends what the server expects
- Verify the TS client sends what the server expects
- Verify OpenAPI documents what the server accepts
-
Response body schema consistency: For all RPCs returning Resource:
- Verify field names match across all 4 generators
- Verify int64 fields (created_at, updated_at) are handled correctly (string in JSON per protojson)
- Verify enum fields (status) are string names
- Verify nested message fields (metadata_detail) are present
-
Error response consistency:
- Verify all generators agree on 400 = ValidationError, default = Error
- Verify error schema fields match
-
Header consistency:
- Verify service header X-API-Key appears in all generators
- Verify method header X-Request-ID appears for CreateResource in all generators
For BackwardCompatService:
- Verify default paths are consistent across all 4 generators
- Verify default HTTP method (POST) is used
Unwrap verification (from unwrap.proto):
- Verify all unwrap variants produce consistent schemas/types across all 4 generators
- Map-value unwrap: server JSON
{"bars": {"AAPL": [...]}}matches client expectations - Root repeated unwrap: server JSON
[{...}, {...}]matches client expectations - Root map unwrap: server JSON
{"key": {...}}matches client expectations - Combined unwrap: server JSON
{"AAPL": [...]}matches client expectations
If any inconsistency is found during comparison, fix it immediately. This may involve modifying generator source files (generator.go, types.go) in any of the 4 generators. After fixing, update the affected golden files and re-run tests.
./scripts/run_tests.sh. If any fixes were made, golden files were updated. The cross-generator comparison confirms semantic consistency for all RPCs in the shared test proto. make lint-fix produces no changes.
- Paths match across server, Go client, TS client, OpenAPI
- HTTP methods match
- Query/path parameters match (names, types, required/optional)
- Request/response body schemas match (field names, types, protojson conventions)
- Error responses match (ValidationError, Error)
- Headers match
- Unwrap variants are consistent across all 4 generators
- Backward compat defaults are consistent
- Any inconsistencies found are fixed (not deferred)
<success_criteria>
- ALL tests pass across all 4 generators simultaneously
- Cross-generator semantic comparison confirms consistency for every RPC in the shared test proto
- No remaining known inconsistencies between any pair of generators
- Any inconsistencies found during comparison are fixed in this plan (not deferred)
- Phase 3 success criteria 1-5 from ROADMAP.md are all satisfied
- The codebase is ready for Phase 4 (new annotation features) </success_criteria>
