Repository navigation
fix(push): validate the whole plan before the first write - #101
Closed
dhruva-vapi wants to merge 2 commits into
Closed
dhruva-vapi wants to merge 2 commits into
dhruva-vapi wants to merge 2 commits into
Conversation
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 that start with 'Devin'.
|
Contributor
Devin Review🟢 Devin Review found nothing to fix · View findings |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
|
Replaced by #107 (same branch, opened as the Devin bot so it can be approved). |
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.
Summary
Push wasn't atomic: during the NHS test push (#99/#100 on #94), a 400 on resource 2 of 6 left the org half-applied. Validator errors only warned unless
--strict, so a payload the validators already knew was bad still went out after earlier POSTs.Push now runs a preflight on the write plan before any remote mutation (orphan deletes included):
--strictkeeps its old meaning (block on any error).--dry-runruns the same gate, so a dry run predicts the real run.transfer-number-liquid, which this gate now makes blocking).Tests:
tests/push-preflight.test.ts, using a local HTTP stub. It covers a full push with a later invalid resource (exit 1, zero POST/PATCH/DELETE), a scoped push with an unrelated invalid file (proceeds), dry-run, unresolved credentials,--strict, and an auto-applied dependency with an error.npm run buildis clean,npm testgives 591 pass / 0 fail, and biome is clean.