Perform the final cross-generator consistency verification. Regenerate all golden files, run all tests, and verify that all 4 generators produce semantically consistent output for the shared test protos. Fix any remaining inconsistencies found. This is the definitive validation that the Phase 3 audit and fixes have achieved full cross-generator consistency.

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>

@.planning/PROJECT.md @.planning/ROADMAP.md @.planning/STATE.md @.planning/phases/03-existing-client-review/03-CONTEXT.md @.planning/phases/03-existing-client-review/03-RESEARCH.md @.planning/phases/03-existing-client-review/03-01-SUMMARY.md @.planning/phases/03-existing-client-review/03-02-SUMMARY.md @.planning/phases/03-existing-client-review/03-03-SUMMARY.md @.planning/phases/03-existing-client-review/03-04-SUMMARY.md @.planning/phases/03-existing-client-review/03-05-SUMMARY.md Task 1: Rebuild all binaries and regenerate all golden files from scratch internal/httpgen/testdata/golden/ internal/clientgen/testdata/golden/ internal/tsclientgen/testdata/golden/ internal/openapiv3/testdata/golden/ Perform a clean rebuild and regeneration to ensure everything is consistent:
  1. Build all plugin binaries from scratch:

    make build
    
  2. 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
    
  3. 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
    
  4. 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. All 4 generators build, all golden files are current, and all tests pass simultaneously.

Task 2: Cross-generator semantic comparison for the shared exhaustive test proto internal/httpgen/generator.go internal/clientgen/generator.go internal/tsclientgen/generator.go internal/openapiv3/generator.go internal/httpgen/testdata/golden/ internal/clientgen/testdata/golden/ internal/tsclientgen/testdata/golden/ internal/openapiv3/testdata/golden/ Perform a manual semantic comparison across all 4 generators for the `http_verbs_comprehensive.proto` shared test proto. For each service in the proto, compare the golden files and fix any inconsistencies found:

For RESTfulAPIService:

  1. 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)
  2. HTTP method consistency: Verify all 4 generators agree on the HTTP method for each RPC.

  3. 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
  4. 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
  5. 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
  6. Error response consistency:

    • Verify all generators agree on 400 = ValidationError, default = Error
    • Verify error schema fields match
  7. 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. All tests still pass: ./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. Cross-generator semantic comparison complete. All 4 generators produce semantically consistent output for every RPC in the shared exhaustive test proto:

  • 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)
1. `./scripts/run_tests.sh` passes (all generators, all tests) 2. `make build` succeeds 3. `make lint-fix` produces no changes 4. Cross-generator comparison documented with no remaining inconsistencies 5. Phase 3 success criteria from ROADMAP.md are all met: - SC1: Go client serialization matches server (verified via golden files + comparison) - SC2: TS client JSON matches server (verified via golden files + comparison) - SC3: Error handling consistent (ValidationError + ApiError) - SC4: Header handling consistent (service + method headers) - SC5: All golden file tests pass, new test cases added

<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>
After completion, create `.planning/phases/03-existing-client-review/03-06-SUMMARY.md`