Skip to content

codegen/agent: stabilize helper type ordering for deterministic gen#95

Merged
raphael merged 1 commit intomainfrom
fix/deterministic-toolset-helper-order
Mar 3, 2026
Merged

codegen/agent: stabilize helper type ordering for deterministic gen#95
raphael merged 1 commit intomainfrom
fix/deterministic-toolset-helper-order

Conversation

@raphael
Copy link
Member

@raphael raphael commented Mar 2, 2026

Summary

  • sort nested helper type maps before calling NameScope in specs_builder_materialize.go
  • remove nondeterministic helper name allocation caused by Go map iteration order
  • keep generated semantics unchanged while making repeated gen runs stable

Test plan

  • go test ./codegen/agent/...
  • go test -count=5 ./codegen/agent/tests

Sort nested helper maps before reserving NameScope identifiers so repeated generation does not reshuffle generated union/type aliases across runs.
@raphael raphael merged commit 3ccdfbd into main Mar 3, 2026
2 checks passed
@raphael raphael deleted the fix/deterministic-toolset-helper-order branch March 3, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant