Reviews pull requests that touch database access for SurrealDB-specific silent failure modes: record-id casting, short-id reconstruction, datetime handling, schema declaration order, null handling on SCHEMAFULL tables, and unbounded query shape. Configure the repository and branch on the Clone step after importing if you use this outside a pull-request trigger.
- Identifier
db-query-review- Version
- 1.0.1
- Steps
- 4
- Triggers
- 2
- database
- surrealdb
- query
- review
- performance
- silent-failures
When it runs
pull_request.opened- Settle delay
- 15s after the event
Only when all hold
- pullRequest.isDraft not equals true
- actor.username not in dependabot, dependabot[bot], renovate, renovate[bot], github-actions, github-actions[bot]
- actor.username not contains [bot]
pull_request.synchronize- Settle delay
- 15s after the event
Only when all hold
- pullRequest.isDraft not equals true
- actor.username not in dependabot, dependabot[bot], renovate, renovate[bot], github-actions, github-actions[bot]
- actor.username not contains [bot]
The pipeline
The graph below is the one the workflow opens with in the builder — same steps, same layout, drawn on the same canvas. The run playing through it is a simulation; the branches and conditions are real.
- 01PR Opened / Synchronized
triggerThe event that starts the run.
- 02Clone Repository
git.cloneShallow-clones the repository at the right ref.
- 03Review Database Queries
agent.runOne agent works the task with its toolkit.
- 04Publish Query Review Report
report.publishPosts or updates a deduplicated report comment.
The agent
Database Query Reviewer
- Base type
- Code Reviewer
- Temperature
- 0.2
- Max iterations
- 25
- Tools
- 6
Git provider · 2
get_pull_request_diffGet Pull Request Diff · readread_pull_requestRead Pull Request · read
Filesystem · 2
read_fileRead File · readlist_dirList Directory · read
Code search · 1
code_searchCode Search · read
Status · 1
update_statusUpdate Status · write
Related playbooks
Schema Migration Companion
Reviews schema.surql changes for reverse migrations, SurrealDB rule violations, existing-row safety, and affected foreign-key tables.
Migration Safety Review
Reviews PRs that touch database migrations and flags locking, destructive, or ordering risks inline.
Accessibility Audit
Reviews UI PRs for accessibility defects, posts inline threads citing WCAG criteria, and submits a summary review.