Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
60c612a
fix(codegen): coordinate union names across shared packages
raphael Aug 21, 2026
21d0e99
docs(codegen): define generated package ownership
raphael Aug 21, 2026
2863cc9
docs(codegen): widen ownership to generation lifetime
raphael Aug 21, 2026
0103f6a
test(codegen): pin generated package ownership contracts
raphael Aug 21, 2026
050ead6
docs(codegen): distinguish reproduced union failures
raphael Aug 21, 2026
dac45fe
test(codegen): verify generated transport coverage
raphael Aug 21, 2026
055b842
docs(codegen): order catalog before identity refactor
raphael Aug 21, 2026
15f86ce
feat(codegen): add generation-owned type catalog
raphael Aug 21, 2026
7353f34
fix(codegen): freeze generated package names
raphael Aug 21, 2026
8bda1ae
fix(codegen): hide package scope until freeze
raphael Aug 21, 2026
bec6060
docs(codegen): record frozen catalog contract
raphael Aug 21, 2026
4957dde
feat(codegen): add generation planning lifecycle
raphael Aug 21, 2026
a120d8e
docs(codegen): describe generation invariants
raphael Aug 21, 2026
c1b12f8
docs(codegen): record generation lifecycle completion
raphael Aug 21, 2026
81b8bc3
refactor(codegen): make service emission package-owned
raphael Aug 21, 2026
4ca1f70
codegen: complete generated package ownership
raphael Aug 21, 2026
5469ad1
codegen: freeze aliases and method type names
raphael Aug 21, 2026
14b1a3c
codegen: make service aliases generation-owned
raphael Aug 21, 2026
1bf62f5
codegen: prioritize required import aliases
raphael Aug 21, 2026
839791a
docs(codegen): record package-owned service completion
raphael Aug 21, 2026
595f50a
codegen: freeze service names across transports
raphael Aug 21, 2026
8dc8ea8
fix(codegen): key recursive traversal by declaration origin
raphael Aug 21, 2026
c6a0e1e
codegen: freeze generated transport aliases
raphael Aug 21, 2026
393e910
codegen: catalog protobuf wire declarations
raphael Aug 21, 2026
ddfc047
fix(codegen): own transport wire contracts
raphael Aug 21, 2026
da3907d
docs(codegen): define retained generation plans
raphael Aug 21, 2026
cf6e0a5
refactor(codegen): own names and fresh run lifecycle
raphael Aug 21, 2026
84bed41
fix(codegen): make generation state exact and run-owned
raphael Aug 21, 2026
3bf68c4
fix(codegen): retain complete service generation plans
raphael Aug 22, 2026
0b90825
fix(grpc): require a complete oneof branch
raphael Aug 22, 2026
f797d9c
fix(codegen): retain exact HTTP and JSON-RPC plans
raphael Aug 22, 2026
c0690e3
fix(codegen): preserve exact protobuf Go names
raphael Aug 22, 2026
1bf4653
refactor(grpc): retain one transport plan
raphael Aug 22, 2026
5cbdda8
fix(codegen): complete generated contract planning
raphael Aug 24, 2026
1729d97
fix(codegen): preserve released generator entry points
raphael Aug 24, 2026
6ae2349
chore: satisfy repository checks
raphael Aug 24, 2026
be08c8e
fix(codegen): keep planned output paths portable
raphael Aug 24, 2026
4c9eac4
fix(codegen): support Windows tool output
raphael Aug 24, 2026
5d25a4e
fix(cli): honor JSON contracts in generated commands
raphael Aug 24, 2026
0a23906
fix(openapi): keep JSON and YAML values equivalent
raphael Aug 24, 2026
b12e1e4
fix(http): decode whole-query maps as generated clients send them
raphael Aug 24, 2026
970710e
fix(http): close empty WebSocket result streams cleanly
raphael Aug 24, 2026
91277e9
docs(codegen): describe released generator compatibility
raphael Aug 24, 2026
d6f3359
refine generated interceptor info interfaces
raphael Aug 24, 2026
e5b1394
fix(dsl): preserve referenced API error defaults
raphael Aug 24, 2026
a67c696
fix(codegen): generate exact transport contracts
raphael Aug 24, 2026
371c605
docs(codegen): complete upgrade guidance
raphael Aug 24, 2026
344c9b1
fix(ci): install protobuf standard schemas
raphael Aug 24, 2026
709c140
fix(codegen): bind generated types by source
raphael Aug 24, 2026
70a27fd
fix(http): prepare oneof branch wire types
raphael Aug 25, 2026
6e7f0cb
fix(http): preserve viewed result constructor names
raphael Aug 25, 2026
1b7182f
fix(example): use planned service commands
raphael Aug 25, 2026
833f95e
fix: preserve planned fields and route ownership
raphael Aug 25, 2026
02fae29
codegen: expose planned reference pointers
raphael Aug 25, 2026
8cc09a6
fix: generate exact transport values
raphael Aug 25, 2026
83103d3
Merge remote-tracking branch 'origin/v3' into fix/goa-generation-plan
raphael Aug 25, 2026
04cd4a7
fix: keep generated contracts exact
raphael Aug 25, 2026
93fbcbe
fix: preserve generated transport contracts
raphael Aug 25, 2026
ed7b726
fix: render empty CLI object examples
raphael Aug 25, 2026
e61c755
fix: enforce declared JSON-RPC message kinds
raphael Aug 25, 2026
dd39660
fix: share strict transform helper definitions
raphael Aug 25, 2026
15f11dc
fix: keep notifications response-free
raphael Aug 25, 2026
245bb14
fix: scope transform pointer temporaries
raphael Aug 25, 2026
d14a370
fix: isolate transform loop names
raphael Aug 25, 2026
95933f0
fix: scope transport transform blocks
raphael Aug 25, 2026
8c27fcd
document generation design failures
raphael Aug 25, 2026
d8c8ccd
fix(codegen): share package scope with imports
raphael Aug 26, 2026
c43f39c
fix(codegen): retain exact generated imports
raphael Aug 26, 2026
6954f6b
fix(codegen): plan exact generated imports
raphael Aug 26, 2026
cb16d72
fix(http): cast path aliases to transport types
raphael Aug 26, 2026
2f55968
fix(http): retain security code imports
raphael Aug 26, 2026
7cf85f8
fix(http): plan required path flag imports
raphael Aug 26, 2026
5f90d9c
fix(http): retain primitive paths and example aliases
raphael Aug 26, 2026
811e48b
test(http): satisfy primitive path lint
raphael Aug 26, 2026
76b2e84
fix(codegen): plan inline validation imports
raphael Aug 26, 2026
1a5640d
fix(openapi): preserve large integer values
raphael Aug 26, 2026
89084ff
fix(openapi): quote date-shaped YAML strings
raphael Aug 26, 2026
72bc5be
fix(openapi): preserve YAML formatting while quoting dates
raphael Aug 26, 2026
41ad2cc
fix(grpc): stabilize nested validator names
raphael Aug 26, 2026
5e4c64c
fix(codegen): share equivalent transform helpers
raphael Aug 26, 2026
19ed380
fix(codegen): render transforms from planned types
raphael Aug 26, 2026
899b464
fix(codegen): report packages only for qualified types
raphael Aug 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 26 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,36 @@ No commented-out code—delete dead code.

### Codegen Implementation

- **Critical — finish work during generation**: Use the complete design, generation plan,
and Go templates to decide everything that is known before the generated
program runs. Select branches, names, types, imports, field paths, helper
calls, and emitted files while generating source. Templates must write only
the selected code. Do not make generated programs inspect generated type
shapes, parse generator-made names, carry generator mode flags, or execute
branches whose answer was already known. Runtime code should contain only
logic that depends on actual runtime values. When a runtime value is truly
required, keep that input narrow and specialize all surrounding code during
generation.
- **Use NameScope helpers** for type references: `GoTypeRef`, `GoFullTypeRef`, `GoTypeName`. Never concatenate strings for types.
- Let Goa decide pointer/value semantics. Do not force `pointer=true` except in transport validation.
- **Keep helper visibility minimal**: If logic is shared only inside one codegen area, keep it package-private or move it under an `internal` package. Do not export helpers from a parent package just to share them across sibling generators.
- **Avoid pass-through wrappers**: When two helper functions differ only by forwarding arguments or hard-coding `nil`, collapse them into a single implementation instead of adding an extra layer.
- **Generated packages own names**: When several services or plugins write to
one Go package, collect every package-level name before rendering and then
make those names final. A declaration and every HTTP, gRPC, or JSON-RPC use
of it must read the same name record. Do not give each service or plugin a
separate name scope for the same package, and do not add declarations after
names become final.
- **Keep identity typed and explicit**: Do not hide a declaration's kind,
package, or use in a decorated name or a made-up string map key. Do not
change an expression's `Hash` behavior to solve a generation problem. Pass a
typed identifier where the generated declaration is named.
- **Trace the complete lifecycle**: Before changing relocated types, union
naming, generation roots, plugins, or file merging, follow the declaration
from the evaluated design through service analysis, its generated Go
package, the emitted service code, HTTP and gRPC uses, plugin changes, and
the final file merge. A service-only rendering test is not enough.
See [`codegen/ARCHITECTURE.md`](codegen/ARCHITECTURE.md).

### Documentation

Expand Down
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,16 @@ GOLANGCI_LINT_VERSION?=v2.11.3
GOLANGCI_LINT=$(GOBIN_DIR)/golangci-lint
PROTOC_BIN=protoc
PROTOC_DEST=$(GOBIN_DIR)/$(PROTOC_BIN)
PROTOC_INCLUDE_DEST=$(GOPATH)/include

.PHONY: all all-tests ci depend lint test test-release integration-test build-goa release release-preflight release-goa release-examples release-plugins
.NOTPARALLEL: release release-goa release-examples release-plugins

# Only list test and build dependencies
# Standard dependencies are installed via go get
DEPEND=\
google.golang.org/protobuf/cmd/protoc-gen-go@latest \
google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.12 \
google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.6.2

all: lint test integration-test

Expand Down Expand Up @@ -80,6 +81,8 @@ depend:
$(UNZIP) $(PROTOC).zip
@rm -f "$(PROTOC_DEST)" && \
cp $(PROTOC_EXEC) "$(PROTOC_DEST)" && \
mkdir -p "$(PROTOC_INCLUDE_DEST)" && \
cp -R "$(PROTOC)/include/." "$(PROTOC_INCLUDE_DEST)" && \
chmod 0755 "$(PROTOC_DEST)" && \
rm -rf $(PROTOC) && \
"$(PROTOC_DEST)" --version
Expand Down Expand Up @@ -177,4 +180,3 @@ release-plugins:
git tag v$(MAJOR).$(MINOR).$(BUILD) && \
git push origin v$(MAJOR) && \
git push origin v$(MAJOR).$(MINOR).$(BUILD)

1,108 changes: 1,108 additions & 0 deletions codegen/ARCHITECTURE.md

Large diffs are not rendered by default.

Loading
Loading