Skip to content

feat: align Core API fields and support response extensions - #14

Merged
LeeEirc merged 1 commit into
masterfrom
pr@master@perf_master
Sep 11, 2026
Merged

LeeEirc merged 1 commit into
masterfrom
pr@master@perf_master

Conversation

@LeeEirc

@LeeEirc LeeEirc commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI lite review requested due to automatic review settings September 11, 2026 03:15
@LeeEirc
LeeEirc merged commit 1569808 into master Sep 11, 2026
1 check passed
@LeeEirc
LeeEirc deleted the pr@master@perf_master branch September 11, 2026 03:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved compatibility, cookie-isolation, upload-error, and test-coverage issues remain.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Aligns SDK models and API endpoints with updated Core fields while adding extensible request and response handling.

Changes:

  • Updates Core routes and model fields.
  • Adds WithResponse decoding and request extensions.
  • Adds documentation and tests while removing obsolete integration tests.

Review findings:

  • Critical, 3 votes — model/token.go: Replacing AccountName breaks downstream compatibility and legacy account_name decoding.
  • Moderate, 3 votes — httplib/client.go: WithResponse should clone the cookie jar to prevent session leakage.
  • Moderate, 2 votes — httplib/client.go: Upload error handling should preserve the response body.
  • Moderate, 1 vote — httplib/response_test.go: The assertion does not detect decoder regressions.
File summaries
File Reviewed change
storage/es_test.go Removes obsolete response test.
service/url.go Updates Core API paths.
service/request.go Adds request-field merging.
service/register.go Adds registration options and extensions.
service/register_test.go Tests registration extensions.
service/panda/client_test.go Removes obsolete manual test.
service/jms.go Adds response-bound services.
service/jms_token.go Adds token options and fields.
service/jms_token_test.go Tests token extensions.
service/jms_test.go Removes environment-dependent tests.
model/token.go Expands token response models.
model/remote_app.go Adds virtual-app provider fields.
model/platform.go Adds protocol fields.
model/asset.go Adds web-login and asset fields.
model/account.go Adds privileged account state.
httplib/response.go Implements dual response decoding.
httplib/response_test.go Tests response decoding.
httplib/client.go Adds response-bound client support.
httplib/client_test.go Tests client isolation and uploads.
docs/api-fields.md Documents extension behavior.
common/time_test.go Strengthens UTC time tests.
Review details

Suppressed comments (1)

httplib/response_test.go:29

  • This assertion never fails for either table row: the first payload intentionally leaves token.ExpireTime at zero while setting extra.Future, and the second does the opposite, so && is false in both cases. Assert the expected successful destination separately for each payload (or parameterize those expectations) so a regression in one decoder is detected.
			if token.ExpireTime != 60 && !extra.Future {
				t.Fatal("an error in one destination prevented decoding the other")
  • Files reviewed: 21/21 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread model/token.go
Value string `json:"value"`
ExpireTime int `json:"expire_time"`
Protocol string `json:"protocol"`
Account string `json:"account,omitempty"`
Comment thread httplib/client.go
Comment on lines +93 to +96
client := *c
client.cookies = maps.Clone(c.cookies)
client.headers = maps.Clone(c.headers)
client.extraResponse = target
Comment thread httplib/client.go
_, err = buf.ReadFrom(resp.Body)
return err
}
res = c.responseDestination(res)
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.

2 participants