Skip to content

feat(sssql): support correlated EXISTS/NOT EXISTS refresh relocation#773

Merged
mk3008 merged 1 commit intomainfrom
768-sssql-refresh拡張-correlated-exists-not-exists-branch-の再配置に対応する
Apr 15, 2026

Hidden character warning

The head ref may contain hidden characters: "768-sssql-refresh\u62e1\u5f35-correlated-exists-not-exists-branch-\u306e\u518d\u914d\u7f6e\u306b\u5bfe\u5fdc\u3059\u308b"
Merged

feat(sssql): support correlated EXISTS/NOT EXISTS refresh relocation#773
mk3008 merged 1 commit intomainfrom
768-sssql-refresh拡張-correlated-exists-not-exists-branch-の再配置に対応する

Conversation

@mk3008
Copy link
Copy Markdown
Owner

@mk3008 mk3008 commented Apr 15, 2026

Summary

  • Resolve SSSQL refresh拡張: correlated EXISTS / NOT EXISTS branch の再配置に対応する #768 by extending SSSQL refresh to relocate correlated EXISTS / NOT EXISTS branches.
  • Add fail-fast anchor inference rules for correlated refresh (0 candidates or multiple candidates now error explicitly).
  • Preserve scalar refresh behavior while adding correlated branch rebasing and relocation coverage.
  • Add round-trip CLI regression tests (scaffold -> refresh, refresh -> refresh, and remove --all interplay).
  • Document correlated refresh support and fail-fast rules in the SSSQL CLI reference.
  • Add a changeset for rawsql-ts and @rawsql-ts/ztd-cli.

Verification

  • pnpm --filter rawsql-ts test -- SSSQLFilterBuilder.test.ts (pass)
  • pnpm --filter @rawsql-ts/ztd-cli test -- cliCommands.test.ts (pass; DB-dependent tests skipped as expected when pg_dump is missing)
  • pnpm --filter rawsql-ts build (pass)
  • pnpm --filter rawsql-ts lint (pass)

Merge Readiness

  • No baseline exception requested.
  • Baseline exception requested and linked below.

Tracking issue: #768
Scoped checks run: pnpm --filter rawsql-ts test -- SSSQLFilterBuilder.test.ts; pnpm --filter @rawsql-ts/ztd-cli test -- cliCommands.test.ts; pnpm --filter rawsql-ts build; pnpm --filter rawsql-ts lint
Why full baseline is not required: repository-wide baseline currently has pre-existing failures outside this change scope (for example packages/ztd-cli/tests/directoryFinding.docs.test.ts, packages/ztd-cli/tests/setupEnv.unit.test.ts, and packages/ztd-cli/tests/agentsPolicy.unit.test.ts) observed during pre-commit full-workspace test execution.

CLI Surface Migration

  • No migration packet required for this CLI change.
  • CLI/user-facing surface change and migration packet completed.

No-migration rationale: ztd query sssql refresh behavior is extended for correlated branch relocation without introducing a new command or required flag change.
Upgrade note: Existing ztd query sssql refresh <sqlFile> now also handles correlated EXISTS / NOT EXISTS relocation with explicit fail-fast behavior on ambiguous/missing anchors.
Deprecation/removal plan or issue: none
Docs/help/examples updated: docs/guide/ztd-cli-sssql-reference.md
Release/changeset wording: .changeset/correlated-refresh-exists-relocation.md

Scaffold Contract Proof

  • No scaffold contract proof required for this PR.
  • Scaffold contract proof completed.

No-proof rationale: this PR does not change feature/query scaffold output contracts.
Non-edit assertion: parent boundary non-edit behavior is unchanged.
Fail-fast input-contract proof: covered by correlated anchor ambiguity/missing tests.
Generated-output viability proof: covered by updated core and CLI regression tests.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 15, 2026

Warning

Rate limit exceeded

@mk3008 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 minutes and 33 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 5 minutes and 33 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0586edca-5287-4030-a020-3d505d315ead

📥 Commits

Reviewing files that changed from the base of the PR and between ac00253 and e9e425f.

📒 Files selected for processing (5)
  • .changeset/correlated-refresh-exists-relocation.md
  • docs/guide/ztd-cli-sssql-reference.md
  • packages/core/src/transformers/SSSQLFilterBuilder.ts
  • packages/core/tests/transformers/SSSQLFilterBuilder.test.ts
  • packages/ztd-cli/tests/cliCommands.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 768-sssql-refresh拡張-correlated-exists-not-exists-branch-の再配置に対応する

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mk3008 mk3008 merged commit 5f87d18 into main Apr 15, 2026
10 checks passed
@mk3008 mk3008 deleted the 768-sssql-refresh拡張-correlated-exists-not-exists-branch-の再配置に対応する branch April 15, 2026 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SSSQL refresh拡張: correlated EXISTS / NOT EXISTS branch の再配置に対応する

1 participant