Repository navigation
feat: 对齐单次提交接口与结果协议(第二批) - #12
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
此前,高层 Go SDK 只能运行任务并返回汇总结果,无法直接获取一次提交的状态和耗时。本 PR 增加
client.Submit()、包级surveycore.Submit()和同步接口POST /api/v1/submissions,对齐 Python 的单次提交请求与结果结构。本批内容
SubmissionRequest,接收运行配置和可选问卷快照;复用现有三平台执行逻辑。attempt、provider、success、elapsed_seconds和可为 null 的error,独立调用的attempt为 0。ClassifySubmissionError(),保留 context 取消和超时原因。success: false,不创建持久化任务。验证
go test ./...go vet ./...go build ./...go test -race ./pkg/surveycore ./pkg/surveycore/runtime ./pkg/restapitests/consumer外部 SDK 测试git diff --check后续范围
这是 #10 的第二批。任务运行的逐次结果、重试和间隔语义,以及完整解析字段对齐,留到后续两批。
关联 #10。