feat: add CLI contract workflows#128
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
2b852a5 to
a11313f
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2b852a54c2
ℹ️ 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".
|
|
||
| match kind { | ||
| "string" => Ok(AssistantContractFieldKind::String), | ||
| "number" | "integer" => Ok(AssistantContractFieldKind::Number), |
There was a problem hiding this comment.
Enforce integer fields separately
When a contract file declares a required property as "type":"integer", this maps it to Number, and the later Number validation accepts any JSON number. A reply such as { "count": 1.5 } will therefore pass a contract that asked for an integer, so automations relying on contract-file validation can consume invalid shapes. Keep a distinct integer kind or validate integer types with integer-specific checks.
Useful? React with 👍 / 👎.
| let lenses = execute_lens_list(&token).await?; | ||
| let matches = lenses | ||
| .iter() | ||
| .filter(|candidate| candidate.name == lens) |
There was a problem hiding this comment.
Filter disabled lenses before resolving names
For kagi search --lens <name>, non-numeric names are supposed to resolve to an enabled lens, but this match set includes disabled lenses. If an account has an enabled Rust Docs lens and a disabled Rust Docs lens, the command hits the ambiguous branch before the enabled check and cannot search the enabled lens by name. Filter to enabled candidates before the uniqueness check, or only treat multiple enabled matches as ambiguous.
Useful? React with 👍 / 👎.
Summary
--error-format jsonandKAGI_ERROR_FORMAT=jsonkagi search --lensexact enabled lens names to the current numeric positionkagi extract --filterJSONL mode for stdin URL pipelinesquinn-protoinCargo.lockto satisfy the current RustSec audit gateVerification
facts checkcargo auditmake checkrust,coverage, andcargo-auditpassed; Mintlify deployment skipped