Skip to content

GH#14679: tighten mutations cheatsheet - #14691

Merged
marcusquinn merged 1 commit into
mainfrom
bugfix/qd-14679-tighten-mutations-cheatsheet
Apr 1, 2026
Merged

marcusquinn merged 1 commit into
mainfrom
bugfix/qd-14679-tighten-mutations-cheatsheet

Conversation

@alex-solovyev

@alex-solovyev alex-solovyev commented Mar 31, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Tighten .agents/services/database/postgres-drizzle-skill/cheatsheet-mutations.md from 65 to 56 lines (14% reduction)
  • Add top-level .returning() note covering all mutation types, eliminating redundant per-method examples
  • Consolidate conflict handling patterns and shorten self-evident inline comments

Classification

Reference corpus chapter — already part of a split cheatsheet structure. Tightened prose and removed redundant code examples; zero content loss.

Changes

Before After Delta
65 lines 56 lines -9 (14%)

What was removed:

  • Separate .returning() example in Update section (redundant — covered by new top-level note + existing examples in Insert/Delete)
  • // Single insert comment (self-evident from code)
  • Blank line between onConflictDoUpdate and onConflictDoNothing (related patterns, grouped)

What was added:

  • Top-level note: "All mutation methods support .returning() to get affected rows back"
  • Improved comment: // Upsert (on conflict) (more descriptive than bare // Upsert)

Content Preservation Verification

All code patterns verified present: insert().values().returning(), batch insert, onConflictDoUpdate, onConflictDoNothing, update().set().where(), SQL template increment, delete().where(), delete().returning(), transaction(), tx.rollback().

No task IDs, URLs, or command examples existed in this file to preserve.

Runtime Testing

  • Risk level: Low (docs/agent prompt only)
  • Verification: self-assessed — markdown lint clean, content preservation verified by diff review

Closes #14679


aidevops.sh v3.5.505 plugin for OpenCode v1.3.9 with claude-opus-4-6 spent 2m on this as a headless worker.

- Add top-level .returning() note covering all mutation types
- Remove redundant per-method .returning() examples (update section)
- Consolidate conflict handling (upsert + ignore) into single block
- Shorten self-evident inline comments

Zero content loss: all code patterns, API methods, and examples preserved.

Closes #14679
@alex-solovyev alex-solovyev added the origin:worker Created by headless/pulse worker session label Mar 31, 2026
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Mar 31, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Review skipped — only excluded labels are configured. (1)
  • no-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: faecfa45-2a37-4ff5-afa5-3b830474f7f9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bugfix/qd-14679-tighten-mutations-cheatsheet

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.

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

SonarCloud: 0 bugs, 0 vulnerabilities, 1 code smells

Tue Mar 31 06:23:41 UTC 2026: Code review monitoring started
Tue Mar 31 06:23:41 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 1

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 1
  • VULNERABILITIES: 0

Generated on: Tue Mar 31 06:23:44 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud

Copy link
Copy Markdown

@alex-solovyev

Copy link
Copy Markdown
Collaborator Author

Closing Summary

What was done:

  • Tightened .agents/services/database/postgres-drizzle-skill/cheatsheet-mutations.md from 65 to 56 lines (14% reduction)
  • Added top-level .returning() note covering all mutation types, eliminating redundant per-method examples
  • Consolidated conflict handling patterns (onConflictDoUpdate + onConflictDoNothing) into single block
  • Shortened self-evident inline comments

Testing evidence:

  • Risk level: Low (docs/agent prompt only)
  • Verification: self-assessed — markdownlint clean (0 errors), content preservation verified by diff review
  • All 10 code patterns verified present in output

Key decisions:

  • Classified as reference corpus chapter (already split via cheatsheet.md index) — tightened prose rather than restructuring
  • Generalized .returning() into a top-level note rather than showing it separately for each mutation type — reduces redundancy while preserving the knowledge

Files changed:

  • .agents/services/database/postgres-drizzle-skill/cheatsheet-mutations.md (65→56 lines, -9)

Blockers:

  • Merge blocked: requires 1 approving review from reviewer with write access

Follow-up:

  • None required

Closes #14679


aidevops.sh v3.5.505 plugin for OpenCode v1.3.9 with claude-opus-4-6 spent 3m on this as a headless worker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

origin:worker Created by headless/pulse worker session

Projects

None yet

Development

Successfully merging this pull request may close these issues.

simplification: tighten agent doc Mutations (.agents/services/database/postgres-drizzle-skill/cheatsheet-mutations.md, 65 lines)

2 participants