Repository navigation
fix(cli): parse key=value webhook settings headers via algorithm-header key-id-parameter/algorithm-parameter - #18343
Conversation
…re algorithm-header for key=value settings headers Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
There was a problem hiding this comment.
AI Review Summary
This PR adds optional key-id-parameter / algorithm-parameter fields to the webhook algorithm-header schema (fern-definition + IR 67.33.0) so named key/value settings headers like Twilio's can be expressed, with pass-through in the IR converter and regenerated schemas/snapshots. The core change is small and additive and looks correct. The main concern is that fern-yml.schema.json appears to have been regenerated against a stale source, dropping unrelated existing properties and enum values.
- 🔴 1 critical issue(s)
- 🔵 1 suggestion(s)
AI Review
🔴 critical — fern-yml.schema.json (line 1043)
This regeneration looks like it was run against a stale branch: it removes existing enum values (alpha, preview, legacy) from availability across many sites, and deletes unrelated properties (robots-txt-on-instance-url, hide-webhook-method-badges, sort-by-availability, the cli generator entry) elsewhere in this file. Since these schemas drive editor validation, users with valid configs would start seeing bogus "not allowed" errors. None of this is related to the webhook algorithm-header change — please rebase onto latest main and regenerate so fern-yml.schema.json only gains the new key-id-parameter / algorithm-parameter fields (which, notably, are missing from this file entirely while present in the other three schema files).
Review Scope
- Mode: Full pull request
- Range:
Full pull request through d5df56387458a5cdb42849ff5e47131a3bd6fe6c - Current range coverage: Complete
- Cumulative pull request coverage: Complete
This review is complete for the current scope. Addressing all critical and warning findings above satisfies the review; suggestions are optional. Request another review only if subsequent changes introduce new behavior or materially expand the pull request's scope.
There was a problem hiding this comment.
✅ Devin resolved the finding on d5df563
Fixed by Devin (1)
- Valid docs settings fail schema validation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Docs Generation Benchmark ResultsComparing PR branch against median of 5 nightly run(s) on
Docs generation runs |
SDK Generation Benchmark ResultsComparing PR branch against median of 5 nightly run(s) on Full benchmark table (click to expand)
main (generator): generator-only time via --skip-scripts (includes Docker image build, container startup, IR parsing, and code generation — this is the same Docker-based flow customers use via |
Description
Linear ticket: Refs FSDK-2380
Twilio's real SharedKey header is a named key/value list, not
<keyId><delimiter><algorithm>:With the current
algorithm-header(header+key-id-delimiter+algorithms) the generatedverifyRequestsplits at the last,and hands the resolverkey=webhooks_sharedkey_<id>and looks upalgorithm=HMAC_SHA256. This PR adds two optional fields so the CLI can express the named-parameter format; generators parse it in a follow-up PR against IR 67.33.0.Changes Made
WebhookAlgorithmHeaderSchema(fern-definition, shared withapi.settings.webhook-signature): optionalkey-id-parameter/algorithm-parameter.WebhookAlgorithmHeader.keyIdParameter/algorithmParameter(optional, additive); converter passes them through.fixchangelog entry.api-webhook-signatureswitched to Twilio's real header/format.Testing
irtest forapi-webhook-signaturere-snapshotted with the new fields.fern iron the fixture emitskeyIdParameter: "key",algorithmParameter: "algorithm".Link to Devin session: https://app.devin.ai/sessions/019eb509a709495aad58cca9c4d15756
Open in Devin Desktop: https://app.devin.ai/desktop/session/019eb509a709495aad58cca9c4d15756?variant=devin
Requested by: @cadesark