test(dbops): cover changeset existence validation and aliases - #686
Closed
cursor[bot] wants to merge 2 commits into
Closed
test(dbops): cover changeset existence validation and aliases#686cursor[bot] wants to merge 2 commits into
cursor[bot] wants to merge 2 commits into
Conversation
Bumps package.json, both bundle manifests, and npm-shrinkwrap.json (new since 3.2.12) to 3.2.14, and updates the release-metadata test assertion to match. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> AI-Session-Id: 76b81db2-8027-4527-9f66-7068d3dfaff7 AI-Tool: claude-code AI-Model: unknown
Add regression tests for database_changeset_existence bodyBuilder: - required/non-empty changeset_ids array - 100-id batch limit - per-entry string validation and trimming - changeSetIds and change_set_ids field aliases - read operation policy and skipScopeBodyInjection metadata The happy-path dispatch test from #679 only covered the POST body shape; these cases guard the fail-loud validation added with the new DBOPS changeset existence API. Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
|
|
Collaborator
|
Closing after draft cleanup: the still-useful regression coverage is consolidated in retained #716 and the relevant focused drafts/fixes, so this branch no longer has a unique improvement worth keeping open. |
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
Adds regression tests for the
database_changeset_existenceresource introduced in #679. The existing test only verified the happy-path POST body shape; this PR covers thebodyBuildervalidation logic that prevents malformed batch requests from reaching the DBOPS API.Risky behavior now covered
changeset_ids— rejects missing or empty arrays before any API callchangeSetIdsandchange_set_idsmap to the same body shapeskipScopeBodyInjectionTest files added/updated
tests/registry/dbops.test.ts— 8 new cases indatabase_changeset_existence getWhy these tests materially reduce regression risk
The changeset existence check is used before presenting new Liquibase changesets for review to ensure id uniqueness. Silent validation regressions could either block legitimate checks or send malformed payloads to DBOPS. These tests lock in the fail-loud contract on input normalization and bounds, matching the pattern used for other batch-validated resources (e.g.
security_exemption_bulk).Type of Change
Checklist
pnpm testpasses (tests/registry/dbops.test.ts— 53 tests)pnpm typecheckpassespnpm buildpassespnpm standards:checkpassespnpm docs:checkpasses (not applicable — no registry/tool count changes)