Repository navigation
feat(logs): read project logs - #66
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 25d5e55859
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| response = search_project_logs.sync_detailed( | ||
| UUID(project_id), | ||
| client=client, | ||
| body=LogSearchRequest.from_dict(plain_request), |
There was a problem hiding this comment.
Reject unknown log fields instead of dropping them
When a caller misspells a filter, such as supplying query instead of q, LogSearchRequest.from_dict() silently discards the unrecognized field and serializes a broader, otherwise valid request. Because the public facade accepts arbitrary mappings and performs no key validation, the caller receives unfiltered log results rather than the validation error required by the schema's additionalProperties: false; the activity request at line 1565 has the same behavior. Validate top-level and nested selector keys before conversion, or avoid this lossy model round-trip.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in b8a5931 by preserving the caller's exact JSON on the generated request path so Hosting enforces unknown-field rejection, while generated response parsing remains in use.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b8a59311a1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| plain_request = cast("dict[str, Any]", _plain_json(request)) | ||
| with self._client(authorization) as client: | ||
| request_kwargs = log_search_kwargs( | ||
| UUID(project_id), body=LogSearchRequest.from_dict(plain_request) |
There was a problem hiding this comment.
Avoid parsing malformed requests before sending them
When a request omits the required resource field, LogSearchRequest.from_dict() raises a bare KeyError before the raw-body override or HTTP request runs, so Hosting cannot return its 400 response and the facade cannot map it to ValidationError; malformed known timestamps or resource IDs similarly leak ValueError. The post-fix override preserves unknown fields only for bodies that the generated parser already accepts, and the activity path has the same ordering, so construct the generated URL without parsing the caller body or translate these local failures consistently.
Useful? React with 👍 / 👎.
Expose authenticated logs.search and logs.activity facades backed by generated OpenAPI operations. Return immutable native response envelopes, document usage, enforce generated-operation provenance, and cover transport, errors, validation, typing, packaging, and Hosting contract compatibility.