Repository navigation
Port Abstractions behaviors and structured output - #1273
Quim Muntal (qmuntal) wants to merge 2 commits into
Conversation
Align session state concurrency, history, and compaction behavior with Abstractions; add behavioral tests for agents, sessions, context providers, responses, and messages. Support non-object typed JSON output across providers and reconcile .NET API and test mappings. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Session serialization compatibility, delayed state-key panics, and global AG-UI lock contention remain unresolved.
3 open findings
What changed in this PR
Ports stable abstractions behavior, adds concurrency-safe session state, and supports typed non-object structured output across providers.
Changes:
- Adds synchronized session/history and compaction behavior.
- Wraps and decodes non-object structured output consistently.
- Expands behavioral tests and .NET symbol mappings.
| File | Description |
|---|---|
provider/openaiprovider/strict_schema_test.go |
Tests explicit schema rejection. |
provider/openaiprovider/responses.go |
Adds wrapped structured output. |
provider/openaiprovider/chat.go |
Adds wrapped structured output. |
provider/openaiprovider/chat_test.go |
Tests structured output end-to-end. |
provider/geminiprovider/agent.go |
Adds wrapped structured output. |
provider/geminiprovider/agent_test.go |
Tests non-object output. |
provider/anthropicprovider/agent.go |
Adds wrapped structured output. |
provider/anthropicprovider/agent_test.go |
Tests non-object output. |
provider/aguiprovider/agui.go |
Synchronizes thread-ID initialization. |
provider/aguiprovider/agui_test.go |
Tests concurrent thread IDs. |
message/message_test.go |
Expands source-cloning tests. |
examples/02-agents/agents/step18_compaction_pipeline/main.go |
Displays history size. |
agent/value.go |
Synchronizes lazy state values. |
agent/structuredoutput_test.go |
Tests custom provider formats. |
agent/session.go |
Makes session state concurrent. |
agent/session_test.go |
Expands state and concurrency tests. |
agent/response_test.go |
Ports response behavior tests. |
agent/options.go |
Documents structured wrapping. |
agent/history.go |
Exposes in-memory history helpers. |
agent/history_test.go |
Tests history APIs and behavior. |
agent/harness/todo/todo.go |
Clones todo snapshots. |
agent/harness/todo/todo_test.go |
Tests stable todo snapshots. |
agent/format/jsonformat/structuredoutput.go |
Implements schema wrapping and decoding. |
agent/format/jsonformat/encoding_test.go |
Tests wrapper constraints and decoding. |
agent/context_test.go |
Ports context-provider tests. |
agent/compaction/provider.go |
Serializes per-session compaction. |
agent/compaction/historyprovider.go |
Validates history state keys. |
agent/compaction/historyprovider_test.go |
Expands reducer tests. |
agent/compaction/compaction_test.go |
Tests concurrent compaction. |
agent/agent.go |
Clarifies format documentation. |
agent/agent_test.go |
Ports agent metadata/invocation tests. |
_catalog/dotnet-go-sdk-symbol-mapping.json |
Reconciles APIs and test pairs. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
API consistency review
Changed Go contract
Upstream evidence reviewed
AssessmentThe PR is a faithful, well-evidenced port of stable .NET Abstractions behavior: session thread-safety matches the documented Warning Firewall blocked 4 domainsThe following domains were blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "github.com"
- "proxy.golang.org"
- "storage.googleapis.com"
- "sum.golang.org"See Network Configuration for more information.
|


Summary
ForTypeand explicit response-format semantics unchanged.Validation
go test -shuffle=on -count=1 ./...(Go 1.26.1, Windows ARM64)go vet ./...go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.14.0 run --new-from-rev=origin/main(0 issues)go -C _catalog run ./cmd/symbolmap reconcile -summary -checkgo -C _catalog run ./cmd/symbolmap tests -summary -check