Repository navigation
feat(cli): send spec and generator config digests with remote generation jobs - #18303
Open
adidavid014 wants to merge 5 commits into
Open
adidavid014 wants to merge 5 commits into
adidavid014 wants to merge 5 commits into
Conversation
…ion jobs Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Contributor
There was a problem hiding this comment.
AI Review Summary
Adds a provenance part to remote generation jobs with SHA-256 digests of specs, generators.yml, and the generator config. Logic is self-contained and tested; main risks are unguarded failure of the new I/O inside startJob and the test's reliance on path.join collapsing ../.
- 🟡 2 warning(s)
- 🔵 1 suggestion(s)
Review Scope
- Mode: Full pull request
- Range:
Full pull request through 796d5fcf4b73841a57be4741c9578875ad961cf5 - 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.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
✅ Devin resolved all 2 findings on 796d5fc
Fixed by Devin (2)
- Legacy specs missing from signed inputs
- Generator overrides sign the wrong specs
…erride) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This branch has not been deployed
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.
Description
Refs FECW-212. CLI half of signed SDK-generation provenance: when a remote generation job starts, the CLI now also sends SHA-256 digests of its inputs, so Fiddle can sign a provenance record linking the generated SDK to these exact files.
Changes Made
startJobadds aprovenancemultipart part (provenance.json) next toir/specs:{ "specs": [{"path": "../openapi.yaml", "sha256": "..."}, {"path": "openapi-overlay.yml", "sha256": "..."}], "generatorsYml": {"path": "generators.yml", "sha256": "..."}, "generatorConfigSha256": "...", // sha256 of the generator's raw generators.yml entry, JSON with sorted keys "generatorName": "fernapi/fern-go-sdk", "generatorVersion": "1.64.2" }provenanceInputs.ts: hashes the spec, overrides and overlay files the generator actually uses: the generator'sapioverride if it has one, otherwise the workspace's parsed API definition (coversapi.specs, legacyapi:paths and namespaces). URLs are skipped. Paths are relative to thefern/dir.Testing
provenanceInputs.test.ts(file digests, generatorapioverride, key-order-stable config digest)Link to Devin session: https://app.devin.ai/sessions/d6f44a15e5bd4fa8839430d41ee644b6
Open in Devin Desktop: https://app.devin.ai/desktop/session/d6f44a15e5bd4fa8839430d41ee644b6?variant=devin
Requested by: @adidavid014